[CentOS] network redundancy via two nics, two routers?
jpotter-centos at codepuppy.com
Tue Mar 27 13:52:42 UTC 2007
Hi John, Patricio, Feizhou -- thanks for your thoughts.
John, heartbeat looks like a viable solution; I hadn't considered it
for "just" monitoring the NICs, but ipfail -- http://www.linux-ha.org/
ConfigureIpfail -- seems to suggest that it will at least allow for a
basic "ping gateway 1; if it's down, switch to gateway 2" setup. (I
had considered just writing this myself; but something tells me that
there are probably subtle gotchas that I would miss. Not to mention
reinventing the wheel.) Thanks!
I'm curious, though, if there might not be a lower-level way of doing
this, so as to not rely on the heartbeat process running? (i.e.
> Should it not be that there would be a third ip that would be set
> as the gateway and the two routers will claim the ip as needed? So
> it would be the same ip used as the gateway whether the packets go
> out through eth0 or eth1.
Feizhou, that would be ideal... but I don't know of any way in the HP
ProCurve switches of doing this. Each switch would have to health-
check the other, and the standby would have to pick up that IP if the
primary went down. They don't seem to support this. That would be
100% perfect, though; because in that setup, CentOS doesn't have to
even know that the bonded interface is split between two physical
switches or that the gateway is relocatable.
(Patricio: I will look into VRRP/XRRP again; maybe it will solve
this? Thank you for the suggestion!)
> As for bonded interface...should not that be on the same switch?
> You have a bonded interface on a VLAN that uses ports on two
> separate switches?
Yes; on separate switches; which are connected and know to shuffle
packets back and forth for the VLANs. If the bonded connections went
to the same switch, and that switch went offline, then... well, it
doesn't solve the problem of eliminating switch or power failure as a
cause of downtime. (Switches will be plugged into different power
So the question remains: besides installing software that health-
checks the connection, is there a way to configure linux bonding to
use different gateways based on the physical NIC in a bonded pair?
(Or, a way to tell it to try two different gateways; and if one is
down, to try the other? I.e. some sort of route cost solution?)
More information about the CentOS