huhuh! real-life testing required, but in the lab all seems fine…
let’s suppose we have 192.168.1.1 as a modem1 address, 192.168.2.1 as a modem2 address. 1.1.1.1 and 2.2.2.2 are fake addresses - they don’t exists nowhere, are used only for recursive routing building
we’ll check using 213.180.204.3 and 93.158.134.3 (those are ya.ru website)
/ip route
add dst-address=213.180.204.3/32 gateway=192.168.1.1 scope=10 target-scope=10
add dst-address=93.158.134.3/32 gateway=192.168.2.1 scope=10 target-scope=10
add dst-address=1.1.1.1/32 gateway=213.180.204.3 scope=30 target-scope=10 check-gateway=ping
add dst-address=2.2.2.2/32 gateway=93.158.134.3 scope=30 target-scope=10 check-gateway=ping
add gateway=1.1.1.1 routing-mark=ISP1 scope=30 target-scope=30
add gateway=2.2.2.2 routing-mark=ISP2 scope=30 target-scope=30
add distance=10 gateway=2.2.2.2 routing-mark=ISP1 scope=30 target-scope=30
add distance=10 gateway=1.1.1.1 routing-mark=ISP2 scope=30 target-scope=30
now, if both 213.180.204.3 (via 192.168.1.1) and 93.158.134.3 (via 192.168.2.1) are reachable, ‘ISP1’ routing table uses 192.168.1.1, ‘ISP2’ uses 192.168.2.1 as default gateway. if one of 213.180.204.3/93.158.134.3 stops responding to ping, all traffic is routed to another modem
comments are welcome =)