Hi, I’ve had a MikroTik RB4011iGS+ for a while now, but I’m finally looking at putting it to good use as my main router. It’s replacing a PFSense router. I’ve learned a lot about subtle quirks of this router’s configuration, limitations of the switch chip with VLANs, etc.
I think I have everything working in the current config except one thing – for some reason I can’t get the router to route packets between VLANs. All VLANs can talk to the router, DHCP, even NAT to the wan, but they can’t talk to each other. I even see the dynamic routes added for each subnet. From everything I’ve read, this should just happen automatically. It’s quite strange.
The router can ping all hosts, but no hosts ping or make TCP connections across subnets (and no, these aren’t Windows hosts). I’ve tried ridiculously permissive firewall rules, static routes, mangle preroute rules. Nothing seems to make any difference and I’ve been beating my head against the wall for days now.
The basic setup is I have ether5 as a trunk with 4 VLANs that will have different levels of access to each other. Ether1 is the WAN connection that comes in untagged, but gets tagged as VLAN 2. pvid=4094 is just a random unused vlan tag from prior problems I was having with untagged traffic on the trunk port. I think I have Layer 2 ironed out and working now. This appears to be a layer 3 problem…
# oct/21/2020 13:13:11 by RouterOS 6.47.4
#
# model = RB4011iGS+
/interface vlan
add interface=local name=guest vlan-id=4
add interface=local name=lan vlan-id=1
add interface=local name=priv vlan-id=8
add interface=local name=wan vlan-id=2
add interface=local name=wggw vlan-id=16
/interface bridge
add fast-forward=no name=local protocol-mode=none pvid=4094 vlan-filtering=yes
/interface bridge port
add bridge=local hw=no interface=ether1 pvid=2
add bridge=local hw=no interface=ether2
add bridge=local hw=no interface=ether5 pvid=4094
/interface bridge vlan
add bridge=local tagged=ether5,local vlan-ids=1
add bridge=local tagged=local vlan-ids=2
add bridge=local tagged=ether5,local vlan-ids=4
add bridge=local tagged=ether5,local vlan-ids=8
add bridge=local tagged=ether5,local vlan-ids=16
/ip pool
add name=dhcp_pool0 ranges=10.0.1.100-10.0.1.254
add name=dhcp_pool1 ranges=10.0.2.100-10.0.2.254
add name=dhcp_pool2 ranges=10.0.3.100-10.0.3.254
add name=dhcp_pool3 ranges=10.0.4.100-10.0.4.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=lan lease-time=2h name=dhcp1
add address-pool=dhcp_pool1 disabled=no interface=guest lease-time=2h name=dhcp2
add address-pool=dhcp_pool2 disabled=no interface=priv lease-time=2h name=dhcp3
add address-pool=dhcp_pool3 disabled=no interface=wggw lease-time=2h name=dhcp4
/ip address
add address=10.0.1.1/24 interface=lan network=10.0.1.0
add address=10.0.2.1/24 interface=guest network=10.0.2.0
add address=10.0.3.1/24 interface=priv network=10.0.3.0
add address=10.0.4.1/24 interface=wggw network=10.0.4.0
/ip dhcp-client
add disabled=no interface=wan
/ip dhcp-server network
add address=10.0.1.0/24 dns-server=10.0.1.1 gateway=10.0.1.1
add address=10.0.2.0/24 dns-server=10.0.2.1,XXX.XXX.XXX.XXX gateway=10.0.2.1
add address=10.0.3.0/24 dns-server=10.0.3.1,XXX.XXX.XXX.XXX gateway=10.0.3.1
add address=10.0.4.0/24 dns-server=10.0.4.1,XXX.XXX.XXX.XXX gateway=10.0.4.1
/ip firewall filter
add action=accept chain=input comment="accept established,related" connection-state=established,related
add action=drop chain=input connection-state=invalid
add action=accept chain=input comment="allow ICMP" in-interface=wan protocol=icmp
add action=drop chain=input comment="block everything else" in-interface=wan
add action=fasttrack-connection chain=forward comment="fast-track for established conn" connection-state=established,related
add action=accept chain=forward comment="accept established conns" connection-state=established,related
add action=drop chain=forward connection-state=invalid
add action=drop chain=forward comment="drop access to clients behind NAT from WAN" connection-nat-state=!dstnat \
connection-state=new in-interface=wan
/ip firewall nat
add action=masquerade chain=srcnat out-interface=wan
The routing table seems to be populated with dynamic routes to cover this
/ip route print
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 XXX.XXX.XXX.XXX 1
1 ADC 10.0.1.0/24 10.0.1.1 lan 0
2 ADC 10.0.2.0/24 10.0.2.1 guest 0
3 ADC XXX.XXX.XXX.XXX/19 XXX.XXX.XXX.XXX wan 0
4 ADC 10.0.3.0/24 10.0.3.1 priv 0
5 ADC 10.0.4.0/24 10.0.4.1 wggw 0
In the end, I can’t get any traffic across VLANs! They can all hit the router and get to the WAN, but not to each other. Very strange. I am fairly new to RouterOS, so hopefully I’ve just missed something obvious.
Any feedback is greatly appreciated!