It seems there are two ways to tag a single port under DSA, and I'm wondering if one is more suited in certain situations (e.g. for bridging a wireless network to the network interface). Can someone shed any clarity on that?
Since L2/L3 configuration was made more consistent right before releasing 22.03, I'm supposing both solutions operate on different levels, but my knowledge doesn't run deep enough to deduce if both or either are correct. I see both pop up in examples and other people's configurations, and my 'instinct' so to speak was to use the bridge VLAN for the AP and just the 802.1q device on the router, since that needs no bridging to a wireless interface. The 'mixed' setup works, so both seem to be valid solutions.
Setup type #1: Bridge VLAN
On my AP I currently have the trunk port set up with a bridge VLAN, and a WLAN interface associated with it. The port is part of the default 'LAN' bridge VLAN as well (untagged).
config bridge-vlan 'guest_vlan'
option device 'br-lan'
option vlan '20'
list ports 'lan0:t'
[...]
config interface 'guest'
option proto 'static' # I know the interface doesn't need an IP
option ipaddr '10.0.20.12/24' # and I can turn it to proto 'none'.
option device 'br-lan.20'
Setup type #2: 802.1q device
On my router, however, I decided to define a 802.1q device since there's no bridging needed. The port is also part of the default 'LAN' bridge VLAN, just like on the AP (untagged).
config device
option type '8021q'
option ifname 'p2'
option vid '20'
option name 'guest'
[...]
config interface 'guest'
option proto 'static'
option ip6assign '60'
option ipaddr '10.0.20.1/24'
option device 'guest'
option ip6hint '20'
I'm very curious. Thanks!