Subject: Re: auto-reestablish for SLIP connections?
To: Marc Unangst <mju@cs.cmu.edu>
From: John Brezak <brezak@apollo.hp.com>
List: netbsd-help
Date: 01/02/1995 12:25:17
> I'm looking to set up a NetBSD box as a router between a SLIP line and
> an Ethernet.  The modem on the SLIP line will be connected all the
> time, but occasionally the connection drops (telco glitch, somebody
> reboots the router at the other end, etc.) and I need to be able to
> re-establish the connection without human intervention.
> 
> Unfortunately, from what I've seen of the SLIP tools in NetBSD, there
> isn't anything to automatically establish the connection, bring it
> back up when it drops, etc.  Is there anybody using NetBSD for this
> sort of application?  If so, what do you use to maintain the
> connection?  All the solutions for setting up SLIP under NetBSD seem
> to start with something like, "well first I use cu to connect to my
> provider and manually log on, then I suspend the cu process and run
> slattach, then...".  That won't work for this application, since it
> all has to happen automatically and without intervention.
> 
> [The setup that this is replacing is sort of a kludge.  We have an old
> 286 PC running PC-Route, and plugged into an X-10 power controller
> (along with the Hayes Optima 28.8Kbps modem).  There is a cron job
> running on our main server machine that tries to ping the router at
> the other end of the SLIP link every 5 minutes.  If it doesn't get an
> answer, it assumes that the SLIP link has dropped, so it cycles DTR
> on the serial port that is connected to the X-10 controller.  This
> causes the X-10 controller to cycle power to the PC and the modem.
> When the PC comes up, it runs a Telix script from the autoexec.bat
> file that connects to the other router, and then runs PC-Route.  So,
> don't be afraid to reply if your solution is a bit kludgy -- it just
> has to be about as reliable as our current solution, which is to say,
> almost 100% uptime.]
> 
> Thanks in advance for any help you can provide.
> 
> -Marc Unangst

You might have a look at the diald package. Try archie to locate it or
look in sunsite.unc.edu:/pub/Linux/pub/Linux/system/Network/serial/diald-0.5.ta
r.gz 

It is written for Linux, but should be portable to NetBSD. It handles timeout 
and demand dialing
for slip and PPP.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 John Brezak                    UUCP:     uunet!apollo.hp!brezak
 Hewlett Packard/Apollo         Internet: brezak@ch.hp.com
 300 Apollo Drive               Phone:    (508) 436-4915
 Chelmsford, Massachusetts      Fax:      (508) 436-5140