Interconnect LAN & Gateway Routing

Hi All,

Have a question can this be done on MT?
I have 3 LAN i want to interconnect them so i can manage devices connected on every LAN
-br-lan - 10.1.1.0/24 - gw:10.1.1.254 (all client’s computers are connected here)
bridged ports: ether1,ether2,ether3,wlan1
-br-wlan - 10.1.2.0/24 - gw:10.1.2.254 (all mobile devices are connected here)
bridged ports: ether7, wlan2
-br-voip - 20.10.5.0/24 gw:20.10.5.254 (Servers & IP phones)
bridged ports: ether4,ether5,ether6
Also I have 3 ISP:
-ISP1(ether8- 1.1.1.1) - masquerade
-ISP2(ether9- 2.2.2.2) - masquerade
-ISP3(ether10-3.3.3.3) - masquerade
Heres i want to achieve i want to route an ip range on a specific ISP
Ex:
Routed to ISP1
10.1.1.1-10.1.1.50
10.1.2.1-10.1.1.50
Routed to ISP2
10.1.1.51.-10.1.1.150
10.1.2.51.-10.1.1.150
20.10.5.0/24
Routed to ISP3
10.1.1.151.-10.1.1.253
10.1.2.151.-10.1.1.253
When i do the routing it works however the LAN interconnection fails, i cannot ping devices of the other LAN.
Example: When im connected br-lan i cannot ping devices that is connected on other LAN also i cannot ping my gw 10.1.1.254
I’ve tried to add routes but it didnt work

10.1.1.0/24 → 10.1.2.254 → unreachable
10.1.2.0/24 → 10.1.1.254 → unreachable
20.10.5.0/24 → 10.1.1.254 → unreachable

Hope you can help me..thank you..

Hi,

At first i think you write mangle rules for you clients in “pre-route” chain with mark-route action from mangle table and in the MT routing table you write 3 default route with route-mark option specify, am i right?
So i think you must change your mangle rule with output chain in this scenario to see your “LAN’s network” and have your route mark to reach to the outside with specific address.

If you send your mangle and route table configuration (send export file) here i told you what exactly problem is.

Best Regards,

Are these writes or you just type them in wrong way?(address range with red mark that i marked)

Thank you sir for the reply..Im kinda new to MT, yes sir your right here is my firewall mangle rules and routes:

/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=\
    to_isp1 passthrough=yes src-address-list=ISP1
add action=mark-routing chain=prerouting  new-routing-mark=\
    to_isp2 passthrough=yes src-address-list=ISP2
add action=mark-routing chain=prerouting new-routing-mark=\
    to_isp3 passthrough=yes src-address-list=ISP3

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether8-isp1
add action=masquerade chain=srcnat out-interface=ether9-isp2
add action=masquerade chain=srcnat out-interface=ether10-isp3

/ip route
add check-gateway=ping comment=Route-isp1  distance=1 gateway=\
    1.1.1.1 routing-mark=to_isp1
add check-gateway=ping comment=Route-isp2-backup  distance=2 \
    gateway=2.2.2.2 routing-mark=to_isp2
add check-gateway=ping comment=Route-isp3-backup distance=3 \
    gateway=3.3.3.3 routing-mark=to_isp3
add check-gateway=ping comment=Route-isp2 distance=1 gateway=\
    2.2.2.2 routing-mark=to_isp2
add check-gateway=ping comment=Route-isp1-backup distance=2 \
    gateway=1.1.1.1 routing-mark=to_isp2
add check-gateway=ping comment=Route-isp3-backup distance=3 \
    gateway=3.3.3.3 routing-mark=to_isp2
add check-gateway=ping comment=Route-isp2-backup distance=3 gateway=\
    2.2.2.2 routing-mark=to_isp3
add check-gateway=ping comment=Route-isp3 distance=1 gateway=\
    3.3.3.3 routing-mark=to_isp3
add check-gateway=ping comment=Route-isp1-backup distance=2 \
    gateway=1.1.1.1 routing-mark=to_isp3
add distance=1 gateway=2.2.2.2
add distance=2 gateway=1.1.1.1
add distance=3 gateway=3.3.3.3

Yah sir its only a typo, below are the correct details:
Ex:
Routed to ISP1
10.1.1.1-10.1.1.50
10.1.2.1-10.1.2.50
Routed to ISP2
10.1.1.51.-10.1.1.150
10.1.2.51.-10.1.2.150
20.10.5.0/24
Routed to ISP3
10.1.1.151.-10.1.1.253
10.1.2.151.-10.1.2.253