Hello,
I need a little help with mikrotik configuration.
I have a situation:
I have “subnet 1” on physical master port 1 (interface 1) and physical slave port 2 (interface 2)
I have “subnet 2” on physical master port 8 (interface 8)
I need to make a vlan on interface 8. Vlan must work as a slave of physical master port 1, that means vlan must be a part of “subnet 1”. Vlan have id tag 2 (for example).
Nonono…I think what kmish is saying is that he needs the tagged VLAN on port 8 to be on the same L2 broadcast domain as what is already on port 1.
To do this, you create the VLAN on port 8, then create a bridge, and put port 1 and the VLAN interface (but not port 8 itself) into the bridge.
Make sure that after you do this, you change the interface for any IP addresses on port 1 (e.g., gateway for subnet 1) to be on the bridge interface instead.
Do you have a device with a Switchchip? For those I have a different approach to archive that. What i usually do:
Only one Masterport all others salve of it.
All port on vlan-mode = secure
The CPU PORT on vlan-header=add-if-missing
After doing that i can handle vlan as i used to from switches.
I can add a vlan and assign port as members to it. If i want to have the Router to be a member of a vlan itself i need to add the cpu port as a vlan member and create a vlan interface over the master port.
Example config from a RB2011, note i renamed the gigabit ports to g1 to g5 and the sftp port is my master port
sfp(0) and Port 1 are trunks. 2-5 are untagged members of VLAN 2304
/interface ethernet switch port
set 0 vlan-header=add-if-missing vlan-mode=secure
set 1 vlan-header=add-if-missing vlan-mode=secure
set 2 default-vlan-id=2304 vlan-mode=secure
set 3 default-vlan-id=2304 vlan-mode=secure
set 4 default-vlan-id=2304 vlan-mode=secure
set 5 default-vlan-id=2304 vlan-mode=secure
unfortunately, I need 2 masterports, because I use mikrotik as a router for 2 networks,
therefore switchchip cant help here.
bridge is the only method, and it takes 100% cpu with speed about 250-300mbit/s (Routerboard 1100),
that is not good.
will try to find another way with configuring vlan on another switch before it comes to mikrotik.
Without a switch build into the device i would also suggest to add a seperate switch. Personally i avoid bridges as much as possible. Only use : as a loopback and as a connection of a radio with wired network.