Hi,
I had the same problem, but you can solve it with
giving the second
NIC no IP-address.
if then the first HUP fails and on the the second
NIC is still active
(I use the programm arping fron the iputil
package) you mußt only switch
the network an default route and then the server
is under his old IP
online again.
The advantage is that the script only needs to
know the networks and gateways
and not the IP´s which the server has.
(usefull if you have a servers an IP-failover)
Chris
Chris Anderson wrote:
>
> >From the pain-and-suffering-with-multiple-nics department:
>
> I'm putting together a server farm, with heartbeat, lvs, mon, and a few
> other goodies. In order to reduce the problems caused by having a hub
> die, I've put two NICs in each server (both directors and realservers),
> and connected card 0 to one hub, and card 1 to another.
>
> Then, thinking that all is well, I wrote a script for mon (which is
> running on the directors) to test network connectivity by pinging all
> the relevant IPs via the two net cards in each director; in more detail,
> I ping the 2 IPs in for each director and each realserver via each
> device in the director.
>
> The problem I have found (and I'm not sure whether heartbeat/lvs is
> responsible or not) is that this doesn't work. To illustrate (using the
> actual IP addresses on director 1):
>
> director1:
> eth0: 192.168.1.131
> eth1: 192.168.100.131 <-- only used for heartbeat vi crossover cable
> eth2: 192.168.1.133
>
> realserver1:
> eth0: 192.168.1.141
> eth1: 192.168.1.143
>
> If I (from director1) do the following:
>
> ping -c 1 -I eth0 192.168.1.133 or
> ping -c 1 -I eth2 192.168.1.131
>
> then I get no response. Similarly, if I ping (from the director) either
> of the realserver addresses with the cable to eth0 (on the realserver)
> unplugged, then I get no response, but if that cable is plugged in and
> the eth1 cable is removed, I can ping both of them.
>
> Here's the routing table, just in case that helps any:
>
> Destination Gateway Genmask Flags Iface
> 192.168.1.133 0.0.0.0 255.255.255.255 UH eth2
> 192.168.1.131 0.0.0.0 255.255.255.255 UH eth0
> 192.168.100.131 0.0.0.0 255.255.255.255 UH eth1
> 192.168.1.169 0.0.0.0 255.255.255.255 UH eth0
> 192.168.100.0 0.0.0.0 255.255.255.0 U eth1
> 192.168.1.0 0.0.0.0 255.255.255.0 U eth0
> 192.168.1.0 0.0.0.0 255.255.255.0 U eth2
> 127.0.0.0 0.0.0.0 255.0.0.0 U lo
> 0.0.0.0 192.168.1.1 0.0.0.0 UG eth2
> 0.0.0.0 192.168.1.1 0.0.0.0 UG eth0
>
> I'm kinda stumped here; any help at all would be appreciated!
>
> Cheers, Chris.
> mailto:chris.anderson@xxxxxxxxxx
> --
> "Personally, I am of the Opinion that The Bible(tm) has historical
> value only slightly greater than The Silmarillion. But, that's
> just My Opinion, and this is Usenet." -- David Eoll in ASR
>
|