From owner-freebsd-questions@FreeBSD.ORG Tue Aug 5 09:53:06 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9849D37B401 for ; Tue, 5 Aug 2003 09:53:06 -0700 (PDT) Received: from skywalker.rogness.net (skywalker.rogness.net [64.251.173.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id A96D343FA3 for ; Tue, 5 Aug 2003 09:53:05 -0700 (PDT) (envelope-from nick@rogness.net) Received: from skywalker.rogness.net (localhost [127.0.0.1]) by skywalker.rogness.net (8.12.5/8.12.5) with ESMTP id h75GxT75064574; Tue, 5 Aug 2003 10:59:29 -0600 (MDT) (envelope-from nick@rogness.net) Received: from localhost (nick@localhost)h75GxE60064571; Tue, 5 Aug 2003 10:59:28 -0600 (MDT) X-Authentication-Warning: skywalker.rogness.net: nick owned process doing -bs Date: Tue, 5 Aug 2003 10:59:13 -0600 (MDT) From: Nick Rogness To: Ezra Banoba In-Reply-To: Message-ID: <20030805105103.J64492-100000@skywalker.rogness.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Philip Payne cc: freebsd-questions@freebsd.org Subject: RE: backup static routes for freebsd (default) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2003 16:53:06 -0000 On Tue, 5 Aug 2003, Ezra Banoba wrote: > Thanks Phil, I tried some guesswork myself to add the secondary default > routes router style with weights and that's the only way the route add > command will accept another default route. I do not know how freebsd > interpretes this: route add default [gateway] [administrative weight] > > though this has no effect when i birng down the default route. > > Maybe a script to ping the gateways at intervals will do. Any other > ideas are welcome. Thanks. The trick to adding a backup default route is to split 'default' into 2 different and more specific subnets: # route add 0.0.0.0 PRIMARY_GW -netmask 127.0.0.0 # route add 127.0.0.0 PRIMARY_GW -netmask 127.0.0.0 # route add default SECONDARY_GW Now that default is split into 2 different smaller subnets than 'default' they will be the preferred route. If your interface that connects PRIMARY_GW goes down, the first 2 routes will be removed, leave your backup 'default' gateway to take affect. This only works if PRIMARY_GW and SECONDARY_GW are on seperate physical networks and will also only work if the INTERFACE goes down. It will not work if the PRIMARY_GW goes down but the physical interface connected to that network stays up. Nick Rogness - How many people here have telekenetic powers? Raise my hand. -Emo Philips