Linux – pppd disconnects from 3G, doesn’t reconnect, w/ persist set

3gcellularlinuxpppUbuntu

I am trying to configure pppd to connect to a 3G network (Sprint, in this case) and then stay connected, reconnecting automatically if the remote connection is terminated. I have enabled the persist option. My configuration file is as follows:

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/cellular"
debug
/dev/cell 921600
defaultroute
noipdefault
user " "
persist
maxfail 0
lcp-echo-failure 10
lcp-echo-interval 60
holdoff 5

However, when the peer disconnects the connection, pppd often waits a long time (substantially more than my holdoff) to reconnect the modem — if it ever reconnects at all!

An example log showing this:

May 23 05:17:24 00270e0a8888 pppd[2408]: rcvd [LCP TermReq id=0x26]
May 23 05:17:24 00270e0a8888 pppd[2408]: LCP terminated by peer
May 23 05:17:24 00270e0a8888 pppd[2408]: Connect time 60.1 minutes.
May 23 05:17:24 00270e0a8888 pppd[2408]: Sent 0 bytes, received 0 bytes.
May 23 05:17:24 00270e0a8888 pppd[2408]: Script /etc/ppp/ip-down started (pid 2456)
May 23 05:17:24 00270e0a8888 pppd[2408]: sent [LCP TermAck id=0x26]
May 23 05:17:24 00270e0a8888 pppd[2408]: Script /etc/ppp/ip-down finished (pid 2456), status = 0x0
May 23 05:17:24 00270e0a8888 pppd[2408]: Hangup (SIGHUP)
May 23 05:17:24 00270e0a8888 pppd[2408]: Modem hangup
May 23 05:17:24 00270e0a8888 pppd[2408]: Connection terminated.
May 23 05:17:24 00270e0a8888 pppd[2408]: Terminating on signal 15
May 23 05:17:24 00270e0a8888 pppd[2408]: Exit.
May 23 06:08:07 00270e0a8888 pppd[2500]: pppd 2.4.5 started by root, uid 0
May 23 06:08:10 00270e0a8888 pppd[2500]: Script /usr/sbin/chat -v -f /etc/chatscripts/cellular finished (pid 2530), status = 0x0
May 23 06:08:10 00270e0a8888 pppd[2500]: Serial connection established.
May 23 06:08:10 00270e0a8888 pppd[2500]: using channel 11

The disconnect at the request of the peer occurs at 5:17, but the reconnect didn't happen until 6:08. I had a friend monitoring the server so I'm not certain that this wasn't a manual reconnection. Either way, it either took almost an hour to reconnect or never reconnected.

Shouldn't persist + holdoff 5 cause this to automatically reconnect after 5 seconds of the link terminating?

Best Answer