TL;DR: see questions at the end; attached full config as file
Background
I run many hEX PoE “routers” as managed switches, that are powered by PoE and pass PoE to e.g. security cameras. While this is an old device, it’s currently the only device in MT’s lineup that can do that. While it’s old it still contains a quite powerful switch chip. It doesn’t support now-preferred wire-speed bridge VLAN filtering, but instead requires manual switch chip config. No complains here - it’s an old device.
Recently playing with one of the switches I managed to make it stop passing traffic and it took me a while to isolate the issue. I prepared a reproducer.
Test setup

To configure this simple setup I reset the device to factory defaults without default config. Next I replicated setup from my production switch. This setup does work and passes traffic as expected, i.e. 2nd port is an access for TRUSTED vlan 10, ports 3 & 4 are access for CAMS vlan 20, and port 5 is correctly a trunk for all uplink VLANs. This setup does not follow documentation!
/interface/ethernet/switch/vlan
add switch=switch1 vlan-id=10 ports=ether1,ether2,ether5 comment="TRUSTED (10)"
add switch=switch1 vlan-id=20 ports=ether1,ether5,switch1-cpu comment="MGMT (20)"
add switch=switch1 vlan-id=30 ports=ether1,ether3,ether4,ether5 comment="CAMS (30)"
/interface/ethernet/switch/port
# leave ether1 as is (trunk uplink)
set default-vlan-id=10 [find name=ether2]
set default-vlan-id=30 [find name=ether3]
set default-vlan-id=30 [find name=ether4]
# leave ether5 as is (trunk downlink)
# per docs (https://help.mikrotik.com/docs/spaces/ROS/pages/15302988/Switch+Chip+Features#SwitchChipFeatures-PortSettings)
set vlan-header=leave-as-is [find]
set vlan-mode=secure [find]
What is a MikroTik RouterOS bridge?
Let me be clear again: the config above doesn’t follow MT’s examples as it does not include a bridge with all ports added to it as described in manual switch chip config. I never did that for these devices and it did work, so I didn’t think twice about it as why would I add ports that don’t have traffic going to the cpu to a software bridge? Well, except for one - management access. I added the following config:
/interface/bridge/port add bridge=bridge1-vlan-master interface=ether1
/interface/vlan/add name=vlan20-mgmt interface=bridge1-vlan-master vlan-id=20
/ip/dhcp-client/add interface=vlan20-mgmt
A bug in bridge implementation?
This config does work as well. However, a true magic/bug happens. If you add a port that has no business routing any traffic to the CPU nor is a part of a VLAN that touches CPU it will break upon being disabled:
/interface/bridge/port/add bridge=bridge1-vlan-master interface=ether2
/interface/bridge/port/set disabled=yes [find interface=ether2]
/interface/bridge/port/set disabled=no [find interface=ether2]
This config above will cause the traffic on port to stop working for a few seconds when the port is added to the bridge, which is normal. However, disabling or deleting this port at this point from the bridge will make the port stop passing traffic. This isn’t something I would expect as ether2 doesn’t have any config suggesting traffic touching the CPU. Re-enabling the port on bridge fixes it. However, leaving the port assignment on the bridge disabled and then rebooting also fixes the issue (huh?!). Disabling hw acceleration on this port assignment has the same effect as disabling the assignment.
Questions
- Am I doing/understanding something incorrectly here? The config is as simple as it gets in my books but maybe I have some fundamental misunderstanding that I held for years

- What internally is the point of adding switch-only ports to a bridge on devices that do not support bridge VLAN filtering?
It appears that it does something undefined. The only trace of that is MikroTik’s examples putting all ports under a “software” bridge. However, it “appears” that the switch is functioning properly without that under most circumstances?
- The documentation in multiple places contains a cryptic note for QCA8337:
On QCA8337 and Atheros8327 switch chips, a default vlan-header=leave-as-is property should be used. The switch chip will determine which ports are access ports by using the default-vlan-id property. The default-vlan-id should only be used on access/hybrid ports to specify which VLAN the untagged ingress traffic is assigned to.
This isn’t a rule I normally follow, but instead I always set “vlan-header” accordingly as “always-strip” for access ports and “add-if-missing” for trunk ports. This seems incorrect for these 2 chipsets. Can someone explain reasoning behind this note in docs/why is there/what happens if you actually set it as not “leave-as-is” and if there any real-world consequences/incompatibilities with these chips vs others that don’t have this strange requirement?
full-config-export.rsc (1.08 KB)