I am looking for a solution for my router. firmware works fine. Sometimes my provider does work not fine, and the router loses connection. I have to manually update the connection and then everything works. I need a command or script to automatically update the connection. Suppose a router pings the site every 30 seconds (does not matter which one), and if the ping fails, the router should automatically refresh the connection. Internet works through dynamic address(just DHCP ip). I would be grateful for any hint in the decision.