auto restarting a ppp connection

Paul A. Hoadley paulh at
Sat May 3 06:10:08 PDT 2003

On Sat, May 03, 2003 at 06:28:34AM -0400, Adam wrote:
> On Fri, 2003-05-02 at 21:12, Paul A. Hoadley wrote:
> > On Fri, May 02, 2003 at 09:44:33PM +0800, Paul Hamilton wrote:
> > 
> > > I have tried to put the whole routine into a script, ie, find the
> > > pid, kill it, wait, then restart the ppp connection.  The idea, was
> > > that I could link it with a ping tester, then when I miss 'x' number
> > > of pings, restart the connection.  This is what I used:-
> > 
> > Here is a script Aaron Hill wrote that does precisely that:
> > 
> >
> > 
> > Run it with cron as frequently as you like.  Instructions for
> > customising it are on that page.
> Is this script really any better than enabling LQR and setting up an
> automatic reconnect on disconnection in the ppp.conf? 

The short answer is yes, it was for me.  I ran PPPoE with
/usr/sbin/ppp for a couple of years using '-ddial' mode and with LQR
enabled.  ppp really would get completely wedged about once a month
(continuous uptime throughout), and was not resetting the connection
despite the fact that the link was completely dead.  It is not clear
whether it was ISP-related, though I suspect so, since I have not seen
this behaviour since I switched ISPs about 6 months ago.  Over the
years I've seen it reported (a completely wedged /usr/sbin/ppp) on
this list several times.  The problem with debugging it is that it's
very hard to reproduce -- it can take weeks of uptime to occur, and
it's never clear what precipitates it.

If the OP is finding that a kill -9 is the only way to fix his
problem, then he's probably observing the same behaviour.  I don't use
it anymore, but the script seems like a reasonable workaround.


mailto:paulh at
mailto:phoadley at

More information about the freebsd-questions mailing list