Hy!
I have a simple MikroTik router configuration. I have 2 WAN connection (WAN1-dhcp client, WAN2-ppp client) and I have 2 LAN (LAN1 and LAN2). The first case resolved by me, but I have no ideo for the second case.
The first case: LAN1 use WAN1 internet and LAN2 use WAN2 internet. I used mangle rule for it:
LAN1: 192.168.10.0/24
LAN2: 192.168.20.0/24
/ip firewall mangle
add action=mark-routing chain=prerouting new-routing-mark=LAN1_to_WAN1 \
passthrough=yes src-address=192.168.10.0/24
add action=mark-routing chain=prerouting new-routing-mark=LAN2_to_WAN2 \
passthrough=yes src-address=192.168.20.0/24
/ip firewall nat
add action=masquerade chain=srcnat comment=WAN1 out-interface=ether5-WAN1
add action=masquerade chain=srcnat comment=WAN2 out-interface=ppp-out1-WAN2
/ip route
add distance=1 gateway=10.0.1.254 routing-mark=LAN1_to_WAN1
add distance=1 gateway=ppp-out1-WAN2 routing-mark=LAN2_to_WAN2
It works fine, the LAN1 clients use the WAN1 internet, the LAN2 clients use the WAN2.
The second case:
When there isn’t WAN1 internet connection, the LAN1 use the WAN2 internet, and after the WAN1 internet is go back online, the LAN1 use the WAN1 internet again.
When there isn’t WAN2 internet connection, the LAN2 use the WAN1 internet, and after the WAN2 internet is go back online, the LAN2 use the WAN2 internet again.
How can I do it this failover configuration?
Thanks for Your help!