Every two or three weeks, my network (DSL) goes down. "rcnetwork start" brings it right back up, but that's a nuisance. I want it to restart automatically, if possible. If all else fails, I can write a short script that checks every five minutes or so and restarts it if it's down. But I'd much rather have a configuration in the distribution that I can set for auto-restart. Is there such a thing?
On Tuesday 06 January 2004 19:54, Daryl Lee wrote:
Every two or three weeks, my network (DSL) goes down. "rcnetwork start" brings it right back up, but that's a nuisance. I want it to restart automatically, if possible. If all else fails, I can write a short script that checks every five minutes or so and restarts it if it's down. But I'd much rather have a configuration in the distribution that I can set for auto-restart. Is there such a thing?
Generally you will find this with DSL, they plan it to drop you periodically. Dial on demand will usually do the the "fake" dial to re-establish a connection. We have an office in Australia, on Adsl, and we finally found a script that worked to keep it on line for months at a time. It involved sending a ping until 1 is returned and setting the Quality of Service flags. What you set does not seem to matter, most dsl are designed to ignore ping packets when deciding to go off line, but the test seems specific to the generic form and any qos bits set seems to out smart them. Should the script decide it is in fact down, it does a cinternet command to dial up again. Since putting in that, its been rock solid. -- _____________________________________ John Andersen
On Wed, 7 Jan 2004 15:54, Daryl Lee wrote:
Every two or three weeks, my network (DSL) goes down. "rcnetwork start" brings it right back up, but that's a nuisance. I want it to restart automatically, if possible. If all else fails, I can write a short script that checks every five minutes or so and restarts it if it's down. But I'd much rather have a configuration in the distribution that I can set for auto-restart. Is there such a thing?
I use the following script to reconnect the ADSL connection. It is run by CRON every 10 minutes. It is not the greatest script but it works. ------------------------------ Reconnect_DSL.sh ------------------------------ #!/bin/bash # # Script to check if ADSL is disconnected & try reconnecting # result=$(cinternet -i dsl0 -s | grep disconnect) if [ -n "$result" ] then cinternet -i dsl0 -A sleep 10 else exit 0 fi ____________________ EOF ______________________ -- Regards, Graham Smith ---------------------------------------------------------
participants (3)
-
Daryl Lee
-
Graham Smith
-
John Andersen