How to detect WAN link failure and restart its DHCP?

I'm looking for advice on how to monitor a flaky cable modem/internet provider and reacquire a lease when my router detects the modem flaked out. Netgear R7800, running 19.07.6

Every so often, the cable modem (provided by my ISP, sorry I can't replace it with my own model) resets itself and reboots. After it finishes rebooting, the WAN link is inoperative until the router renews/reacquires its DHCP IPv4 lease. Once the router renews/acquires a lease, all is well again until the flaky ISP/modem reboots again.

I am not certain whether the ethernet link to the modem recycles when the modem reboots, so that may not be a reliable I haven't found a simple way to monitor the ethernet link: for example, hotplug doesn't fire any events when I disconnect the ethernet cable.
I also don't know how long the ethernet link might be down, if it's very quick to reset then this wouldn't be reliable enough.

Is there a package that has a monitor that you would recommend? Something that could check for network connectivity frequently (several times a minute) and restart the WAN link's DHCP client if it detects a failure for more than a short period of time?
I found mwan3 through some web searching but I'm not sure that's quite the right fit since I have only one WAN link. Does it have enough flexibility to recycle the one-and-only WAN link if it detects failure?

Any other recommendations?

1 Like
1 Like

Thank you! I'd seen watchcat before but didn't notice the updates on the latest branch (19.07.6 doesn't have the interface restart options in its version).

The tethering restart has a script I can reuse/adapt to be a periodic check on the default WAN route.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.