From owner-freebsd-isp Wed Jun 21 14: 3:37 2000 Delivered-To: freebsd-isp@freebsd.org Received: from codine.icr.com.au (codine.icr.com.au [203.17.49.107]) by hub.freebsd.org (Postfix) with ESMTP id 2602937BDE5 for ; Wed, 21 Jun 2000 14:03:31 -0700 (PDT) (envelope-from dale@icr.com.au) Received: from icr.com.au (fantasy.icr.com.au [203.17.49.120]) by codine.icr.com.au (8.9.1/8.9.1) with ESMTP id HAA00507; Thu, 22 Jun 2000 07:07:20 +1000 (EST) (envelope-from dale@icr.com.au) Message-ID: <39512DFA.FCDC5157@icr.com.au> Date: Thu, 22 Jun 2000 07:04:58 +1000 From: Dale Walker Reply-To: dale@icr.com.au Organization: Independent Computer Retailers (ICR) Pty Ltd / ICRnet X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Steve Price Cc: freebsd-isp@FreeBSD.ORG Subject: Re: routing Qs References: <20000621155748.A81471@bsd.planetwe.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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