How to tell if my hardware is DSA compatible

I thought I had done my homework but am hitting brickwall after brickwall trying to get things configured and I'm now wondering if I missed some massively obvious thing that the rest of everyone knows already.

QUESTION
How do I know if my hardware is compatible with DSA the way OpenWRT 21 presents it? (I am following numerous tutorials and also reading the OpenWRT pages on DSA, but hours are going by and my configurations and testing isn't taking).

If it's not compatible, how do I determine my options so I can design something that will work? Seems everything is DSA focused so I am unclear what to search on for non-DSA guidance or if I even should.

I feel silly at this point because I have tried a lot of variations and its all not working (summary below):

HARDWARE/FIRMWARE I'm running (TOH links included):

  • One Linksys EA4500 (Viper) (acting as main router)

    • Switch: Marvell 88E617x (Gigabit, VLAN)
    • OpenWrt 21.02.0 r16279-5cc0535800 / LuCI openwrt-21.02 branch git-21.231.26241-422c175
  • Several of Luma Home WRTQ-329ACN (target: ipq40xx/generic)

    • Switch: Qualcomm Atheros QCA8075 (VLAN: yes)
    • OpenWrt 21.02.3 r16554-1d4dea6d4f / LuCI openwrt-21.02 branch git-22.083.69138-0a0ce2a
  • Several Zyxel GS1200 managed switches, although this isn't really part of the problem.

PLAN
To use the Lumas as hardwired APs (not meshed, only 802.11r Fast Transition) for 3 separate vLANs. If that went well, I'd break out into additional vLANs as needed.

WHAT I TRIED
My test of this was to directly wire a Luma with the EA4500 with 3 vLANs and cooresponding SSIDs. If I kept all ports Untagged, I'd maintain connection to the Luma. As soon as I tried trunking the EA4500<->Luma by tagging all 3 vLANs, I'd lose connection to it (I'd maintain connection to the EA4500 as I was wired directly to it). Tried many variations of this. Ultimately leading me to think the Luma can't handle vLANs implemented this way but not knowing how to confirm that.

What am I missing?

The amount of reading I have been doing is making my head spin and I have to be missing something obvious....Hundreds of questions but I figured this was the best place to start when my reading was rabbit-holing me.

Thanks any pointing in the right direction anyone can provide. I'll probably have more questions tho :face_with_peeking_eye:

There are two ways...

  1. look at the 21.02.0 release notes that highlights the specific targets that have transitioned to DSA. You'll simply look at the target type for your devices and then see if it is on the list of DSA targets

  2. Look ar your default network configuration (/etc/config/network). The DSA syntax will usually have the ports named "WAN", "LAN1"... "LAN4", where as non-DSA (i.e. swconfig) will typically use the nomenclature eth0.x, eth1.y where x and y are the VLAN IDs. There are exceptions to this rule, but this works in most cases.

Okay excellent. So based on that, it appears the kirkwood target is included. Not so much for the ipq40xx. I had found some threads tracking efforts to get ipq40xx included [1] [2] and it looks like there is a shot for the future. Thank you for pointing me on the right path.

So I need to look at configuring my ipq40xx devices with swconfig at this point, correct? I have not done a lot of reading but a quick search before this post showed it doesn't look like swconfig supports the switch chipset (QCA8075). Is swconfig just a helper utility for config files and I can still manually implement the configuration in a swconfig-like style that will be understood by OpenWRT 21?

Thanks again!

1 Like

normally, the configuration with swconfig is really easy, with simple structures like this:

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1.1'

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '2 3 4 0t'

creating new VLANs is pretty easy -- define another VLAN in a new switch_vlan stanza for example, VLAN 5, and that becomes eth1.5 (in my example). Adjust a few things as needed (like the port assignments, etc.) and you should be good.

If you share your current /etc/config/network file and your goals, we can help you with that.

Okay great, I have seen those structures but I had incorrectly assumed they were for previous versions of OpenWRT and were not compatible. Good to know I just need to learn that config style.

To start, all I am looking to do is learn with a simple build-out. ie. Take my main router (EA4500 w/dsa) and link 3 vLANs to a single AP (Luma w/swconfig) via a ethernet cable so that at the most basic level those 3 vLANs are available via wired and wireless connections. If that works, I'll add more :slightly_smiling_face:


Here is my /etc/config/network of my main router
config globals 'globals'
    option ula_prefix 'fda0:1e00:4587::/48'

config device
    option name 'br-lan'
    option type 'bridge'
    option ipv6 '0'
    list ports 'ethernet1'
    list ports 'ethernet2'
    list ports 'ethernet3'
    list ports 'ethernet4'

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

config interface 'Devices'
    option proto 'static'
    option ipaddr '192.168.2.1'
    option netmask '255.255.255.0'
    option type 'bridge'
    option device 'br-lan.20'

config interface 'GUEST'
    option proto 'static'
    option ipaddr '192.168.3.1'
    option netmask '255.255.255.0'
    option type 'bridge'
    option device 'br-lan.30'

config bridge-vlan
    option device 'br-lan'
    option vlan '10'
    list ports 'ethernet1:u*'
    list ports 'ethernet3'
    list ports 'ethernet4:u*'

config bridge-vlan
    option device 'br-lan'
    option vlan '20'
    list ports 'ethernet3:t'

config bridge-vlan
    option device 'br-lan'
    option vlan '30'
    list ports 'ethernet3:t'

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

config device
    option name 'internet'
    option macaddr 'c8:d7:19:31:bd:52'

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

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

Notes:

  1. Main router acts as sole DHCP server, firewall, etc. I'd prefer not to route ip6 addresses within the network.
  2. ethernet1 is simply linked to my old legacy network.
  3. ethernet3 is the direct "trunked" port to the Luma AP
  4. ethernet4 is my direct hardwire to my computer. I should be able to access all vLANs from there.
  5. LAN is primary vLAN and will act as the "mgmt" lan for all hardware. Eventually I'll break this out into its own as I figure out what is best and learn more.

My current /etc/config/network of a Luma AP (DSA-style)
config globals 'globals'
    option ula_prefix 'fd7d:50c7:f997::/48'

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth0'
    list ports 'eth1'

config bridge-vlan
    option device 'br-lan'
    option vlan '10'
    list ports 'eth0:t'
    list ports 'eth1'

config bridge-vlan
    option device 'br-lan'
    option vlan '20'
    list ports 'eth0:t'
    list ports 'eth1'

config bridge-vlan
    option device 'br-lan'
    option vlan '30'
    list ports 'eth0:t'
    list ports 'eth1'

config interface 'lan'
option device 'br-lan.10'
option proto 'static'
option ipaddr '192.168.1.2'
option netmask '255.255.255.0'

config interface 'DEVICES'
option device 'br-lan.20'
option proto 'none'
option type 'bridge'

config interface 'Guest'
option device 'br-lan.30'
option proto 'none'
option type 'bridge'

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

My 1st attempt at converting it to swconfig-style (??)
config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth0.10'
    list ports 'eth0.20'
    list ports 'eth0.30'
    list ports 'eth1'

config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option ipaddr '192.168.1.2'
    option netmask '255.255.255.0'

config interface 'DEVICES'
    option device 'br-lan'
    option proto 'none'

config interface 'Guest'
    option device 'br-lan'
    option proto 'none'

config switch_vlan
    option device 'switch0'
    option vlan '10'
    option ports '0t'

config switch_vlan
    option device 'switch0'
    option vlan '20'
    option ports '0t'

config switch_vlan
    option device 'switch0'
    option vlan '30'
    option ports '0t'

Notes:

  1. These Lumas have an eth0 and an eth1 port as well as their 2 Wifi radios.
  2. I would like to be able to use the eth1 to attach a device (into one of the vLANs) OR use the port to attach a downstream switch and send the vLANs further.

Am I getting close?

I would recommend that you start fresh. Reset both devices to their default states. Then post the network configuration for each of them (just the defaults).

Done.

Default EA4500 /etc/network/config
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 'fdde:60c7:c56d::/48'

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'ethernet1'
    list ports 'ethernet2'
    list ports 'ethernet3'
    list ports 'ethernet4'

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

config device
    option name 'internet'
    option macaddr 'c8:d7:19:31:bd:52'

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

config interface 'wan6'
    option device 'internet'
    option proto 'dhcpv6'
Default Luma /etc/network/config
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 'fde2:ea37:d0f6::/48'

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth0'

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

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

config interface 'wan6'
    option device 'eth1'
    option proto 'dhcpv6'
  1. found this in forums a while back
    grep -sq DEVTYPE=dsa /sys/class/net/*/uevent

For the Luma device, adding a VLAN will be relatively simple... as an example:

config device
    option name 'br-guest'
    option type 'bridge'
    list ports 'eth0.10'

config interface 'guest'
    option device 'br-guest'
    option proto 'none'

Then you create an SSID for the guest network, and you're done

I'm not as well versed on the DSA side, but you'll create a new network (since this is the primary router) something like this (this would put VLAN 10 tagged on port LAN4):

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

config interface 'guest'
    option device 'br-lan.10'
    option proto 'static'
    option ipaddr '192.168.10.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

[/quote]

Okay, that is def in-line with the direction I was heading, so I'm gaining a lot of confidence back now. Thanks for that.

As for adding additional vLANs to the Luma config, do I just list multiple list ports 'eth0.xx' under config device?

And lastly/similiarly, do I then un/tag the ports for each vLAN with separate config switch_vlan stanzas like this?

config switch_vlan
    option device 'switch0'
    option vlan '10'
    option ports 'eth0t'

and so on and so on?

Alright, this was a process but I think I finally got through it. Following up with the final outcome to help me brain dump everything in a referenceable format.

First, my end goal was 3 separate vLANs across both a wired and wireless network. The tricky part was that I was using flashed Lumas as my APs throughout and these Lumas are not supported with DSA yet. So although my main router has DSA support, I had to also implement non-DSA configuration which I was finding confusing and frustrating because even when I thought I was following everything as I was supposed to, it still wasn't working.

Turns out, that's because any device with a target of ipq40xx has some very tricky weirdness with how the internal switch architecture maps and associates vLANs across the ports. This is actually well discussed but I never came across it because I wasn't searching on ipq40xx or qca87xx.

From those three forum postings, I was able to kind of figure out how to possibly hack things together to get things working. There is a highly detailed comment that goes into how/why/what can be done but it's still well over my head. I have concerns this hack will cause network issues as mentioned in the comment, but I will have to try to better understand that another time.

So the gist is, ipq40xx devices have a switch that highjacks the WAN and LAN ports (eth0 and eth1 in my case) and vLANs 1 & 2 by default. For example, with my Luma's, the eth1 and eth0 ports pass-through traffic by default, but OpenWRT does not recognize them as separate devices even though the switch does. My Lumas' default /etc/config/network file only show eth0, even though each device clearly has a eth1 that passes traffic to eth0 by default.

If I ran swconfig, Lumas default tagging would look like this:

VLAN 1:
    vid: 1
    ports: 0t 1 2 3 4
VLAN 2:
    vid: 2
    ports: 0t 5

So I am using VIDs of 10,20,30 so I could ignore and not use 1 & 2 easily. Through the links above and testing the output of swconfig by connecting/disconnecting ethernet to the ports I was able to determine that 0t references the internal cpu switch and 3 somehow is tied into eth1 while 5 is eth0. Still not 100% certain, but that allowed me to do the following configuration that finally got my vLANs working properly across multiple Lumas.

The one thing to note is that port 5 is eth0 and I will use that to tie-in a device to a specific vLAN. So the Luma has trunked connections to the switch so it brings the 3 vLANs across for use by their wireless radios, but I then just need to use remaining eth0 port like it's its own 1-port switch tying the connected device to the appropriate vLAN.

Take note of the difference between what I have set in the /etc/config/network file and what swconfig shows ipq40xx/qca87xx as actually allowing:

/etc/config/network
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 'fd94:b2eb:40d1::/48'

config device
    option name 'br-lan'
    option type 'bridge'
    list ports 'eth0.10'
    list ports 'eth1.10'
    option ipv6 '0'

config interface 'lan'
    option proto 'static'
    option netmask '255.255.255.0'
    option ipaddr '192.168.1.2'
    option gateway '192.168.1.1'
    list dns '192.168.1.1'
    option device 'br-lan'

config device
    option name 'br-devices'
    option type 'bridge'
    list ports 'eth0.20'
    list ports 'eth1.20'
    option ifname 'eth0'
    option vid '20'
    option ipv6 '0'

config interface 'DEVICES'
    option device 'br-devices'
    option proto 'none'

config device
    option name 'br-guest'
    option type 'bridge'
    list ports 'eth0.30'
    list ports 'eth1.30'
    option ifname 'eth0'
    option vid '30'
    option ipv6 '0'

config interface 'Guest'
    option device 'br-guest'
    option proto 'none'

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'

config switch_vlan
    option device 'switch0'
    option vlan '10'
    option ports '0t 1 2 3 4'

config switch_vlan
    option device 'switch0'
    option vlan '20'
    option ports '0t 1 2 3 4 5'

config switch_vlan
    option device 'switch0'
    option vlan '30'
    option ports '0t 1 2 3 4'

config switch_port
    option device 'switch0'
    option port '0'
    option pvid '10'

config switch_port
    option device 'switch0'
    option port '3'
    option pvid '10'
swconfig output
VLAN 1:
    vid: 1
    ports: 0t 1t 2t 3t 4t
VLAN 2:
    vid: 2
    ports: 0t 5t
VLAN 10:
    vid: 10
    ports: 0t 1t 2t 3 4t
VLAN 20:
    vid: 20
    ports: 0t 1t 2t 3t 4t 5
VLAN 30:
    vid: 30
    ports: 0t 1 2 3t 4

So weird. It's like it has a tagging mind of its own. And maybe one day I can better understand what is going on, but for now, even with the hijacking this seems to work just fine for what I need.

ToDo:

  1. Finish testing to make sure expected behavior of the vLANs is actually what is happening, so far so good.
  2. Look more into how to migrate my Luma's boards in the DSA pull request

If anyone is still reading this, thank you for the feedback. Starting from ground zero learning all of these was not fun for a little while until I was nudged in the right direction.

1 Like

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