scripts to keep LTE stick up and running

I am sure that for an experienced member your proposed approach is easy and clean :slight_smile: , I was only doubting that it is easy for a newcomer.

We don’t know how complex the OP’s routing table is, but if it consists of just two gateways, one through the ISP ONT and one through the LTE, or - depending on the way the failover is implemented - another two for recursive, adding another route seems to me not that bad, of course if there are many routes in main, a separate routing table would be much cleaner.

Another possible approach could be Filo’s “reversed distance” one:
http://forum.mikrotik.com/t/simpler-failover-for-two-gateways-i-found-working/169108/1
(still with the pinging running in the background).

First thing would be anyway to check if pinging periodically is enough to keep the LTE alive.

In any case, the critical step I find needing to be taken into account is what to do when - for whatever reason - the main link is down AND the LTE is not responding,

If the timeout is 4 hours there is (unless I am missing something) no need to ping every n seconds, a set of a few pings (let’s say ten) every hour or so should do. :confused:

The idea of the disabling/reenabling periodically the LTE interface (besides some way to check if it actually worked) should be conditional, i.e. not happen if there was traffiic in the last three hours, maybe the script could check some counter on the LTE interface and not run if it is not 0 (or only run if it is 0).