On 27/12/2020 23:56, 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.
According to the pppd documentation on
https://tldp.org/HOWTO/Leased-Line/pppd.html section 3.2.1 I can do
this by editing /etc/inittab. But I've never really relearnt how
everything hangs together since the switch to systemd, and in any case
want to stay as close as I can to the default debian setup (which is
what I have now).
Can anyone tell me what the recommended way to achieve this is now?
Thanks
Graham
All I used to do, back in the day when I had a flakey line, was run a
crontab script, every minute or two, checking if the ppp interface was
up (ip address on it) and run the command 'pon dsl-provider' if it
wasn't up.
--
Michael Howard