how do I detect a lost DSL network connection

how do I detect a lost DSL network connection

Post by Jonathan Klin » Wed, 12 Jul 2000 04:00:00



Perl! Write a script and run it from cron, the script could use the net
module to ping and check reply.... if ping fails after say 5 pings, then
ifconfig ppp0 up, or how ever you connect to your dialup isp....
Email off the group if you have more questions

--
____________________________________________________________________________
_________________

              Asst. System Administrator, International School of MN

--BEGIN GEEK CODE--
GIT d(++) s+:+ a--- C++(++++) UL++++ P+(++) L++(+++) E----


--END Geek Code--
____________________________________________________________________________
_________________


> Over the past 3 weeks, due to incompetence on the part of USWorst, I
> have been subjected to having my DSL connection interrupted for several
> hours at a time.  I would like to create a backup system in case this
> should happen again in the future.  What I want is a system that takes
> effect whenever my server detects a loss of my DSL connection to the
> Internet and then uses my modem to dial-up my ISP.  However, I am
> unsure as to the best way to determine if my connection is still up.
> Normally, I just manually ping my IPS's gateway computer, but I need
> something I can easily automate in a script.  And, of course, I need a
> way of telling when the DSL connection has come back up again.  Has
> anyone had experience with something like this?  I could use some
> suggestions.

> Thanks,

> Todd

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

how do I detect a lost DSL network connection

Post by tcow.. » Thu, 13 Jul 2000 04:00:00


Over the past 3 weeks, due to incompetence on the part of USWorst, I
have been subjected to having my DSL connection interrupted for several
hours at a time.  I would like to create a backup system in case this
should happen again in the future.  What I want is a system that takes
effect whenever my server detects a loss of my DSL connection to the
Internet and then uses my modem to dial-up my ISP.  However, I am
unsure as to the best way to determine if my connection is still up.
Normally, I just manually ping my IPS's gateway computer, but I need
something I can easily automate in a script.  And, of course, I need a
way of telling when the DSL connection has come back up again.  Has
anyone had experience with something like this?  I could use some
suggestions.

Thanks,

Todd

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

how do I detect a lost DSL network connection

Post by Hal Burgi » Thu, 13 Jul 2000 04:00:00


On Tue, 11 Jul 2000 21:57:10 -0500, Jonathan Kline


>Perl! Write a script and run it from cron, the script could use the net
>module to ping and check reply.... if ping fails after say 5 pings,
>then ifconfig ppp0 up, or how ever you connect to your dialup isp....
>Email off the group if you have more questions

Why not:

if !fping $SERVER >/dev/null; then
 $CONNECT
fi

fping is great just for this kind of thing.

--
Hal B



--

 
 
 

how do I detect a lost DSL network connection

Post by George Csahani » Thu, 13 Jul 2000 04:00:00


How bout this:

#!/bin/bash
RSPFILE="/tmp/.$HOSTNAME.stat.msg"
cat /dev/null >  $RSPFILE
do

    /bin/ping -c 5 $MACHINE  2> /dev/null | grep "100% packet loss" >
/dev/null

        ALIVE=$?
        if [ "$ALIVE" = "0" ]
           then
               echo $MACHINE down >> $RSPFILE

        fi

done

WORRY=`wc -l < $RSPFILE`
if test $WORRY -gt 0
        then
    /etc/ppp/ppp-on
fi

Or some variation of this
This is from my /etc/systest which monitors several hosts.

Run it every x minutes from cron

-GC


> Over the past 3 weeks, due to incompetence on the part of USWorst, I
> have been subjected to having my DSL connection interrupted for several
> hours at a time.  I would like to create a backup system in case this
> should happen again in the future.  What I want is a system that takes
> effect whenever my server detects a loss of my DSL connection to the
> Internet and then uses my modem to dial-up my ISP.  However, I am
> unsure as to the best way to determine if my connection is still up.
> Normally, I just manually ping my IPS's gateway computer, but I need
> something I can easily automate in a script.  And, of course, I need a
> way of telling when the DSL connection has come back up again.  Has
> anyone had experience with something like this?  I could use some
> suggestions.

> Thanks,

> Todd

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

1. I lose dsl connection after arp requests when 2nd freebsd computer is on

I have a DSL connection, and I recently purchased a second IP.  The DSL
modem goes to a hub which is connected to my two computers (both run recent
versions of FreeBSD).

The connection works on both computers.  However, when the computer with the
new ip is on, about every 20 minutes they both lose connection to outside my
ISP's gateway.  All i have to do is re-initialize the nics and both work
again...for another 20 min.  I lose connection about the same time an entry
like this appears in /var/log/messages:

Mar 13 17:10:27 falcon /kernel: arp: (gateway ip) moved from
00:02:3b:00:5e:f0 to 00:01:a0:06:1c:b5 on dc0
Mar 13 17:10:27 falcon /kernel: arp: (gateway ip) moved from
00:01:a0:06:1c:b5 to 00:02:3b:00:5e:f0 on dc0
(these arp messages have occured since i got the dsl 8 months ago)

If the computer with the new ip is off, the computer with the old ip works
fine it used to.

My ISP said i should try to figure out a way to keep freebsd from changing
its mac address.  I'm not quite sure what that means and neither did the
tech that told me.

Any help would be much appreciated.

2. Stealth Pro - XF86Config - Help !

3. connection lost on DSL

4. Send/Recv POP3 mail locally w/o using POP client?

5. Help! Losing remote login connections on Earthlink DSL

6. PATCH: document useraccess lib functions too

7. detecting a lost connection

8. FS: parts/upgrades for 43P & PowerSeries & others

9. lost DSL with home networking

10. possible to detect a lost connection?

11. Knoppix cannot see my USB network/dsl connection

12. lost connection to the web while doing the "sorcery update;sorcery rebuild"

13. Network restart script for DSL connection