Most of the switches in my homelab are MikroTik CRS switches, although I am getting a UniFi PoE switch (MikroTik didn’t make a 2.5G PoE switch, that’s why).
I use two CRS304-4XG-IN switches to connect desktop computers to the 10G LAN, but wanted my desktops on a separate VLAN.
On my network, I use VLAN 4 for desktops.
The configuration you need is:
/interface bridge
add admin-mac=XX:XX:XX:XX:XX:XX auto-mac=no name=bridge vlan-filtering=yes
/interface bridge port
add bridge=bridge comment=defconf interface=ether1
add bridge=bridge comment=defconf interface=ether2 pvid=4
add bridge=bridge comment=defconf interface=ether3 pvid=4
add bridge=bridge comment=defconf interface=ether4 pvid=4
add bridge=bridge comment=defconf interface=ether5
/interface bridge vlan
add bridge=bridge tagged=ether1 untagged=ether2,ether3,ether4 vlan-ids=4
The bold parts are important, and I will explain what they are:
vlan-filtering=yesin the/interface bridgemeans you will filter for VLANs. This is required for VLAN trunk/access ports.pvid=4in the/interface bridge portmeans the specific port will use VLAN 4.- tagged=ether1 in the /interface bridge vlan means the trunk/tagged port is ether1.
untagged=ether2,ether3,ether4means the ether2-4 ports are access portsvlan-ids=4means we are establishing a bridge on VLAN 4.
Hopefully, this helps you set up VLAN trunking on a MikroTik CRS/RouterOS switch.
Leave a Reply