Mikrotik Bridge vlan tagged untagged

#Mikrotik#Bridge#vlan#tagged#untagged

/interface ethernet
set [ find default-name=ether3 ] comment=”Vlan-200″
set [ find default-name=ether4 ] comment=”Vlan-200″
set [ find default-name=ether5 ] comment=”Vlan-200″

/interface vlan
add comment=”Vlan-200″ interface=BRIDGE-TEST name=Vlan-200 vlan-id=200
add comment=”Vlan-100″ interface=BRIDGE-TEST name=Vlan-100 vlan-id=100
add comment=”Vlan-300″ interface=BRIDGE-TEST name=Vlan-300 vlan-id=300

/interface bridge port
add bridge=BRIDGE-TEST interface=ether6
add bridge=BRIDGE-TEST comment=Vlan-200 hw=no interface=ether5 pvid=200
add bridge=BRIDGE-TEST comment=Vlan-200 hw=no interface=ether4 pvid=200
add bridge=BRIDGE-TEST comment=Vlan-200 hw=no interface=ether3 pvid=200
add bridge=BRIDGE-TEST interface=ether2
add bridge=BRIDGE-TEST interface=ether1

/interface bridge settings
set use-ip-firewall=yes use-ip-firewall-for-vlan=yes

/interface bridge vlan
add bridge=BRIDGE-TEST tagged=BRIDGE-TEST untagged=ether3,ether4,ether5 vlan-ids=200

/ip address
add address=10.200.80.1/24 comment=”LAN-1 (Vlan-200)” interface=Vlan-200 network=10.200.80.0
add address=10.200.81.1/24 comment=”LAN-2 (Vlan-100)” interface=Vlan-100 network=10.200.81.0
add address=10.100.84.1/24 comment=”LAN-3 (Vlan-300)” interface=Vlan-300 network=10.100.84.0

/ip pool
add name=dhcp_pool22 ranges=10.200.80.21-10.200.80.254
add name=dhcp_pool23 ranges=10.200.81.21-10.200.81.254
add name=dhcp_pool24 ranges=10.100.84.21-10.100.84.254

/ip dhcp-server
add address-pool=dhcp_pool22 disabled=no interface=Vlan-200 lease-time=3d name=dhcp1
add address-pool=dhcp_pool23 disabled=no interface=Vlan-100 lease-time=3d name=dhcp2
add address-pool=dhcp_pool24 disabled=no interface=Vlan-300 lease-time=3d name=dhcp3

/ip dhcp-server network
add address=10.200.81.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=10.200.81.1
add address=10.100.84.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=10.100.84.1
add address=10.200.80.0/24 dns-server=8.8.8.8,1.1.1.1 gateway=10.200.80.1

/interface bridge
add admin-mac=64:D1:54:69:9B:D8 auto-mac=no fast-forward=no name=BRIDGE-TEST vlan-filtering=yes

You may also like...

Leave a Reply

Your email address will not be published.