VLAN filtering on a RouterOS bridge
Keep management reachable while enabling VLAN filtering.
After vlan-filtering=yes, the bridge must be an allowed member of any VLAN that needs to reach the router itself. Check management access before turning filtering on.
Example ports and VLANs
ether1carries tags for VLAN 10 (management), 20 (users) and 30 (cameras).ether2–ether5are untagged access ports in VLAN 20.- The management IP is 10.10.10.2/24 on VLAN 10.
Configure the membership first
/interface bridge add name=br0 vlan-filtering=no
/interface bridge port
add bridge=br0 interface=ether1
add bridge=br0 interface=ether2 pvid=20
add bridge=br0 interface=ether3 pvid=20
/interface bridge vlan
add bridge=br0 vlan-ids=10 tagged=br0,ether1
add bridge=br0 vlan-ids=20 tagged=br0,ether1 untagged=ether2,ether3
add bridge=br0 vlan-ids=30 tagged=ether1
/interface vlan add interface=br0 name=vlan10-mgmt vlan-id=10
/ip address add address=10.10.10.2/24 interface=vlan10-mgmt
Include tagged=br0 for VLANs that terminate at the router. Without that membership the VLAN cannot reach the bridge CPU port.
Verify vlan10-mgmt before enabling filtering. Use Safe Mode with Ctrl+X in the RouterOS terminal.
/interface bridge set br0 vlan-filtering=yes
Use Safe Mode or a separate management path such as a console. Safe Mode can undo changes when the management session is lost.
Verification
/interface bridge vlan print
/interface bridge host print where vid=10
Check that br0 appears in CURRENT-TAGGED for the management VLAN. Verify vlan-ids if it is missing.
On access ports consider frame-types=admit-only-untagged-and-priority-tagged. On a tagged-only trunk use admit-only-vlan-tagged.