This is the proper way of managing the switch ports and VLANs under the DSA driver. All of the switch ports must be in the same bridge. The steps to configuring VLANs on ports and configuring the interfaces are also a lot similar to with swconfig.

Wireless interfaces are also included in the bridge properly.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2fae5806-4320-420b-a640-423d5b354d9a/Screenshot_from_2021-07-06_19-18-05.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/46e85106-0f93-4851-8058-78b2e381e28e/Screenshot_from_2021-07-06_19-29-25.png


DSA switch configuration from userspace - The Linux Kernel documentation

bridge(8) - Linux manual page

ISP DSA Config Example

ISP1: WAN untagged - LAN 4 on VLAN 2

ISP2: LAN 1 on VLAN 561 - LAN 4 on VLAN 561

Router: VID 2 & 561

# bring up the slave interfaces
ip link set wan up
ip link set lan1 up
ip link set lan4 up

# activate VLAN filtering
ip link set dev br0 type bridge vlan_filtering 1

# add ports to bridge
ip link set dev wan master br0
ip link set dev lan1 master br0
ip link set dev lan4 master br0

# tag traffic on ports
bridge vlan add dev wan vid 2 pvid untagged
bridge vlan add dev lan4 vid 2
bridge vlan add dev br0 vid 2

bridge vlan add dev lan1 vid 561
bridge vlan add dev lan4 vid 561
bridge vlan add dev br0 vid 561