Hello Mikrotik lovers,
I have been managing a few interconnected Mikrotik devices in my company for a few years now (I have routers, switches, APs, etc…)
But one issue I have never really been able to solve is VLANs. Indeed, I have the need to be able to have guests users on my network using both ethernet and wifi.
I have been able to successfuly do that using VLANs but I never really managed to have it really stable when it comes to wifi (latencies during handshake, impossibily to see other computers in the subnet).
To fix that once and for all, I have decided to create a simple setup to understand what is going on, but I am still stuck.
My test setup is as follows:
Router > Switch > AP
The router has a specific DHCP server for VLAN-tagged (40) packets.
The switch bidges a specific port through VLAN 40
The AP is a really dumb AP (all ports are bridged together, no firewall, nothing else than the interfaces and the bridge)
Today, the situation is as follows:
- If I connect the AP to a non-vlan-tagged port of the switch, it works as it should. (IP from main DHCP + access to internet)
- If I connect the AP to a vlan-tagged port of the switch, then when I try connecting to it over wifi, I do get an IP address in the guest subnet, but it takes time to connect and I end up having no internet access.
- If instead connect my computer directly over ethernet on the same port, it works as it should (IP from guest DHCP + access to internet).
- If I connect the AP directly on the main router on a port that is in the guest bridge, it works as it should (IP from guest DHCP + access to internet).
If you have any guesses on what could be the source of my problem, don’t hesitate to tell me. Maybe the MTU?
Thank you for your help!
Here is the configuration of the router:
[admin@Main-Router] /interface/vlan> print terse
0 R name=vlan40 mtu=1500 l2mtu=1576 mac-address=C4:AD:34:91:28:D3 arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=40 interface=sfp-sfpplus1 use-service-tag=no
[admin@Main-Router] /interface/bridge> print terse
1 R name="main-bridge" mtu=1500 actual-mtu=1500 l2mtu=1580 arp=enabled arp-timeout=auto mac-address=C4:AD:34:91:28:D3 protocol-mode=rstp fast-forward=yes igmp-snooping=no auto-mac=yes ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no
2 R name="guest-bridge" mtu=auto actual-mtu=1500 l2mtu=1576 arp=enabled arp-timeout=auto mac-address=C4:AD:34:91:28:D3 protocol-mode=rstp fast-forward=yes igmp-snooping=no auto-mac=yes ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no
[admin@Main-Router] /ip/dhcp-server> print terse
0 name=main-dhcp interface=main-bridge lease-time=10m address-pool=main-dhcp authoritative=yes use-radius=no lease-script=
1 name=guest-dhcp interface=guest-bridge lease-time=10m address-pool=guest-dhcp authoritative=yes use-radius=no lease-script=
[admin@Main-Router] /interface/bridge/port> print terse
0 interface=sfp-sfpplus1 bridge=main-bridge priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=no unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
1 interface=ether1 bridge=main-bridge priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=no unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
2 interface=vlan40 bridge=guest-bridge priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=no unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=disabled fast-leave=no
Here is the configuration of the switch:
[admin@Sub-switch] /interface/vlan> print terse
0 R name=vlan40 mtu=1500 l2mtu=1588 mac-address=C4:AD:34:8A:55:2B arp=enabled arp-timeout=auto loop-protect=default loop-protect-status=off loop-protect-send-interval=5s loop-protect-disable-time=5m vlan-id=40 interface=sfp-sfpplus1 use-service-tag=no
[admin@Sub-switch] /interface/bridge> print terse
0 R comment=defconf name=main-bridge mtu=auto actual-mtu=1500 l2mtu=1592 arp=enabled arp-timeout=auto mac-address=C4:AD:34:8A:55:13 protocol-mode=rstp fast-forward=yes igmp-snooping=no auto-mac=no admin-mac=C4:AD:34:8A:55:13 ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no
1 R name=guest-bridge mtu=auto actual-mtu=1500 l2mtu=1588 arp=enabled arp-timeout=auto mac-address=C4:AD:34:8A:55:2A protocol-mode=rstp fast-forward=yes igmp-snooping=no auto-mac=yes ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no
[admin@Sub-switch] /interface/bridge/port> print
0 interface=sfp-sfpplus1 bridge=main-bridge priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=no unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
1 H interface=ether1 bridge=main-bridge priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=no unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
2 H interface=ether2 bridge=guest-bridge priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=no unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
And the configuration of the AP:
[admin@AP] /interface/bridge> print terse
0 R name=bridge1 mtu=auto actual-mtu=1500 l2mtu=1560 arp=enabled arp-timeout=auto mac-address=48:A9:8A:E3:3C:26 protocol-mode=rstp fast-forward=yes igmp-snooping=no auto-mac=yes ageing-time=5m priority=0x8000 max-message-age=20s forward-delay=15s transmit-hold-count=6 vlan-filtering=no dhcp-snooping=no
[admin@AP] /interface/bridge/port> print terse
0 interface=ether1 bridge=bridge1 priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
1 I interface=ether2 bridge=bridge1 priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none hw=yes auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
2 interface=wifi1 bridge=bridge1 priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no
3 I interface=wifi2 bridge=bridge1 priority=0x80 path-cost=10 internal-path-cost=10 edge=auto point-to-point=auto learn=auto horizon=none auto-isolate=no restricted-role=no restricted-tcn=no pvid=1 frame-types=admit-all ingress-filtering=yes unknown-unicast-flood=yes unknown-multicast-flood=yes broadcast-flood=yes tag-stacking=no bpdu-guard=no trusted=no multicast-router=temporary-query fast-leave=no