FailOver with 2 ISP and 2LANs

Hello everybody.

I need help about failover.
I have 2 LAN network and 2 ISPs.
LAN1(192.168.0.0/24) using ISP1(10.0.0.1), LAN2(192.168.1.0/24) using ISP2(10.0.1.1).
When ISP1 is down then use ISP2 it’s about only LAN1 network not LAN2.

192.168.0.0(LAN1) directly using 10.0.0.1(ISP1) when 10.0.0.1(ISP1) is down then use 10.0.1.1(ISP2)


What i do? please give me configuration and knowledge about this.

Please help me

Hey please someone help me

Use routing mark for selective routing of LAN1.

I’m doing that only for my APs so that the mobile devices always get internet connection and it works great.

network.jpg
ether1 is ISP2
ether2 is ISP1
ether3 is LAN1
ether4 is LAN2

LAN1 to ISP2
LAN2 to ISP1
I’m need only in LAN1 working with failover without loadbalancing. Please help me

Create this mangle rule in Firewall - Mangle :

Chain : prerouting
Src. Address : 192.168.0.0/24
Action : mark routing
New Routing Mark : LAN1


Create these 2 static routes in IP - Routes :

Dst. Address : 0.0.0.0/0
Gateway : ether2
Check Gateway : ping
Distance : 1
Routing Mark : LAN1

Dst. Address : 0.0.0.0/0
Gateway : ether1
Distance : 2
Routing Mark : LAN1