Bridge for tagged and untagged traffic

Hello,

I did not understan from the manuals if a configuration like this could create logical loops or other problems:

/interface bridge
add name=bridge1-untagged
add name=bridge2-Vlan2
add name=bridge3-Vlan3

/interface vlan
add interface=ether1 name=vlan-2a vlan-id=2
add interface=ether2 name=vlan-2b vlan-id=2
add interface=ether3 name=vlan-2c vlan-id=2
add interface=ether1 name=vlan-3a vlan-id=3
add interface=ether2 name=vlan-3b vlan-id=3
add interface=ether3 name=vlan-3c vlan-id=3

/interface bridge port
add bridge=bridge1-untagged interface=ether1
add bridge=bridge1-untagged interface=ether2
add bridge=bridge1-untagged interface=ether3

add bridge=bridge2-Vlan2 interface=vlan-2a
add bridge=bridge2-Vlan2 interface=vlan-2b
add bridge=bridge2-Vlan2 interface=vlan-2c

add bridge=bridge3-Vlan3 interface=vlan-3a
add bridge=bridge3-Vlan3 interface=vlan-3b
add bridge=bridge3-Vlan3 interface=vlan-3c

/ip address
add address=192.168.1.1/24 interface=bridge1-untagged

Practically I will bridge the untagged ethernet ports (with the configured ip address) together.
Does this bridge include automatically the tagged traffic?

Thank you

The answer to your question greatly depends on if your Mikrotik has a switch chip. See http://forum.mikrotik.com/t/tag-and-and-untagged-on-same-port/105095/1

If you bridge the physical interfaces, then the tagged AND untagged traffic will be passed.

Think of a bridge as being almost exactly like a dumb switch (until v6.41 when the bridges become vlan-aware) - it will forward the frames regardless of whether they’ve got 802.1q headers - so long as the header+payload all fits within the device’s L2MTU.

So - if you just make bridge1 and add ports ether1 and ether2, then all traffic will pass between those ports - tagged and untagged alike.

If you add a vlan interface to some physical interface (e.g. make an interface “MyVLAN” and connect it to ether1 and set the tag=101) and then add that vlan interface to your bridge as a port, then the bridge will receive traffic from that vlan (101 in this example) but with the tags stripped.

I’ve lately learned that it’s better to configure vlan on bridge interface than on etherX interface. Then use the switch menu to control what to tag or untag. How the switch menu works highly depends on the switch chip - they all seems to behave differently, and I have to say the switch vlan config is very confusing. I tend to lock my self out of from the unit at least once every time I try to do this configuration. Do take backup before you start playing with this, and use safe mode.
I’ve even experienced doing switch vlan config on a test-router - copied config from prod-router to test router before I started. Then, when I got it working I did export and used it to make a script ready to run on the prod-router. Restored the test-router to the state before I started playing with vlan, tested that the script I wrote actually worked, then ran the script on the prod-router and got locked out! Test and prod routers were same model, running same ros version!

I agree about the switch menu’s VLAN configuration. It’s complicated enough that I just decided not to bother with it.

Don’t forget that all of this is being overhauled right now in v6.41rcX versions… I need to drop that on a test unit and start kicking the tires.