I've successfully implemented the advanced routing failover using:
https://wiki.mikrotik.com/wiki/Advanced ... _Scripting
When the cable modem fails the connection switches over immediately to an LTE backup and that works well.
I've noticed, however, that when the cable modem resumes that during the connection cycle that it initially goes through the approach has trouble for around 50 seconds or so before successfully switching back.
I believe the route cause is that a route that has check-gateway = ping can become active even if the gateway IP address is not pingable. This happens in particular if the interface over which the gateway IP is routed goes down before the gateway becomes unreachable.
So the sequence that happens is:
1. Cable modem is fine... all gateway check IPs are pingable. (I use 3 instead of 2 for extra redundancy)
2. Cable modem goes down, interface goes down. The routes with the check-gateway = ping become inactive immediately because they cannot be routed to.
3. Cable modem starts coming back up (but doesn't fully negotiate the link with the ISP). The interface becomes active again.
4. THE PROBLEM: The routes with the check-gateway = ping become active again. This is true even though the gateway cannot be pinged. The default route switches back to the cable modem.
5. 20 seconds or so later, (two consecutive 10 second ping checks fail). The routes become inactive and we switch back to LTE.
6. This bounces back and forth a couple times before the cable modem link is fully up.
In step 4... if a route with a check-gateway was only activated if that gateway was pingable (seems sensible?) this issue wouldn't occur.
Does the above make sense and if so is that a feature we can get in the queue? An alternative is that the router should be trying to ping the gateway IPs even when the route isn't active so it knows their status at all times.
A