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

Re: Detecting a down link and rerouting



On Tue, Jan 09, 2001 at 02:06:38AM +0100, Tamas TEVESZ wrote:
> On Mon, 8 Jan 2001, LeighK wrote:
> 
>  > I have 3 interfaces in my linux box. One goes to the local lan, one goes
>  > to the internet via T1, and one is a dedicated ppp link through my
>  > company. I would like to know if there's any program out there
>  > to detect if the internet ethernet is down, or at least is experiencing
>  > almost 100% packet loss, and automatically set my default route to the
>  > modem, but also detect when it comes back up and move my default back to
>  > the main internet connection.
> 
> you want to do some dynamic routing. for that very purpose, zebra with
> bgp comes to mind.

Hehe.. so does a headache! ;)

The way I'd do it, be it crude or not, is using the ping command to 
send out a couple packets, then if the ping screws up on a certain 
link, then do whatever with the routing table.

I've written a little script here that uses ping and traceroute to tell 
us where a problem is (it usually works, but has some false alarms), it 
does a ping, then if it fails, it does another ping, if it succeeds on 
the second ping it ignores the previous ping, if it also fails it then 
tells all the admin's via e-mail (a flaw in itself in some ways, but 
generally ok on this network), the script also has an audible alarm 
which goes off every minute while there's a network problem.

Anyways, what I'm saying is basically that you could do a similar 
thing.  Pinging the gateways would be your best bet I think.

Regards,
Robert Davidson.



Reply to: