Openwrt 21.02.0-rc3 on wrt1200ac

Finally got around to trying the 21.02 release on my wrt1200ac router. Figured I may share a few notes here :slight_smile:

My home lab uses a lot of vlans and it was not immediately clear to me how the config would go with the new DSA stuff. As it turns out, it was pretty easy once I figured it out.

I use a vlan trunk to connect the router to some vlan switches and to a separate access point. These all plug into the back of my router, so I created a bridge for the vlan trunk:

config device
	option name 'br-trunk'
	option type 'bridge'
	list ports 'lan1'
	list ports 'lan2'
	list ports 'lan3'
	list ports 'lan4'

After that, my interfaces could create vlans on the trunk without needing any separate bridge configs for each vlan. For example, my guest wifi is on vlan 101, so the guest interface just needs to say option device 'br-trunk.101'

I did hit an issue with the wan setup though. My wan packets need to be tagged with vlan 0 (this is an AT&T gateway bypass setup). Before DSA, there was a separate eth1 interface I could use for the wan, and I could just specify option ifname 'eth1.0'. With DSA, it should be possible to specify option device 'wan.0' to send vlan-0 tagged packets to the wan port, but this doesn't work (the interface doesn't come up, with no obvious error message to be found). I believe this is a limitation of the DSA framework, as dmesg mentions uses of vlan 0 even before I added it in my network configs. I was able to work around the issue by plugging my wan segment into an external usb ethernet adapter instead of the wan port, and get surprisingly close to full gigabit/s performance after setting the IRQ affinity for the usb3 port: echo 2 > /proc/irq/43/smp_affinity

Hope this helps. I had to do a bit of research to get through the DSA transition, but I feel it went relatively smoothly except for the issue with vlan 0.

Ain’t VLAN0 normally a forbidden VLAN?

I'm not entirely sure what the standards say, I just know I need to have a vlan tag on my wan frames for things to work.
I think technically a vlan 0 tag should be called a 802.1p tag rather than a vlan tag ? doesn't really make a difference though; I need the tag to be on either way which I can specify by adding a .0 to non-DSA interface names, but doesn't seem to work with DSA interfaces currently.

0, 4095 are reserved, with

reserved value 0x000 indicates that the frame does not carry a VLAN ID

and VID1 frequently having special meaning but vendor-specific.

1 Like