On Wed, Aug 07, 2002 at 10:43:46PM +0200, Russell Coker wrote:
> What's the best way of making the secondary take over?
> I could write a shell script to do some pings, but there's the risk that bugs
> in my script cause more problems than network outages... :(
You could use mon to do the monitoring (via ping to the next hop on each
link), and then write custom "alert" programs, which would do what you
Using mon gives you the benefit of not having to write the
checking/monitoring code. You can test the custom alerts yourself
manually and verify the behavior you want. I'd recommend a custom
hostgroup for each link, and custom alerts for each link and its state (ie
linka-up, linka-down, linkb-up, linkb-down).
If you use different route metrics, you should be able to avoid any
oddities... linka (prefered) with default route at metric 1, linkb
(secondary) with default route at metric 2. This allows linka to be taken
down wholesale without regard to linkb, and vice versa.
If you use a local dnscache like djbdns's dnscache, you don't need to
worry about switching /etc/resolv.conf information.
Finally, if you put all the proper detail into /etc/network/interfaces to
bring up both links on boot, you can then let mon take down whichever has
a problem... this will always result in a known good state with a finite
period of time (definable by you) after a reboot.
- From: Russell Coker <firstname.lastname@example.org>