Date: Tue, 5 Aug 2003 10:59:13 -0600 (MDT) From: Nick Rogness <nick@rogness.net> To: Ezra Banoba <ezra@cfi.co.ug> Cc: freebsd-questions@freebsd.org Subject: RE: backup static routes for freebsd (default) Message-ID: <20030805105103.J64492-100000@skywalker.rogness.net> In-Reply-To: <DKEGJMBPOJNHIAGJMFNGCEMOCCAA.ezra@cfi.co.ug>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <nick@rogness.net> - How many people here have telekenetic powers? Raise my hand. -Emo Philips
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030805105103.J64492-100000>