[lug] Two NICs, one IP

Daniel Webb lists at danielwebb.us
Mon Aug 16 23:42:57 MDT 2004


On Wed, 11 Aug 2004, Jeff Schroeder wrote:

> I manage a Linux server for a client, and he has asked me to set things
> up so the server will be able to withstand the failure of a physical
> cable on the LAN.  The server has two NICs (eth0 and eth1, in
> Linuxspeak) and he wants both to have the same IP address.

This isn't a direct answer to your question, but I have a setup that would
withstand failure of the physical cable, the NIC, the hard drive, or
anything else.  Check out the Linux-HA project (http://www.linux-ha.org/).
Right now it requires manual intervention after a failure for me, but
that's just because I'm too lazy to finish it up and get the heartbeat
working right.  I have been using drbd as my network RAID for over a year
on my mail/web server and it seems to be pretty solid.  You can use a
second IP address for the NIC that is "live".  For example, IP1 is on eth0
on machine 1, IP2 is on eth0 on machine 2, and PUBLIC_IP is on eth0:0 on
whichever machine is "live".  If the down machine is hung and won't give
up the public IP address, you can use the "fake" tool to do ARP IP
takeover on the LAN.  As far as I can tell, the main limitation to this
kind of setup is that drbd is not all that fast, so if you're talking
about a server that does huge amounts of disk writing, it won't be any
good.  Also, my setup is purely backup and does not load balancing.

Daniel




More information about the LUG mailing list