Computers with vlan-id=10 are connected to ports vlan10-eth1 and vlan10-eth2.
Code: Select all
/interface vlan
add name=vlan10-eth1 vlan-id=10 interface=ether1
add name=vlan20-eth1 vlan-id=20 interface=ether1
/interface vlan
add name=vlan10-eth2 vlan-id=10 interface=ether2
add name=vlan20-eth2 vlan-id=20 interface=ether2
/ip address
add address=192.168.10.1/24 interface=vlan10-eth1
add address=192.168.20.1/24 interface=vlan20-eth1
/ip address
add address=192.168.10.2/24 interface=vlan10-eth2
add address=192.168.20.2/24 interface=vlan20-eth2