Hi,
I am using a Mikrotik hEX for about a year now to load balance and have a failover on two internet connexions (which works great).
I am segmenting my network into three sub networks. For technical reasons, two sub networks are connected to the Mikrotik on one ethernet as VLANS and one directly using a specific ethernet port.
My problem is that I can’t communicate with the VLANs from my LAN network and I don’t understand why.
I have
WAN 1 with IP : 192.168.1.2
Eth1
Eth2
WAN 2 with IP : 192.168.2.2
Eth 3
VLANIoT with IP : 192.168.48.1
Eth 4 - VID 48
VLANGuests with IP : 192.168.47.1
Eth 4 - VID 47
LAN with IP : 192.168.49.1
Eth 5
From 192.168.49.0/24 I can ping 192.168.48.1 but not any other devices on VLANIoT (same for VLANGuests)
From 192.168.47.0/24 I can ping any device in 192.168.48.0/24 and vice versa
Can someone please help me understand what I do wrong in my configuration? To start I’d like all networks (LAN, VLANIoT and VLANGuests) to be able to talk to each other. When that works I’ll make firewall rules to achieve my final goal.
I also tried to make it work by disabling all firewall rules without success.
Here is my full configuration (I use netwatch to achieve the failover and fallback of my two internet connections, I didn’t include those.).
# jul/10/2023 20:22:47 by RouterOS 7.9.2
# software id = 9M7P-7MZ6
#
# model = RB750Gr3
/interface bridge
add name=BrdgLAN
add disabled=yes name=BrdgVLAN
add name=BrdgWAN1
add name=BrdgWAN2
/interface vlan
add interface=ether4 name=VLANGuests vlan-id=47
add interface=ether4 name=VLANIoT vlan-id=48
/interface list
add name=LAN
add name=WAN1
add name=WAN2
add name=VLANS
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.47.2-192.168.47.254
add name=dhcp_pool2 ranges=192.168.48.2-192.168.48.254
/ip dhcp-server
add address-pool=dhcp_pool1 interface=VLANGuests name=dhcpVLANGuests
add address-pool=dhcp_pool2 interface=VLANIoT name=dhcpVLANIoT
/port
set 0 name=serial0
/routing table
add disabled=no fib name=to_WAN1
add disabled=no fib name=to_WAN2
/interface bridge port
add bridge=BrdgWAN1 interface=ether1
add bridge=BrdgWAN1 interface=ether2
add bridge=BrdgWAN2 interface=ether3
add bridge=BrdgLAN interface=ether5
/ip neighbor discovery-settings
set discover-interface-list=all
/interface list member
add interface=BrdgLAN list=LAN
add interface=BrdgWAN1 list=WAN1
add interface=BrdgWAN2 list=WAN2
add disabled=yes interface=BrdgVLAN list=VLANS
/ip address
add address=192.168.1.2/24 interface=BrdgWAN1 network=192.168.1.0
add address=192.168.2.2/24 interface=BrdgWAN2 network=192.168.2.0
add address=192.168.49.1/24 interface=BrdgLAN network=192.168.49.0
add address=192.168.47.1/24 interface=VLANGuests network=192.168.47.0
add address=192.168.48.1/24 interface=VLANIoT network=192.168.48.0
/ip dhcp-server network
add address=192.168.47.0/24 comment="Guests Network" gateway=192.168.47.1
add address=192.168.48.0/24 comment="IoT Network" gateway=192.168.48.1
add address=192.168.49.0/24 comment="LAN network" gateway=192.168.49.1
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,195.130.130.1,195.238.2.21
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=accept chain=forward comment="Test access VLANS from LAN" \
disabled=yes in-interface-list=LAN out-interface-list=VLANS
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=*2000010
/ip firewall mangle
add action=accept chain=prerouting dst-address=192.168.1.0/24 \
in-interface-list=LAN
add action=accept chain=prerouting dst-address=192.168.2.0/24 \
in-interface-list=LAN
add action=mark-connection chain=prerouting comment="WAN to LAN" \
connection-mark=no-mark in-interface-list=WAN1 new-connection-mark=\
WAN1_conn passthrough=yes
add action=mark-connection chain=prerouting comment="WAN to LAN" \
connection-mark=no-mark in-interface-list=WAN2 new-connection-mark=\
WAN2_conn passthrough=yes
add action=mark-connection chain=prerouting comment="PCC mangles - Connexion m\
ark - 1/4 Proximus - Deactivate to redirect everything to No per connexio\
n class" connection-mark=no-mark disabled=yes dst-address-type=!local \
in-interface-list=LAN new-connection-mark=WAN1_conn passthrough=yes \
per-connection-classifier=both-addresses:4/1
add action=mark-connection chain=prerouting comment="PCC mangles - Connexion m\
ark - 1/2 Telenet - Deactivate to redirect everything to No per connexion \
class" connection-mark=no-mark disabled=yes dst-address-type=!local \
in-interface-list=LAN new-connection-mark=WAN2_conn passthrough=yes \
per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=prerouting comment=\
"PCC mangles - Connexion mark - No per connection class. To Telenet" \
connection-mark=no-mark disabled=yes dst-address-type=!local \
in-interface-list=LAN new-connection-mark=WAN2_conn passthrough=yes
add action=mark-connection chain=prerouting comment=\
"PCC mangles - Connexion mark - No per connection class. To Proximus" \
connection-mark=no-mark dst-address-type=!local in-interface-list=LAN \
new-connection-mark=WAN1_conn passthrough=yes
add action=mark-routing chain=prerouting comment=\
"PCC mangles - Routing mark prerouting" connection-mark=WAN1_conn \
in-interface-list=LAN new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=prerouting comment=\
"PCC mangles - Routing mark prerouting" connection-mark=WAN2_conn \
in-interface-list=LAN new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=output comment=\
"PCC mangles - Routing mark output" connection-mark=WAN1_conn \
dst-address-type=!local new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output comment=\
"PCC mangles - Routing mark output" connection-mark=WAN2_conn \
dst-address-type=!local new-routing-mark=to_WAN2 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat ipsec-policy=out,none out-interface-list=\
WAN1
add action=masquerade chain=srcnat ipsec-policy=out,none out-interface-list=\
WAN2
/ip route
add comment="Google DNS 2" disabled=no distance=1 dst-address=8.8.4.4/32 \
gateway=192.168.1.1 pref-src="" routing-table=main scope=30 \
suppress-hw-offload=no target-scope=10
add comment="ISP2 - Telenet main DNS for netwatch" disabled=no distance=1 \
dst-address=195.130.130.1/32 gateway=192.168.2.1 pref-src="" \
routing-table=main scope=10 suppress-hw-offload=no target-scope=10
add comment="ISP1 - Proximus main DNS for netwatch" disabled=no distance=1 \
dst-address=195.238.2.21/32 gateway=192.168.1.1 pref-src="" \
routing-table=main scope=10 suppress-hw-offload=no target-scope=10
add comment="Proximus DNS 2" disabled=no distance=1 dst-address=\
195.238.2.22/32 gateway=192.168.1.1 pref-src="" routing-table=main scope=\
10 suppress-hw-offload=no target-scope=10
add comment="Google DNS 1" disabled=no distance=1 dst-address=8.8.8.8/32 \
gateway=192.168.1.1 pref-src="" routing-table=main scope=10 \
suppress-hw-offload=no target-scope=10
add comment="Telenet DNS 3" disabled=no distance=1 dst-address=\
195.130.131.1/32 gateway=192.168.2.1 pref-src="" routing-table=main \
scope=10 suppress-hw-offload=no target-scope=10
add comment="Telenet DNS 2" disabled=no distance=1 dst-address=\
195.130.130.2/32 gateway=192.168.2.1 pref-src="" routing-table=main \
scope=10 suppress-hw-offload=no target-scope=10
add comment=RouteWAN1Mark disabled=no dst-address=0.0.0.0/0 gateway=\
192.168.1.1 routing-table=to_WAN1 suppress-hw-offload=no
add comment=RouteWAN2Mark disabled=no dst-address=0.0.0.0/0 gateway=\
192.168.2.1 routing-table=to_WAN2 suppress-hw-offload=no
add comment=RouteWAN1 disabled=no dst-address=0.0.0.0/0 gateway=192.168.1.1 \
routing-table=main suppress-hw-offload=no
add comment=RouteWAN2 disabled=no dst-address=0.0.0.0/0 gateway=192.168.2.1 \
routing-table=main suppress-hw-offload=no