Under /interface ethernet switch vlan switch1-cpu passes traffic from the switch chip to the CPU, only required for VLANs connected to services provided by the CPU such as IP address, routing, DHCP server and software-based interfaces (tunnels, wireless).
Under /interface ethernet switch port use vlan-header=leave-as-is for the switch chip in the hAP ac as mentioned in the wiki and help pages.
Under interface wireless use both vlan-mode=use-tag AND vlan-id= to specify which VLAN the interface should be connected to.
Under /interface bridge port setting hw=yes for the wireless interfaces is pointless, the drivers are implemented in software.
It is confusing ! There are old methods, and newer methods. The documentation is not version aware. There are old-method tutorials on the web.
With the current ROS versions, the “bridge” method is preferred, and the “switch VLAN settings” should then not be used.
The “Bridge” is handling the switch settings with hardware offloading (hw=yes) . If one adds other switch settings besides what “bridge” does, there may be misconfiguration. of the switch.
Unless you clearly know what you are doing, “/interface ethernet switch vlan” should not be in the config.
Sometimes you want/need to do the VLAN filtering in the switch settings depending on the switch chip offloaded support.
Old method is: using bridges per VLAN, and define VLAN interfaces as port for those bridges
Old method is: doing all ethernet VLAN filtering with the switch settings
New method is handling VLAN with the bridge. Bridge VLAN definitions are for all ports, including WLAN and VPN.
VLAN distribution and tag/untag is done in the bridge without creating VLAN interfaces, if no VLAN access is needed for the router.
VLAN interface is only created if the router wants itself to use that VLAN as node in that VLAN. (e.g. as said above, for the DHCP server, DNS service, …)
Use hw-offloading to optimise performance. (Ability for HW offload and VLAN filtering is very switch chip dependent !!!)
There is still at least one option left open. VLAN tagging for a WLAN interface can be done in the bridge, or can be done in the wireless interface itself. A WLAN interface is VLAN aware on it’s own.
(it can send different clients to different VLANs)
Minor addition (I know, not applicable here with hap ac being mentioned in first post but I think it is useful to be mentioned for completeness): for those WLAN interfaces not using wifiwave2 package there is indeed a second option.
Otherwise it is bridge only (for those devices where wifiwave2 package has been applied)