Multiple vlan separated by interface on DSA

Can someone try to help me out understand how to configure VLAN on ACCESS POINTS?

What i want:
3 wifi vlans conected to the same vlan over lan, all of them in the same cable uplink over LAN interface (access point).

I tried almost everything already and what i get is that the wifi network is not able to get ip over dhcp, because the dhcp is on the designated vlan over cable on lan.

Can someone help me out?


I have tried with vlan over bridge interface br-lan.10 or also bridging all lan ports together, lan1.10, lan2.10, lan3.10, lan4.10


So i have one interface without vlan, that is the access for management, and also the other interface that is a brigde with all

image
One thing that i noticed is that when i try to configure, the icons of the interfaces have all the lan ports together, but opaque..

image
and then after saving, the lan ports are gone


So trying again...
Create brigde over all lan ports, 1-4, like this one.


here it is....


create a bridge over the interfaces,


here is the end result

So,
not working, wifi conects ok, asks for dhcp that is active in vlan 10 and nothing happens.

There is this strange behaviour that the lan ports does not appear on the icons on the interface.

Any hints?

Thanks
Pucci

The best way for us to help will be based on the text config. Please provide the information requested below.

We also need to know the port-VLAN membership and the management network:

  • What port is used for the uplink?
  • What VLAN IDs are tagged on the uplink?
  • Are all networks tagged, or is there one untagged?
  • Which VLAN is used to manage the device?
  • What is the address that this AP should use on the management network (if static; if it is DHCP client, please indicate that).
  • What is the VLAN membership for the other ports? Are they all access ports? Are there any trunk ports? Which VLANs on which ports?

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
{
        "kernel": "5.15.162",
        "hostname": "SALA_TV_SUPERIOR",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Cudy WR1300 v3",
        "board_name": "cudy,wr1300-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.4",
                "revision": "r24012-d8dd03c46f",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.4 r24012-d8dd03c46f"
        }
}

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdfd:4bd5:052a::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        option vlan_filtering '1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.253'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'vlan10'
        option proto 'static'
        option device 'brlan10'
        option ipaddr '192.168.10.253'
        option netmask '255.255.255.0'
        option gateway '192.168.10.1'

config device
        option type '8021q'
        option ifname 'lan1'
        option vid '10'
        option name 'lan1.10'

config device
        option type '8021q'
        option ifname 'lan2'
        option vid '10'
        option name 'lan2.10'

config device
        option type '8021q'
        option ifname 'lan3'
        option vid '10'
        option name 'lan3.10'

config device
        option type '8021q'
        option ifname 'lan4'
        option vid '10'
        option name 'lan4.10'

config device
        option type 'bridge'
        option name 'brlan10'
        list ports 'lan1.10'
        list ports 'lan2.10'
        list ports 'lan3.10'
        list ports 'lan4.10'
        option bridge_empty '1'

Thanks @psherman Peter for your promptly reply. The data from the device is posted in the previous post

Same interface cannoot be in multiple bridges in your context

There are a bunch of issues present in the current config. I think the best way to move forward is to reset to defaults. Once done, please post the default network config file.

I think you may have misunderstood this question:

  • What VLAN IDs are being used? For example: VLAN IDs: 24, 33, and 63.
    • per your config, I see VLAN 10, but that's all.
    • Does this mean there are only 2 VLANs?
      • 1 untagged VLAN
      • VLAN 10 tagged?
1 Like

Yes @psherman that`s it.. one untagged vlan and a vlan 10 to start with. if possible to do more, i will replicate more 2 vlans but i like to start small to learn the concepts.

{
        "kernel": "5.15.162",
        "hostname": "SALA_TV_SUPERIOR",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Cudy WR1300 v3",
        "board_name": "cudy,wr1300-v3",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.4",
                "revision": "r24012-d8dd03c46f",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.4 r24012-d8dd03c46f"
        }
}
config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdfd:4bd5:052a::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        option vlan_filtering '1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.253'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

device reseted @psherman , please see the config on the previous post

is is not the same interface, it is the vlan of that interface, so lan1 is a port, but lan1.10 is vlan 10 on that port.

Start by creating bridge-vlans (we'll set port lan1 as the uplink, then ports 2-3 as VLAN 1 (the untagged network on the uplink) and port 4 as VLAN 10):

config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan1:u*'
        list ports 'lan2:u*'
        list ports 'lan3:u*'

config bridge-vlan
        option device 'br-lan'
        option vlan '10'
        list ports 'lan1:t'
        list ports 'lan4:t'

Next, edit the lan interface to use br-lan.1:

config interface 'lan'
        option device 'br-lan.1'
        option proto 'static'
        option ipaddr '192.168.1.253'
        option netmask '255.255.255.0'
        option ip6assign '60'

And now create an unmanged network interface for VLAN10:

config interface 'vlan10'
        option device 'br-lan.10'
        option proto 'none'

Now you can create your SSIDs, associated with lan for one SSID and vlan10 for the other (this is in the SSID config section of the wireless file).

Restart and test again. You should be able to also connect to lan2 and lan3 and get an address in VLAN 1 (192.168.1.0/24) and on port lan4 you should get 192.168.10.0/24 (VLAN 10).

[EDIT: removed lan4 from the bridge-VLAN for VLAN 1 (that was a copy paste error on my part), thanks to @flygarn12 for catching that].

Thanks @psherman it worked!
I think there is some bug in luci for this, bc i tried untaged and primary for this and i lost access to it several times

It's not really a bug, per-se, but rather a sequencing thing. You need to create the bridge-vlans, then edit the lan interface to use the new bridge-vlan. This is tricky to do in LuCI because of the way it applies the changes. I think it is possible to get LuCI to queue the changes and apply them in bulk, but I always just directly edit the text files so that I can ensure everything gets applied at the same time.

Meanwhile, glad it is working!

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

What is lan1 uplink to, and how do they communicate?


config bridge-vlan
        option device 'br-lan'
        option vlan '1'
        list ports 'lan1:t'
        list ports 'lan2:u'
        list ports 'lan3:u'

config bridge-vlan
        option device 'br-lan'
        option vlan '10'
        list ports 'lan1:t'
        list ports 'lan4:t'

Well this is what you described in text.
The * isn’t really needed unless doing unsymmetrical networks for the outgoing vlan, we have a post about that here in the forum somewhere.

Lan4 isn’t supposed to be in vlan1 settings if it doesn’t belong there.

But for vlan setups in general.
It is allowed to use ONE untagged vlan and unlimited (at least as many as the hardware allow) tagged vlans on a port. But it isn’t recommended. If you really want to use vlan network, then use trunk ports that only have tagged vlans and nothing else. But you need tagged vlan set up on both sides of the ethernet cable to use trunk ports.

Usually the ports are called connection ports where the vlan is untagged and clients without vlan capability are connected, one vlan and one client per untagged port.
But once you start having tagged vlan, both clients of the ethernet cable ends must use tagged vlan and then one untagged vlan makes no sense on that port.

Luci can fix this kind of complex setups, you only push the save button on each setting and make all changes on all pages (while only using save).
Once finished, scroll up to the top and click the box with cued changes and choose to “roll the dice” and apply all changes or choose to revert changes.

Per the OP, any port would be acceptable for uplink, so I defined lan1 as the uplink to the main router (which has VLANs working already).

I personally always suggest that the * is used in all normal untagged situations. It prevents ambiguity. In fact, I'd argue that the only reason to omit the * would be if your goal was the asymmetric VLAN behaviors (which is quite rare and niche).

Good catch. Copy/paste error on my part.

This is a topic of debate in most cases, although there are some (rare) hardware examples where the mixed untagged+tagged situation will cause problems. In all other cases where hardware doesn't have this limitation, it becomes a matter of personal/professional opinion. The 802.1q standard allows it, so as long as the hardware supports the standard properly, there is no technical reason that this is a problem. However, there are arguments to be made as to why untagged networks shouldn't being included in a trunk when it comes to the risk of human error or other undesirable connectivity considerations.

That said, the OP already had the upstream connection setup with an untagged network, so the advice I provided was in-line with what they already had.

I think the more common term is "access port," but this could just be the specific sources from which I learned about VLANs. That said, there is no need to limit to "one client per untagged port" insofar as it's possible to have another switch downstream that could allow multiple clients per untagged port on any upstream switch.

That's actually not entirely true. Again, the 802.1q standard allows the use of an untagged network on a trunk. Suppose you set the untagged network for the regular lan -- you can plug a computer into that and it'll join the lan network. If the computer is not VLAN aware, it will just ignore any ethernet frames that contain 802.1q tags. If its s VLAN aware (and configured appropriately), it can also join VLANs with tags. Again, the argument comes down to style in many cases, but there are some legitimate use-cases where there may be an untagged network on a trunk.

@psherman i have here some GL inet untruncked routers with old source code that does not use DSA. There was this time, that i used to believe in Santa, that they would add the router to openwrt trunk.
So they are lying around here.
Do you know how can i configure them in the old way of vlan before DSA mode?
the simple untagged vlan 1, just like you did here with dsa?

@leopucci - if the devices are running official openwrt, yes (if they have the vendor firmware, you need to ask on their support channels). Please start a new thread for this and feel free to tag me in.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.