Mini tutorial for DSA network config

My father in law always says: "things must change, in order to remain the same".

:slightly_smiling_face: - a fine conclusion.

I don't really want to argue about it.
I'm fine with the new solution and you guys know what you're doing - at least you've proven it so far.

2 Likes

The lines and levels aren’t for you, they are for the computer. It will be more efficient data moving if the CPU knows where to send the data before manipulating the data in the receiving interface instead of manipulating the data and then realize it was sent to the wrong place.

imo, depends on how one configures a setup, I for one rarely use the GUI (if ever), vi is the ticket.

To be honest I now think the DSA setup is more logical and easier to use when building up more complex systems in comparison with the swconfig.

In swconfig there was a completely different manual config system for PVID. And that never ever received LuCi support, to be honest not many complained about that. So the ones not complaining about pvid probably didn’t use VLAN in any great extent or didn’t know how the VLAN standard worked. Because every single manageable switch I have played around with always had both VLAN and PVID settings in the GUI.

So the old swconfig with both vlan, pvid and interfaces was a lot of config lines in comparison with DSA if the VLAN starts to build up in numbers.

Now with DSA we actually aim to comply with a network industry standard.

5 Likes

I have left both gui and hand tapping, now my metode is about 300 lines (in 19.07.7) and about 250 lines (in 21.02 ) and it does exactly the same configuration of UCI code with a config script.

1 Like

Hi,

Could you please advise how wifi interfaces/devices should look like with DSA/new config notation?

Like, how would you define a home and guest networks through multiple APs where home would be a wired and wireless network (ssidA), and guest would be a separate wireless (ssidB)? So far guest wifi interface with VLAN and trunk port defined on switch level solved this. I dont exactly see how this could be done now.

Thanks.

I have not been able to assign a wifi interface to a VLAN no matter what I did. All I could do was to specify a new subnet and attach the two radios/wlan0/wlan1 to it. Less than idea, as it just makes more of a mess of IP address spacing to keep track of when I perfectly have proper VLANs already defined.

Would you mind sharing your config so I can assign my wlan0/1 to an existing VLAN? I have spend close to 2 days on it and couldn't get it to work. I'd appreciate it.

Thanks!

D4

There is a couple of commits to the netifd tree today that have addressed the WLAN noseeum issue; nbd has not yet pushed them to master. WFM on a mamba.

Just to be on the same page: the old way via swconfig, non-DSA setup wlan-vlan assignment was easy. I neither see what should be the right way with DSA.

I have a DSA enabled 21.02-rc1 where I configured this but this could be totally wrong which seems to work though:

[removed not relevant content]
/etc/config/network:

config interface 'lan'
        option type 'bridge'
        option ifname 'lan1 lan2 lan3 lan4'
        option proto 'static'
        option netmask '255.xx.xx.xx
        option ipaddr '192.xx.xx.xx'

config interface 'guest'
        option proto 'static'
        option type 'bridge'
        option netmask '255.xx.xx.xx'
        option ifname 'lan4.3'
        option ipaddr '172.xx.xx.xx'

/etc/config/wireless:

config wifi-device 'radio0'
        option hwmode '11g'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option ssid 'ssidA'
        option ifname 'wlan2-1' # <- just helper label "2.4G band - vlan1"

config wifi-device 'radio1'
        option hwmode '11a'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option ssid 'ssidA'
        option ifname 'wlan5-1' # <- just helper label "5G band - vlan1"

config wifi-iface 'wifinet2'
        option device 'radio0'
        option ssid 'ssidB'
        option ifname 'wlan2-3' # <- just helper label "2.4G band - vlan3"
        option network 'guest'

config wifi-iface 'wifinet3'
        option device 'radio1'
        option ifname 'wlan5-3' # <- just helper label "5G band - vlan3"
        option network 'guest'
        option ssid 'ssidB'

Using wifi-iface/ifname as helper label just for my benefit to identify things easier, I found radio0-1 less intuitive. Thus it is absolutely not essential.

Hi.

A question: DSA is implemented on all routers?
My router is an Archer C60 (ath79, QCA956X), I'm using the latest snapshot and I do not see these options available on LuCi.

I need to enable something?

Juliano

According to release note

OpenWrt 21.02 comes with initial support for DSA, which replaces the swconfig system that OpenWrt was using up until now. Not all targets have been ported: some devices still use swconfig while some devices already switched to DSA.

No, DSA has been implemented just for a few targets, so only for a small minority of the routers.

Specifically for those: https://openwrt.org/docs/techref/hardware/switch#support_matrix
(it looks like that table is still current)

The most widespread target receiving DSA with 21.02 is probably ramips/mt7621, I guess that's where we will see the most users (and config questions.)

Linksys mvbu devices has been hard working in the DSA question threads also😂

And the really hard working geeks like myself that managed to get two DSA devices, mvbu and Octegon at the same time😅

But isn’t it the devices that has built in hardware DSA support that has full DSA function as of today?

DSA is a software thing. Otherwise you wouldn't be able to switch between swconfig and DSA on the same hardware.

1 Like

Well EdgeRouter 4 (Octegon) doesn’t have a hardware switch to begin with.
Even the Ubi original firmware runs DSA from scratch.
So it isn’t easy to run it as a switch as before.
WRT3200ACM i really don’t know if it is a hardware switch on the circuit board but that CPU had two ports in swconfig, one for lan and one for wan.
With DSA it only uses one CPU port?

Ain’t it the routers without hardware switch that has DSA from the beginning in 21.02?
Lack of hardware is also hardware support😃

All the wrtpac devices have some flavour of the Marvell mv88e6xxx switch series

2 Likes

https://www.kernel.org/doc/Documentation/devicetree/bindings/net/dsa/marvell.txt
Yes, and that switch circuit seems to be made to run DSA in some way so it seems so have hardware support for DSA.

Prior to DSA migration it was utilised by the swconfig framework. DSA is the choice as it was accepted upstream at linux.org, where swconfig was not.

DSA is a conceptual model providing an abstraction layer between the implementation and the HW, whether independent nics or 1+ switch devices; to Borromini point above.

kernel docs

2 Likes