On Wed, Sep 08, 1999 at 06:13:47PM +0200, [EMAIL PROTECTED] wrote:
> Hi All!
>
> When I force diald up, it keeps the connection up, but after some idle
> time my ISP disconnects.
>
> It would be good to tell diald to ping the other end of the ppp link at a
> given interval while forced up.
>
> Or have a script run at regular intervals while forced up. (To empty
> sendmail queue for example.)
>
> Is this doable somehow?
>
The easiest way is to set the 'lcp-echo-interval' option in
/etc/ppp/options. This tells your pppd to send lcp packets to the other
side periodically. There are other lcp related options you can set.
man pppd. This will only work if the remote side considers lcp level
communication to construe an active connection. They may not, since lcp
layer communication is really just between the two ppp endpoints. It may
be worth a try, however, since it is easy to set up.
Another possibility, mentioned by others, would be to periodically
ping the other side. If you must do this, it would be best to add the
option to diald itself so you don't ping when the link is supposed to be
down or blocked. I would think that a 'keep-alive' ping should only go
out when the 'force' option is in use and 'keep-alive-interval' > 0 and
the link is up.
Since diald already contains timer code, you
could add your 'keep-alive' function as a timer callback.
If hacking diald is not feasible, you could probably find a program on the net
that periodically pings another host.
Unless each new connection costs extra money, the best solution is to
use diald's 'force' option and do nothing else. Afterall, the ISP
disconnects you when the link is idle. Diald will probably redial and
establish the connection before the next outgoing packet comes along.
Even if that packet came along just when the ISP disconnected, it would
not have long to wait. (Actually, that particular packet would be lost
if you use dynamic IPs, but the next ones would be fine)
--
Gyepi Sam --+-- Designer/Programmer --+-- Network/System Administrator
[EMAIL PROTECTED] --+-- http://www.praxis-sw.com/gyepi
He that teaches himself has a fool for a master. -- Benjamin Franklin
He that connect teach himself is a fool. -- me
-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]