[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-isp
Subject: Re: routing Qs
From: Dale Walker <dale () icr ! com ! au>
Date: 2000-06-21 21:04:58
[Download RAW message or body]
Steve Price wrote:
>
> Hi all,
>
> I have a small problem that I need help with. I'm trying to setup
> a box with two NICs: 192.168.12.11 and 192.168.12.21. The default
> gateway is 192.168.12.1. This works fine if the 192.168.12.11
> interface is up and connected. However, what I'm trying to do is
> to get traffic to go through the second NIC when the first NIC goes
> away.
>
> I've also tried (to no avail thus far) to setup two default gateways
> on separate machines: 192.168.12.1 and 192.168.11.1. The two NICs
> then had addresses 192.168.12.11 and 192.168.11.1 but only being
> able to set a single default gateway sort of nixes this idea too.
>
> Can someone clue me in to the obvious on how to set this up?
>
> Thanks.
>
> -steve
Steve,
You can do this with a 'ping', and using it's exit status...
ie:
---------------------------------------------
/usr/sbin/ping -c 1 gw1 && \
/sbin/route change default gw1 || \
/sbin/route change default gw2
---------------------------------------------
however this doesn't allow for the current default route working ok, and
will reset your correct route each time it runs... but this may get you
started...
--
Dale Walker dale@icr.com.au
Independent Computer Retailers (ICR) http://www.icr.com.au
ICRnet http://www.icr.net.au
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic