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

Re: pppd redial



On Mon, Jul 16, 2001 at 11:45:16AM +0930, David Purton wrote:
> I'm looking for a way to get pppd to try for n times to connect to my
> isp before giving up.

You need to write a chatscript that does that then.

> The problem is that quite often, pppd dials, then noting happens for a
> little while then it stops - with a helpful "alarm" entered in the logs.

The chatscript reached a timeout?

> I *think* this error corresponds to the isp not answering, but I'm not
> sure, since it doesn't the chat script is set to give a no answer error.

In /etc/syslog.conf, there must be a line:

  local2.*                -/var/log/ppp.log

If it is not there, add it and do "/etc/init.d/sysklogd restart".
You can then follow the logging of pppd with "tail -F /var/log/ppp.log".

Make sure that in /etc/ppp/peers/provider, there is a '-v' option to chat
in the "connect" setting and that the "debug" option is on.  Read the
pppd(8) and chat(8) manpage.  Make a backup of /etc/chatscripts/provider
(or create a new one and change the filename in the connect setting to
that name).  Experiment with the chatscripts.

Maybe some other people on the list have nice examples of chatscripts.

It is also possible to use another program as a replacement for chat, or
to have a program generate a chatstring (instead of '-f chatscript') on
the fly.  If you must authenticate using one of those cards that displays
"random" numbers, or responds to a challenge number, this is a nice trick.
It was shown to me by Dave Restall.

> anyway - sometimes I have to make it dial two or three times by hand -
> which is a pain.

See it as an itch, that you can scratch.  ;-)

> (btw - I don't mean a persistant connection that redials when it drops
> out)

See the "persist" option in the pppd(8) manual page for that one.

Cheers,


Joost



Reply to: