*BSD News Article 89151


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!manawatu.planet.co.nz!manawatu.gen.nz!unix.triton.net!news4.agis.net!www.nntp.primenet.com!nntp.primenet.com!newsxfer3.itd.umich.edu!su-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.maxwell.syr.edu!insync!uunet!in2.uu.net!204.254.98.4!mint.net!darren
From: darren@Quint.somtel.com (Darren Henderson)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: ppp auto redial after lost connection?
Date: 15 Feb 1997 20:39:33 GMT
Organization: Maine InternetWorks
Lines: 64
Message-ID: <5e56u5$oih@ruby.mint.net>
References: <01bc19cb$48ea4760$05e955c2@iaipc0.iai.rssi.ru> <330379AD.41C6@urc.tue.nl> <5e0hte$rg6@news.fred.net>
NNTP-Posting-Host: quint.somtel.com
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35467

mcurry@fred.net wrote:
:>With pppd, although there is a provision for redialing automatically, it
:>does not work reliably.  You can get around this by writing a short script

:>Peter Benschop (rcbapb@urc.tue.nl) wrote:
:>: I am using a permanent ppp connection over a serial line. However the
:>: modem on the other side of the line is reset every 24 hours and the
:>: connection is lost. Is there an easy solution to make ppp redial after a
:>: lost connection? It redials automatically when _I_ make a request, but


When I boot my machine the following script is executed....

----------------------------
#!/bin/sh
echo "$(date) pppd loop STARTING" >> /var/log/somtel
while ()
do pppd -detach file /etc/ppp/pppd-options cuaa0 115200
done
echo "$(date) pppd loop TERMINATED!" >> /var/log/somtel

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


pppd-options contians.....
----------------------------

connect /etc/ppp/pppd-con
disconnect /etc/ppp/pppd-dis
crtscts                         # hardware flow control
modem
passive
mtu 552                         # 512+40  def was 1500...this should be
                                # more reponsive
lock
domain xxxx.xxxxx.xxxxx         # our domain
x.x.x.x:y.y.y.y                 # x is our ip, y is the gateway
defaultroute
debug
----------------------------

pppd-con....
----------------------------
echo "$(date) pppd chat starting" >>/var/log/somtel
if chat -v -f /etc/ppp/pppd-somtel
then echo "$(date) pppd chat ok" >> /var/log/somtel
else echo "$(date) pppd chat failed" >> /var/log/somtel
     exit 1
fi
----------------------------

pppd-dis....
----------------------------
rm /var/spool/lock/LCK..cuaa0
echo "$(date) pppd terminated" >> /var/log/somtel
----------------------------

And pppd-somtel is my chat script. Using this set up I've never had a
problem maintaining a connection... this has been running for the past
year, first under 2.1 and now under 2.1.5

______________________________________________________________________________
Darren Henderson                                      darren@jasper.somtel.com
                                                            dhenderson@bix.com