Hi, recently i purchuased my first routerboard RB450G and upgraded it to latest stable RouterOS v4.2
Now i’m trying to configure the five-port switch chip present on the board following way:
port ether1 is part of VLAN 1, vlan 1 is native (untagged) for this port (this means that all untagged traffic entering the port shall be part of VLAN 1 and all VLAN 1 traffic leaving the port shall be stripped of it’s vlan tag)
port ether2 is part of VLAN 1 and VLAN 2, vlan 1 is native (untagged) for this port.
port ether3 - ether5 are all part of VLAN 2 and vlan 2 is native (untagged) for those ports.
I know that this setup can be probably done using bridging of physical and vlan interfaces, but that would (as far as i know) have negative performance implications (as the swith chip can pass the packets at wire speed, while bridging will use CPU).
Thanks, i’ll experiment with “new-vlan-id” later today. If the documentation is correct, then you can strip the vlan header by setting the new-vlan-id to 0.
What i don’t understand is, what traffic is affected by those switch rules. Is it only incoming traffic or both incoming and outgoing? It’s real shame that there is no match rule for this. (But maybe i can workaround this by using the src-mac and dst-mac matching rules).
So my final config is mixture of switching and bridging and it does more or less what i want.
Ports ether1 and ether2 are bridged together into brWan bridge.
Ports ether3 - ether5 are switched together with master-port being ether3.
There is an VLAN interface attached to brWan, which is named ‘lan’, has VLAN ID 2 and is bridged together with port ether3 into brLan bridge.
Untagged traffic (vlan id 0) is allowed to pass through all switch ports. Additionaly, vlan ID 2 is allowed for port ether2. All ports vlan filtering is set to “secure”.
There is one ip address assigned to each brLan and brWan interface.