Keeping DIP alive

Keeping DIP alive

Post by Randy Hea » Thu, 22 Feb 1996 04:00:00



I finnaly got my ipfw to work along with proxy. However, I need to find a
FAQ or information on how to keep my SLIP connection to my ISP.

Basically I would like to have a way to detect a dropped line and reconnect.

Also is there a way to verify the speed DIP is connected to after it is
connected? I have only been able to connect to my ISP twice at 28800, and
then the connection is dropped.

any suggestions would be appreciated.

Randy

 
 
 

Keeping DIP alive

Post by Charles Conl » Thu, 22 Feb 1996 04:00:00



Quote:

> Basically I would like to have a way to detect a dropped line and reconnect.

> Randy

I let `cron' do the job for me :-)  Every 15 minutes, cron calls a script
which checks the running processes for my single dip/cslip connection. The
script looks like this...

-----cut here-----
#!/bin/sh
nproc=`ps -aux | grep -c "dip (205.197.212.12)"`
if test $nproc -lt 1
then
        logger -i -t CHECKDIP SLIP Down! Restarting...
        /sbin/dip /etc/digex.dip
fi
-----cut here-----

...I call it `/etc/checkdip' & make executable by `chmod u+x/etc/checkdip'.
Be certain to substitute your own quad-4 address as it appears using `ps'.
Also make certain that the ` " marks are as above. The `logger' thing sends
messages to tthe syslog facility. The `dip' thing is how I start dip at
boot. You can get more detailed info by checking the man pages.

The cron entry (make sure you use `crontab' to add it to the root cron
entries) looks like...

-----cut here-----
0,15,30,45 * * * * /etc/checkdip
-----cut here-----

When the script runs and the dip/cslip connection is up, nothing happens. If
there is NO dip process running with the required quad-4 address, the script
will cause a notation to be sent to the syslog facility (check
/var/adm/messages), dip will be called, and then cron will send the output
of the dip command to root as email. Simple, requires no maintenance, and it
works.
--



 
 
 

Keeping DIP alive

Post by SHOD » Fri, 23 Feb 1996 04:00:00




Quote:>I finnaly got my ipfw to work along with proxy. However, I need to find a
>FAQ or information on how to keep my SLIP connection to my ISP.

>Basically I would like to have a way to detect a dropped line and reconnect.

You can use diald with ppp, but since I don't use ppp, I don't know
about it.. Kere's how I keep my connection alive.. I just send a
"heartbeat" to my ISP (In good 'ol DIX Ethernet style!) with ping.
ping -i180 -q explorer >/dev/null 2>/dev/null &
       ^1  ^2  ^3        ^------- 4 -------^
1: Send one packet every 180 seconds
2: Do it QUIETLY
3: my ISP
4: I don't wanna see anything on the screen, and run it in the background.

I have this running in rc.local. I know, not too elegant, but it doesn't
bother me (All output's redirected) so.. <shrug>

Quote:>Also is there a way to verify the speed DIP is connected to after it is
>connected? I have only been able to connect to my ISP twice at 28800, and
>then the connection is dropped.

Hmm.. I've got a similar problem. Sometimes when I connect, it hangs
up immediatly. So when I DO connect, I have no idea what speed I'm
at. I'm on a 28800, and FTP's take anywhere from 1.4k to 3.2k
(uncompressed)

--
--Dave

http://www.clark.net/pub/sventek

 
 
 

Keeping DIP alive

Post by Randy Hea » Sat, 24 Feb 1996 04:00:00


Thats about what I was looking for. I have stolen your script and it
seams to be working. Just a little modification to make it set up my arp
and routing (just incase they are down) and I should be set.

Thanks for the help.

Randy

: /var/adm/messages), dip will be called, and then cron will send the output
: of the dip command to root as email. Simple, requires no maintenance, and it
: works.

 
 
 

Keeping DIP alive

Post by Charles Conl » Mon, 26 Feb 1996 04:00:00



Quote:

> Thats about what I was looking for. I have stolen your script and it
> seams to be working. Just a little modification to make it set up my arp
> and routing (just incase they are down) and I should be set.

> Thanks for the help.

And you are welcome. I've noticed that the script isn't 100%... it sometimes
returns `$nproc < 1' even when dip *IS* running. Doesn't do any harm, 'cause
the current dip won't let another start (and email to root says just that.)

--


 
 
 

1. Can "dip -k" keep line alive ?

What I do is not disconnect from dip, just telnet in to my ISP's server.
That way I can be doing several things at once -- popclient checking mail,
ftp'ing or whatever. You might check to see if your ISP allows you to
telnet in to his BBS.

2. dig +pfset=0x0020

3. fuser and other programs segfaulting...

4. "Keep Alive" TCP socket option

5. This is a test, please ignore

6. What can I do to keep tcp port alive?

7. Hercules 128bit Graphics card

8. Telnet Keep Alive Packet

9. : Suggestions for Keeping PPP alive

10. Keeping a child process alive when parent dies

11. How do you Keep Samba Alive

12. Keeping dtterm alive