[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

2 default gateway on two diffrent nic



Hi,

I've been trying to set up a full redundant web system using loadbalancing
technics (ultramonkey). To incorporate a redundancy in the network itself
(in case a switch fails) each machine behind the loadbalancer has two
internal nics on two diffrent networks.


		  (external ip)
			eth0
		   loadbalancer
	    eth1		    eth2
	192.168.7.2 	192.168.8.2
		¦			¦
		¦			¦
		¦			¦
	192.168.7.4		192.168.8.4
	    eth0 		    eth1
		    webserver1

default gateway for eth0 (webserver1) is 192.168.7.2
default gateway for eth1 (webserver1) is 192.168.8.2


My problem is the following:

I set up load balancing which works fine when only one nic is up on the web
server. I can ping -I eth0 www.google.com or ping -I eth1 www.google.com
respectevely when eth0 or eth1 is up. The problems start when both cards are
up. I can only ping with one interface outside of the local net (local pings
works on both nics). It is always the last card ifup'ed that can ping. If I
don't specify the interface while pinging it works fine using the last
ifup'ed interface. My biggest problem is that the load balancer thinks both
nics are up and that the service is available on both, thus every second
time i get no response from the web server.

I'm pretty shure this has to do with having two gateways for a single
machine. When I remove the default route of the first card (the one that
works) I can suddenly ping the outside world on the second card.

I used tcpdump while pinging with the card that doesn't work. I can see the
packages returing from the right source (if I ping -I eth0 64.233.179.104
which doesnt work and look at tcp dump on eth0 I see the returning packages
with the right source and destination IP)... I have no idea why these
packages are discarded... Any one an idea ?


Thanks for any help

Jean-Philippe







Reply to: