[lug] Two NICs, one IP

David Morris lists at morris-clan.net
Thu Aug 12 15:03:22 MDT 2004


On Thu, Aug 12, 2004 at 10:34:37AM -0600, Scott Herod wrote:
> On Wed, 11 Aug 2004, Jeff Schroeder wrote:
> 
> > Hey all--
> > 
> > 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.
> > 
> > I don't believe this is possible, since the box won't know where to 
> > route outgoing packets (eth0? eth1? both?), and I've seen instances 
> > where a network interface won't even come up if the system thinks 
> > there's another machine with that IP on the network.
> > 
> > However, before I tell him it isn't possible, I wanted to confirm it 
> > with the group here.  I don't have any hard-and-fast documentation to 
> > support my claim, but it just doesn't seem right to me.  Can anyone 
> > tell me for sure that it's not possible?  Or, if it is, how to do it 
> > properly?

I missed the earlier part of the thread so this might have
been mentioned already, but you can just use two different
IP addresses possibly with different metrics in the routing
table.  From the server's perspective it doesn't matter at
all how many addresses go to one network.  Heck, I have one
system that has 4 addresses going out of one ethernet card.

The DNS side of things might be a tad tricker given you want
both IP addresses to be used redundantly for eachother....I
know it isn't an issue having more than one IP address
associated with a hostname (big web sites do this all the
time for load balancing and to increase the bandwidth to a
single computer), but I'm not familiar with how clients
choose between the addresses for the purposes of load
balancing or if one interface is down.

--David




More information about the LUG mailing list