At 10:16 PM 5/27/02 +0200, Kiril wrote:
>My ISP sometimes has short network outages (2-3 minutes). After such an
>outage, I have to manually restart networking to get my router back online.
>
>Is there a simple and reliable way to test the status of a connection? a
>script that can runs constantly, supervised by daemontools, and restarts
>networking after some waiting period is what i am looking for

Assuming we are talking about a connection handled by an external device 
(e.g., a cable or DSL "modem" that connects to the LEAF router via an eth* 
interface, and NOT a ppp connection over a dialup modem), the only real way 
to see if the remote network is working is to try to make it do something. 
A ping is the lightest weight "something" there is. A one-per-minute ping 
to the ISP's default gateway really isn't much of a burden on it ... and 
since they are the ones causing the periodic interruptions, surely they 
can't with any sincerity claim your behavior to be "unfriendly". And its' a 
good host to pick for another reason too -- if it does go offline, that act 
cuts off your access to the Internet, so you won't be detecting a false 
failure.


>ping somehow does not work best. the host that i am trying to ping could go
>offline, dns could fail and constantly pinging some other host seems not
>particularly friendly to me.
>
>i tried also ip addr show | grep eth0 | grep inet, but this also did not
>really work out, because routing could fail.


In any case, a failure at the ISP end won't cause your routing table to be 
rewritten, unless you are using a system that gets a new DHCP lease every 
few minutes.

>one could always test all conditions, but  before i do this, i would like to
>ask the list if there is a more elegant way.

Really, it depends on what the local symptoms of these brief connectivity 
failures are. I've been making some assumptions about that in my response, 
but a better approach is for you to characterize the failures a bit more 
exactly.


--
-----------------------------------------------"Never tell me the 
odds!"--------------
Ray Olszewski                                        -- Han Solo
Palo Alto, California, USA                              [EMAIL PROTECTED]
-------------------------------------------------------------------------------------------


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to