Code: Select all
add interface=ether2 l2mtu=1594 name=trunk-10-phones vlan-id=10
add interface=ether2 l2mtu=1594 name=trunk-21-network vlan-id=21
add interface=ether2 l2mtu=1594 name=trunk-30-lan vlan-id=30
add interface=ether2 l2mtu=1594 name=trunk-10-phones vlan-id=10
add interface=ether2 l2mtu=1594 name=trunk-21-network vlan-id=21
add interface=ether2 l2mtu=1594 name=trunk-30-lan vlan-id=30
I have an access point connected to port2. This access point will be using native vlan of 21. How do I set the native vlan the MicroTik
Code: Select alladd interface=ether2 l2mtu=1594 name=trunk-10-phones vlan-id=10 add interface=ether2 l2mtu=1594 name=trunk-21-network vlan-id=21 add interface=ether2 l2mtu=1594 name=trunk-30-lan vlan-id=30
There is no direct command like there would be on a layer 2 VLAN-aware device. Some RouterBoard have switches which might help - or you can use bridges for some configurations but even that can't do everything that a VLAN-aware layer 2 device can typically do.Where do I set the native vlan to 21 on the MicroTik?
# jan/03/1970 09:15:49 by RouterOS 5.14
# software id = FP7P-M89C
#
/interface bridge
add l2mtu=1598 name=bridge-phones
add l2mtu=1598 name=bridge-network
add name=bridge-lan
add l2mtu=1600 name=bridge-public
/interface ethernet
set 1 speed=1Gbps
set 2 speed=1Gbps
set 3 speed=1Gbps
set 4 speed=1Gbps
set 5 speed=1Gbps
set 6 speed=1Gbps
/interface vlan
add interface=bridge-phones l2mtu=1594 name=vlan-10-phones vlan-id=10
add interface=bridge-network l2mtu=1594 name=vlan-21-network vlan-id=21
add interface=bridge-lan l2mtu=65531 name=vlan-30-lan vlan-id=30
add interface=ether2 l2mtu=1594 name=trunk-10-phones vlan-id=10
add interface=ether2 l2mtu=1594 name=trunk-21-network vlan-id=21
add interface=ether2 l2mtu=1594 name=trunk-30-lan vlan-id=30
/ip pool
add name=dhcp_pool2 ranges=10.105.10.100-10.105.10.199
add name=dhcp_pool3 ranges=10.105.30.100-10.105.30.199
add name=dhcp_pool4 ranges=10.105.21.100-10.105.21.199
/ip dhcp-server
add address-pool=dhcp_pool2 disabled=no interface=bridge-phones name=dhcp2
add address-pool=dhcp_pool3 disabled=no interface=bridge-lan name=dhcp3
add address-pool=dhcp_pool4 disabled=no interface=bridge-network name=dhcp4
/interface bridge port
add bridge=bridge-network interface=ether3
add bridge=bridge-network interface=ether4
add bridge=bridge-network interface=ether5
add bridge=bridge-network interface=ether6
add bridge=bridge-network interface=ether7
add bridge=bridge-network interface=ether8
add bridge=bridge-network interface=ether9
add bridge=bridge-phones interface=ether10
add bridge=bridge-public interface=ether13
add bridge=bridge-phones interface=ether1
/ip address
add address=10.105.10.254/24 interface=bridge-phones
add address=10.105.21.254/24 interface=bridge-network
add address=10.105.30.254/24 interface=bridge-lan
/ip dhcp-client
add disabled=no interface=bridge-public
/ip dhcp-server network
add address=10.105.10.0/24 dns-server=10.105.21.3,10.105.21.250 gateway=10.105.10.254
add address=10.105.21.0/24 dns-server=10.105.21.3,10.105.21.250 gateway=10.105.21.254
add address=10.105.30.0/24 dns-server=10.105.21.3,10.105.21.250 gateway=10.105.30.254
/ip dns
set allow-remote-requests=yes
/ip firewall filter
add chain=input comment="Accept established connections" connection-state=established
add chain=input comment="Accept related connections" connection-state=related
add action=drop chain=input comment="Drop invalid connections" connection-state=invalid
add chain=input comment=UDP protocol=udp
add chain=input comment="Allow limited pings" limit=50/5s,2 protocol=icmp
add action=drop chain=input comment="Drop excess pings" protocol=icmp
add chain=input comment=Phones in-interface=bridge-phones src-address=10.105.10.0/24
add chain=input comment=Network in-interface=bridge-network src-address=10.105.21.0/24
add chain=input comment=LAN in-interface=bridge-lan src-address=10.105.30.0/24
add action=log chain=input comment="Log everything else" log-prefix="DROP INPUT"
add action=drop chain=input comment="Drop everything else"
/ip firewall nat
add action=masquerade chain=srcnat src-address=10.105.10.0/24
add action=masquerade chain=srcnat src-address=10.105.21.0/24
add action=masquerade chain=srcnat src-address=10.105.30.0/24