Hi Guys,
I am having problem with getting VLAN Filtering to work. I am posting the configuration here and ask you guys to check and tell me if i am missing something, please. From my understanding, we can use VLAN filtering to simply vlans setup. I summarized a couple of points here, please correct me if i am wrong:
- we should avoid using Port based VLANs as it is the old type of configuration. which means we dont need to touch the VLAN configuration settings in /Interface switch vlan;
- the /interface switch port settings will regulate the traffic flow for this specific switch port with the combination effects of the VLAN Filtering set in /interface bridge vlan;
3, when we use VLAN filtering, we dont need to use /interface switch vlan, as /interface bridge vlan has more control over it.
I was trying to follow the instruction here https://wiki.mikrotik.com/wiki/Manual:Bridge_VLAN_Table#Trunk.2FAccess_port_setup with my own setup:
1, ether3 as trunk with vlan40 and vlan50;
2, ether4 is access port with vlan40;
3, ether5 is access port with vlan50;
But it doesnet seem I could get the vlan working. The hosts connected to ether4 and ether5 did not get valid IP and cannot ping the respected gateways with manual IP configured on the hosts.
Could you guys please tell me what I am missing or what I have done wrong?
the router configs are:
/interface vlan
add interface=bridge1 name=vlan40 vlan-id=40
add interface=bridge1 name=vlan50 vlan-id=50
/interface ethernet switch port
set 2 vlan-mode=secure
set 3 default-vlan-id=40 vlan-header=always-strip vlan-mode=secure
set 4 default-vlan-id=50 vlan-header=always-strip vlan-mode=secure
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=vlan40-pool ranges=192.168.40.20-192.168.40.200
add name=vlan50-pool ranges=192.168.50.20-192.168.50.200
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=vlan40-pool disabled=no interface=vlan40 name=
dhcp-server-vlan40
add address-pool=vlan50-pool disabled=no interface=vlan50 name=
dhcp-server-vlan50
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge1 comment=defconf interface=ether3
add bridge=bridge1 comment=defconf interface=ether4
add bridge=bridge1 comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=sfp1
add bridge=bridge comment=defconf interface=wlan1
add bridge=bridge comment=defconf interface=wlan2
/interface bridge vlan
add bridge=bridge1 tagged=ether3,bridge1 untagged=ether4 vlan-ids=40
add bridge=bridge1 tagged=ether3 untagged=ether5 vlan-ids=50
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=
192.168.88.0
add address=192.168.40.1/24 interface=vlan40 network=192.168.40.0
add address=192.168.50.1/24 interface=vlan50 network=192.168.50.0
/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=
ether1
/ip dhcp-server network
add address=192.168.40.0/24 dns-server=8.8.8.8 gateway=192.168.40.1
add address=192.168.50.0/24 dns-server=8.8.8.8 gateway=192.168.50.1
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
/ip firewall nat
add action=masquerade chain=srcnat comment=“defconf: masquerade”
ipsec-policy=out,none out-interface-list=WAN