Posted by: Anonymous Coward
on April 25, 2005 11:38 AM
I believe the author is counting on a total failure of eth0 to drop the primary route. Once eth0 goes down that route is withdrawn from the routing table leaving only the eth1 route. Linux without turning on IP: advanced router in the kernel will use only one gateway. I assume it uses the first one you config and once that disappears the second will be used.
eth0 will hardly every fail completely. The only way it would is if it is directly connected to say a DSL device and the device became unplugged. That would completely drop eth0 and then the failover would happen. If only the connection upstream from the DSL device went down then the Linux box would happily send data to the up ether interface of the DSL, router, switch, etc.
It would also work if you're terminating connections directly into the Linux box... using a ds-1 card or something like that. Again this assumes that the connections fail totally. A ds-1 usually will, but in offices you're sometimes handed ether which terminates on a switch. That switch will be up, but the router or upstream connection has failed.
It's an interesting little hack assuming I'm right about what he's doing with it, but I wouldn't go around recommending it with mentioning its shortcomings.