VLAN bridge with filter problem (hEX)

Hi,

Previously I used a bunch of vlan-interfaces and a bridge for every vlan, but it become to cluttered. So since some month ago I now use the “single bridge” approach, however I can’t get it to work fully. This is my setup:

/interface bridge
add name=br0 protocol-mode=none

/interface bridge port
add bridge=br0 comment="trunk to ap2" interface=ether3
add bridge=br0 comment="trunk to sw3" interface=ether2
add bridge=br0 comment="access vlan30" interface=ether4 pvid=30

/interface bridge vlan
add bridge=br0 tagged=ether2,ether3 untagged=ether4 vlan-ids=30
add bridge=br0 tagged=ether2,ether3 vlan-ids=31-39

/interface vlan
add interface=br0 name=br0.30 vlan-id=30
add interface=br0 name=br0.35 vlan-id=35
add interface=br0 name=br0.39 vlan-id=39

/ip address
add address=192.168.30.1/24 interface=br0.30 network=192.168.30.0
add address=192.168.35.1/24 interface=br0.35 network=192.168.35.0
add address=192.168.39.1/24 interface=br0.39 network=192.168.39.0
  1. The access port just ether4 doesn’t work.
  2. When br0 gets vlan-filtering=yes, the router itself becomes unreachable by all VLAN addresses, however it seems to forward the trunk ports (?)

The hEX doesn’t have a VLAN aware switch chip (MT7621), but that can’t be the issue?
I have another bridge for the WAN side, that only has ether1 (to manually set mac-address)

What am I missing?

Most of VLAN settings on bridge don’t work unless you set vlan-filtering=yes on bridge. This might answer your question #1.

As to question #2: if you use vlan interfaces (br0.30, br0.35 and br0.39), you have to add bridge interface br0 as tagged member of relevant VLANs under /interface bridge vlan. In essence, br0 interface is a trunk port as well.

OK, Seems resonable that vlan-filtering is needed.

Adding the bridge as tagged member of itself solved it! Thanks!

Here is the result:

/interface bridge
add comment=bridge name=br0 protocol-mode=none vlan-filtering=yes

/interface bridge port
add bridge=br0 comment="trunk to ap2" interface=ether3
add bridge=br0 comment="trunk to sw3" interface=ether2
add bridge=br0 comment="access vlan30" frame-types=admit-only-untagged-and-priority-tagged interface=ether4 pvid=30

/interface bridge vlan
add bridge=br0 tagged=ether2,ether3,br0 untagged=ether4 vlan-ids=30
add bridge=br0 tagged=ether2,ether3,br0 vlan-ids=1,31-39

Awesome! Looks Good. THanks for sharing.