Failover with ADSL and 3G Modem

Hello, I am trying to set up an IP route failover setup with an ADSL modem and 3G USB dongle. I managed to get the following to work when ether1 is not connected but when it is connected but there is no ADSL line, the routing gets confused and still thinks that ether1 is up.

/ip route
add dst-address=8.8.8.8 gateway=10.0.0.2 scope=10
add dst-address=8.8.4.4 gateway=10.0.0.2 scope=10
add dst-address=8.8.8.8 gateway=192.168.8.1 scope=10
add dst-address=8.8.4.4 gateway=192.168.8.1 scope=10
add dst-address=10.1.1.1 gateway=8.8.8.8 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.1.1.1 gateway=8.8.4.4 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.2.2.2 gateway=8.8.8.8 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.2.2.2 gateway=8.8.4.4 scope=10 target-scope=10 check-gateway=ping
add distance=1 gateway=10.1.1.1 routing-mark=ISP1
add distance=2 gateway=10.2.2.2 routing-mark=ISP1
add distance=1 gateway=10.2.2.2 routing-mark=ISP2
add distance=2 gateway=10.1.1.1 routing-mark=ISP2

10.0.0.2 is my adsl modem. 192.168.8.1 is my 3G dongle.

I want to essentially automatically failover to the 3G dongle and then fail back when the ADSL line comes back alive.

Your configuration lists 8.8.8.8 as a gateway. As this is a Google DNS server, I don’t think it’s correct.

It looks like you’re behind double NAT which complicates matters. By default RouterOS will ping the gatway to check it’s up, but in this case it’s pinging your modem / router rather than the ISPs gateway, so the connection can drop, but as far as the Mikrotik knows it’s still up.

Do you have a network diagram and the full config? You will probably have to script this.