RE-dialing SLIP/PPP (not dial on demand)

RE-dialing SLIP/PPP (not dial on demand)

Post by Phil Howa » Sun, 26 Feb 1995 13:45:27



What is the progress on development of a program to automatically (and
quickly) redial and reconnect to a SLIP or PPP server?  Is this done
yet (I have seen no announcements for it)?  The dial on demand still
might work provided that it will trigger on ping or some such continuous
"demand".  I'm using SLIP right now but I can switch to PPP easy enough
I am sure.

Ideas?  Particular programs to suggest?
--
Phil Howard KA9WGN      | Absolutely no trees were killed to produce this sig.
Unix/Internet/Sys Admin | Well, OK, we had to tie one up and torture it.  So.
CLR/Fast-Tax            | However, this is not the only sig I have.  My other

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by mister d » Mon, 27 Feb 1995 22:34:30


: What is the progress on development of a program to automatically (and
: quickly) redial and reconnect to a SLIP or PPP server?  Is this done
: yet (I have seen no announcements for it)?  The dial on demand still
: might work provided that it will trigger on ping or some such continuous
: "demand".  I'm using SLIP right now but I can switch to PPP easy enough
: I am sure.

: Ideas?  Particular programs to suggest?
--

I've had very good luck with the 'dipeye' script from sunsite.  
Basically a shell script to periodically ping and restart dip if you fall
off.  Works for me.

        -tek



 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Eric Sche » Wed, 01 Mar 1995 00:28:40



>What is the progress on development of a program to automatically (and
>quickly) redial and reconnect to a SLIP or PPP server?  Is this done
>yet (I have seen no announcements for it)?  The dial on demand still
>might work provided that it will trigger on ping or some such continuous
>"demand".  I'm using SLIP right now but I can switch to PPP easy enough
>I am sure.

I realize that you are not looking for "dial on demand" per se, but
let me clarify what diald does, since I think it will do what you want.
First, I am assuming that what you want is a program that will
keep the line up ALL the time, and that the instant it goes down it will
notice the hangup and dial out again.

Now, diald does "dial on demand", but the concept of demand is somewhat
flexible. Diald maintains a queue of "live connections". If there is
anything in this queue it thinks the line should be "up". If for any
reason the line goes down while it thinks it should be up
(i.e. it sees a hangup on the serial line), then diald will immediatly
redial the line. Notice that there does NOT need to be any actual traffic
between the time that the line goes down, and the line is redialed.
It simply needs to be the case that the connection queue is non-empty.
Now, to accomplish what you want one just configures diald so that its
connection queue is never empty. This is not particularly hard.
The way diald maintains its connection queue is to run each packet
it receives through a function that generates an "identifier", which
is then placed into the queue with some timeout. It will stay in the
queue until the timeout expires. If the identifier is already in the
queue then it is replaced by a new copy with a new timeout.
If we configure diald to assign the same identifier to all packets,
and give them a very large timeout value, say something on the order
of a few years, then the queue will only become empty if the traffic
falls below one packet every few years.

I hope this clarifies things somewhat. If not, feel free to ask me
questions.

-- eric

---------------------------------------------------------------------------

Department of Computer Science, University of Toronto

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by David E. Min » Wed, 01 Mar 1995 02:24:24



: : What is the progress on development of a program to automatically (and
: : quickly) redial and reconnect to a SLIP or PPP server?  Is this done
: : yet (I have seen no announcements for it)?  The dial on demand still
: : might work provided that it will trigger on ping or some such continuous
: : "demand".  I'm using SLIP right now but I can switch to PPP easy enough
: : I am sure.

: : Ideas?  Particular programs to suggest?
: --

: I've had very good luck with the 'dipeye' script from sunsite.  
: Basically a shell script to periodically ping and restart dip if you fall
: off.  Works for me.

:       -tek


You might also take a look at SLIPup.  It is similar to 'dipeye', but
fingers a remote user.  It's controlled via runlevels from inittab.  It's on
Sunsite in sunsite.unc.edu:/pub/Linux/system/Network/serial/SLIPup-0.10.tar.gz,
or at it's homesite of
ftp.siriuscc.com:/pub/Linux/Siriuscc/network/slip/SLIPup/SLIPup-0.10.tar.gz.

--
-----------------------------------------------------------------------


Awana Clubs # 8349 - "Christ for Boys and Girls" - Pal/Pioneer Director

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Scott Ma » Sat, 04 Mar 1995 02:22:15


: What is the progress on development of a program to automatically (and
: quickly) redial and reconnect to a SLIP or PPP server?  Is this done
: yet (I have seen no announcements for it)?  The dial on demand still
: might work provided that it will trigger on ping or some such continuous
: "demand".  I'm using SLIP right now but I can switch to PPP easy enough
: I am sure.

: Ideas?  Particular programs to suggest?

This is not very fancy, I admit :^)
but why not just use a simple script like:

dip my-server.dip
while sleep 2m
do
        dip my-server.dip
done

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Michael Meissn » Sun, 05 Mar 1995 05:14:13



| : What is the progress on development of a program to automatically (and
| : quickly) redial and reconnect to a SLIP or PPP server?  Is this done
| : yet (I have seen no announcements for it)?  The dial on demand still
| : might work provided that it will trigger on ping or some such continuous
| : "demand".  I'm using SLIP right now but I can switch to PPP easy enough
| : I am sure.
|
| : Ideas?  Particular programs to suggest?
|
| This is not very fancy, I admit :^)
| but why not just use a simple script like:
|
| dip my-server.dip
| while sleep 2m
| do
|         dip my-server.dip
| done

On my system at least dip backgrounds itself as soon as the connection is made
(ie, it returning does not mean the connection is down).  However, on
sunsite.unc.edu, I found diald-0.6.tar.gz in the following directory:


  total 1704
  drwxr-xr-x   2 67       other       1024 Feb 23 18:27 .
  drwxr-xr-x  20 67       25          1024 Dec 13 18:39 ..
  -rw-r--r--   1 67       25           886 Feb 23 18:27 INDEX
  -rw-r--r--   1 67       25          2301 Feb 23 18:27 INDEX.html
  -rw-r--r--   1 67       25          2230 Feb 23 18:27 INDEX.short.html
  -rw-r--r--   1 67       25           540 Jan 31 20:59 SLIPup-0.10.lsm
  -rw-r--r--   1 67       25          9814 Jan 31 20:59 SLIPup-0.10.tar.gz
  -rw-r--r--   1 67       25           859 Jan 17 19:10 diald-0.6.lsm
  -rw-r--r--   1 67       25         47133 Jan 17 19:10 diald-0.6.tar.gz
  -rw-r--r--   1 67       25          1287 Apr  7  1994 dip-3.3.7-lilo-3.2.lsm
  -rw-r--r--   1 67       25         68955 Apr  7  1994 dip-3.3.7-lilo-3.2.tar.gz
  -rw-r--r--   1 67       25          4055 Mar 11  1994 dip.README
  -rw-r--r--   1 67       25        129551 Feb 22 04:03 dip337m-uri.tgz
  -rw-r--r--   1 67       25           903 Nov  4 15:53 dipeye-0.65.lsm
  -rw-r--r--   1 67       25          2170 Nov  4 15:53 dipeye-0.65.tar.gz
  -rw-r--r--   1 67       25          1287 Sep 21 14:21 dslip203.lsm
  -rw-r--r--   1 67       25        155696 Sep 21 14:21 dslip203.tgz
  -rw-r--r--   1 67       25        322010 Oct 21 15:31 ppp-2.1.2b.tar.gz
  -rw-r--r--   1 67       25           511 Oct 21 15:31 ppp-2.1.2b.tar.gz.lsm
  -rw-r--r--   1 67       25           648 Feb  9 01:11 ringd-0.8.lsm
  -rw-r--r--   1 67       25          9531 Feb  9 01:11 ringd-0.8.tgz
  -rw-r--r--   1 67       25           934 Oct 21 15:27 sliphangup1.1.lsm
  -rw-r--r--   1 67       25          5232 Oct 21 15:27 sliphangup1.1.tar.gz
  -rw-r--r--   1 67       25         18705 Jan 20 17:03 sliplogin-1.4.tar.gz
  -rw-r--r--   1 67       25           699 Jan 20 17:03 sliplogin.lsm
  -rw-r--r--   1 67       25          1090 Jun 29  1994 slipstuff-1.0.1.lsm
  -rw-r--r--   1 67       25         22142 Jun 29  1994 slipstuff-1.0.1.tgz
  -rw-r--r--   1 67       25           453 Jan 29 16:15 tkppp-1.3a.lsm
  -rw-r--r--   1 67       25          7360 Jan 29 16:15 tkppp-1.3a.tar.gz

--
Michael Meissner, Cygnus Support (East Coast)
Suite 105, 48 Grove Street, Somerville, MA 02144, USA

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Scott J. Ellentuc » Tue, 07 Mar 1995 01:59:24





> |
> | : Ideas?  Particular programs to suggest?

        (Sunsite ls removed)
        This also may not be very elegant, but I use this on an AIX box and
expect it will work on dip.  Pseudocode follows:

        PING Well.Known.Host.Thats.ALWAYS.up 5 times > SLIPCHECK
        IF WC -L of SLIPCHECK isn't a certain number of lines
                RESET SLIP by shutting it down
                BRING SLIP back up
        ELSE
                echo "This_program" | at now + 5 minutes

                                Scott

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Scott Ma » Tue, 07 Mar 1995 06:57:33





: >

: > |
: > | : Ideas?  Particular programs to suggest?
: >
:       (Sunsite ls removed)
: >
:       This also may not be very elegant, but I use this on an AIX box and
: expect it will work on dip.  Pseudocode follows:

:       PING Well.Known.Host.Thats.ALWAYS.up 5 times > SLIPCHECK
:       IF WC -L of SLIPCHECK isn't a certain number of lines
:               RESET SLIP by shutting it down
:               BRING SLIP back up
:       ELSE
:               echo "This_program" | at now + 5 minutes

:                               Scott
Here is a short program that I am using to keep my slip up:

/* checklink.c                -- William Gladnick               */
/* This program assumes you have one modem line dedicated       */
/* to SLIP. If the modem is not locked, dip needs to be run.    */
/* The time between checks is 10 seconds but this can be        */
/* changed easily. Change /root/server.dip to your script name. */
#include <stdio.h>
main(){
int     n=0;
FILE    *inf;
do{
if((inf = fopen("/var/spool/uucp/LCK..modem","r")) == NULL)
                system("/sbin/dip /root/server.dip");
else
                fclose(inf);
sleep(10);

Quote:}while(n==0);
}

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Perry Donh » Sat, 11 Mar 1995 01:54:08




>Here is a short program that I am using to keep my slip up:

>/* checklink.c                -- William Gladnick               */
>/* This program assumes you have one modem line dedicated       */
>/* to SLIP. If the modem is not locked, dip needs to be run.    */
>/* The time between checks is 10 seconds but this can be        */
>/* changed easily. Change /root/server.dip to your script name. */
>#include <stdio.h>
>main(){
>int     n=0;
>FILE    *inf;
>do{
>if((inf = fopen("/var/spool/uucp/LCK..modem","r")) == NULL)
>                system("/sbin/dip /root/server.dip");
>else
>                fclose(inf);
>sleep(10);
>}while(n==0);
>}

Unfortunately, DIP will often die and leave the lock in place. I use the
following Perl script to keep my connection up. It pings the remote end
of the connection a few times and if no reponse is received, restarts the
network. I found that doing a single ping ("One ping. One ping only")
would sometimes give a false negative if I were in the middle of an ftp
transfer or IPhone session.

#!/usr/bin/perl

#DipStat v1.2

#Check SLIP connection every 10 minutes from cron and restart
#if down.

$node="199.232.40.9";
$packetloss = `ping $node -c 5 | grep % | cut -d, -f3 | cut -d% -f1`;
if ($packetloss > 75)
        {


                {
                `kill -9 $instance`;
                }


                {
                `kill -9 $instance`;
                }
        $status = system("rm /var/spool/uucp/LCK..modem");
        $status = system("/sbin/dip iii");
        $status = system("bcastd 199.232.40.09 199.232.43.34 199.232.43.35 199.232.43.36 199.232.43.37 199.232.43.38 &");
        }

Regards,

Perry Donham
http://www.en-garde.com

Visit KidPub! http://www.en-garde.com/kidpub

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Tim Bas » Sun, 12 Mar 1995 06:31:04


: >

: > |
: > | : Ideas?  Particular programs to suggest?
: >

This script works for my PPP link, but is not pretty.
It's just to keep up a single line PPP link:

#!/bin/sh
/bin/ping -c  1 199.0.216.0  > /tmp/pingppp

PATH=/usr/bin:/bin
# check for network unreachable
tail -1 /tmp/pingppp | grep unreachable | grep -v grep
if [ $? -ne 0 ]        # equals 0 if reachable
then
        tail -1 /tmp/pingppp | grep 100% | grep -v grep
        if [ $? -ne 0 ] # equals 0 if 100 percent loss
        then
                echo  link up `date` >> /usr/adm/pppstatuslog
        else
        echo  link down `date` >> /usr/adm/pppstatuslog
        pppdstart
        fi
else
        echo  link down `date` >> /usr/adm/pppstatuslog
        pppdstart
fi

# subroutines

pppdstart()
{
        ps aux | grep pppd | grep -v grep  > /dev/null
        if [ $? -ne 0 ] #  equals 0 if pppd is running
        then
                exec /usr/local/bin/startppp
        else  
                ps aux | grep pppd | grep -v grep | awk '{ print $2 }' | xargs kill
                exec /usr/local/bin/startppp
        fi

Quote:}

 
 
 

RE-dialing SLIP/PPP (not dial on demand)

Post by Wong Sai Kee (Graduate Assista » Mon, 20 Mar 1995 16:17:03



Quote:># check for network unreachable

Can you tell me what is the unreachable means here ?

I'm using a NeXT with slip.  My config is working like a handicap and
get no idea to fix it after over 6 months.  I found that sometimes
the config report:

    add host 137.189.97.224: gateway 137.189.96.20: Network is unreachable

Mr.Sai-kee Wong