[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: restarting pppd automatically



On Sun, 2020-12-27 at 23:56 +0000, Graham Seaman wrote:
> I'm having problems with pppd and an intermittent phone line connection. 
> My external line occasionally drops out, usually briefly (I'm trying to 
> get this fixed but need a workaround in the meantime). When the line 
> goes down, I get this sequence:
> 
> Dec 27 01:35:03 snoopy pppd[22798]: No response to 4 echo-requests
> Dec 27 01:35:03 snoopy pppd[22798]: Serial link appears to be disconnected.
> Dec 27 01:35:03 snoopy pppd[22798]: Connect time 6266.2 minutes.
> Dec 27 01:35:03 snoopy pppd[22798]: Sent 3838785941 bytes, received 
> 2059599934 bytes.
> Dec 27 01:35:03 snoopy pppd[22798]: restoring old default route to 
> enp3s0 [xxx.xxx.xx.xxx]
> Dec 27 01:35:09 snoopy pppd[22798]: Connection terminated.
> Dec 27 01:35:09 snoopy pppd[22798]: Sent PADT
> Dec 27 01:35:09 snoopy pppd[22798]: Modem hangup
> Dec 27 01:36:14 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:37:19 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:38:24 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:39:29 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:40:34 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:41:39 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:42:44 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:43:49 snoopy pppd[22798]: Timeout waiting for PADO packets
> 
> Dec 27 01:44:54 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:46:00 snoopy pppd[22798]: Timeout waiting for PADO packets
> Dec 27 01:46:00 snoopy pppd[22798]: Exit
> 
> which I believe is what it is supposed to do, but leaves the connection 
> dead when the phone line comes back a minute later. I want pppd to 
> restart automatically when it goes down like this, maybe with a couple 
> of minutes delay.

I know this is not what you asked for, and may not work for your use
case, but how about just preventing pppd stopping in the first place?
For my system that I set up 10 years ago and is still running, the
notes I wrote at the time say this:

   Edit /etc/ppp/peers/dsl-provider to add a line saying "maxfail 0";
   after the 'persist' entry is a good place. This should stop pppd
   from timing out when it can't connect.
   
I did that so my internet connection came back up when the modem
reconnected after an outage.

-- 
Tixy



Reply to: