Have you read that article? The trick is to have two static default routes, with different distances (the primary one has distance=1, the secondary has distance=2) which do not have the actual IP of the ISP as gateway but some public IP address which is always on. Individual /32 routes to such addresses must exist.
****So you have WAN subnet A and WAN subnet B. In each of them, you have your own address
X.X.X.own
and a gateway address
X.X.X.gw
. You attach them both to the same interface (e.g.,
ether1
):
/ip address add address=A.A.A.own/maskA interface=ether1
/ip address add address=B.B.B.own/maskB interface=ether1
Now you add two individual routes:
/ip route add dst=address=8.8.8.8 gateway=A.A.A.gw scope=10
/ip route add dst=address=8.8.4.4 gateway=B.B.B.gw scope=10
At this stage, pings to 8.8.8.8 will be sent via A.A.A.gw, so if the ISP puts link A down, they fail. Pings to 8.8.4.4 will be sent via B.B.B.gw, so they fail when ISP puts link B down.
Next, you create the two default routes as described above:
/ip route add check-gateway=ping gateway=8.8.8.8 scope=10 distance=1
/ip route add check-gateway=ping gateway=8.8.4.4 scope=10 distance=2
The scope parameter of all routes is critically important as otherwise the recursive gateway resolution does not work.
With this configuration, you should be able to access internet regarless which of the two uplinks would be currently active. Remember that existing sessions are broken each time the uplink changes as packets from your side start leaving from the other one of the two WAN addresses.
To permit devices on your LAN to work properly, you need to have a masquerade rule in place in the firewall:
/ip firewall nat add action=masquerade chain=srcnat out-interface=ether1
The masquerade handles automatically which of your WAN addresses to use for src-nat depending on the gateway used.