Hello.  I'm looking for/going to write a script that will provide a type of
redundant internet connection.

I have a client who has a "wireless" LAN connection to an ISP, however,
from time-to-time that connection will fail and he uses a modem to connect
to another ISP until the wireless connection returns.  He isn't hosting any
critical web servers, but it is relatively important for him to have
internet access at all times during business hours since many, if not most,
of his sales, orders, and correspondence to him and his staff is done via
e-mail (this e-mail is on an off-site POP server).  So, the key here is to
keep the internet connection alive, even if at a low-bandwidth such as a
56K modem provides.  The linux box is an ip-forwarding/masquerading system,
so under normal circumstances it is their only real-world IP number.

Anyway, I am looking for/going to write a script that is perhaps initiated
by cron to ping a list of off-site ip addresses through the
ethernet/wireless connection, and if all of those pings fail, it will check
to see if a ping-failure log exists from the previous instance (so that the
following actions only occur if the pings fail in two consecutive attempts,
the time determined by its placement in cron).  If the pings fail and the
previous instance's pings failed, then the default route would be removed,
the ppp connection would be established with it becoming the default route,
and a notification mail with ifconfig results is to be sent to me (mostly
so that I can telnet to the box if needed, the ppp IP address being
dynamically assigned).  Cron will continue to run these ping attempts, and
when any responses are received in two consecutive instances, then the ppp
connection would be dropped, and the default route would be placed back
through eth0.  Finally a notification mail is again sent to me (so that I
can stop sweating that I'm going to need to go over there and find out that
it wasn't the ISP, but rather some other networking issue).

Well, I'm fairly limited in my scripting skills, and I don't want to have
to write this if somebody has already done it, and I can modify their good
work to my taste.

So, does anybody know of an existing script like this?  If not, could you
help me know the commands that I would need to use in the script?  I think
they would be as follows:

ping, pppd, route  (any more?)

Thanks.

Lee Howard


-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]

Reply via email to