Subject: Re: PPP questions
To: John M Vinopal <banshee@gabriella.resort.com>
From: David Hopper <bard@tiamat.chaldea.com>
List: current-users
Date: 05/28/1996 00:11:36
Re: PPP disconnect...

My own problem was that my connection would 'freeze' such that the
modem would still be connected, but the IP activity to my ISP would be
dead.  I solved it with pppd checking for a responsive connection and,
if the connection is dead, force a modem drop.  Cron then checks every
minute for a running pppd and restarts, if necessary.

For about a year now, this has been an excellent solution; the modem
is never down for more than a minute.

/etc/crontab:
[...]
# check the ppp interface, restart if necessary
0-59/1  *    	*       *       *       /bin/sh /etc/checknet 2>&1 > /dev/null 

/etc/checknet (I've piped to null, but can be logged):
#!/bin/sh
#
if [ ! -f /var/run/ppp0.pid ]; then  {
	echo "Network is down, restarting..."
		/usr/sbin/pppd
	 	}	
	else
		echo "Network is up"	
fi

/etc/ppp/options:
/dev/tty00
38400
crtscts
defaultroute
netmask 255.255.255.0
ipcp-accept-local
ipcp-accept-remote
lcp-echo-failure 4    # if pppd doesn't receive four consecutive echos
lcp-echo-interval 10  # in forty minutes, then kill the process and HUP.
connect "/usr/sbin/chat -v -f /etc/ppp/chatscript"

David Hopper (bard@tiamat.chaldea.com) : http://tiamat.chaldea.com 
Anthropology Department, Stanford University
NetBSD 1.1 Amiga (tiamat.chaldea.com) : NetBSD 1.1 x86 (marduk.chaldea.com)
"Two pale drops of fire guttering in the vast consuming darkness" -V. Price