I have sporadic routing problems in my setup which I suspect to be an issue with the routing and two network interfaces.
- I'm running two maschines with XenServer
- They both have a public NIC with an own IP for internet traffic
- They both have a private NIC with a Cross-Over-Cable for local traffic
The VMs both also have two (virtual) NICs, eth0 with their own public IP and eth1 for the local traffic.
Occasionally I can reach the servers from the outside but they are not able to ping/reach each other locally.
Public IP local IP xh01 aa.bb.10.214 192.168.1.1 xh02 aa.bb.10.215 192.168.1.2 lb01 aa.bb.10.242 192.168.1.3 lb02 aa.bb.10.241 192.168.1.4 be01 aa.bb.10.239 192.168.1.5 be02 aa.bb.10.240 192.168.1.6
Example routes on lb01:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 aa.bb.10.215 0.0.0.0 UG 100 0 0 eth0 aa.bb.10.192 aa.bb.10.193 255.255.255.192 UG 0 0 0 eth0 aa.bb.10.193 0.0.0.0 255.255.255.255 UH 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
Now, sometimes for example I can't ping lb01 from be01.
With 'tcpdump' on lb01 I can see that the ICMP echo request reaches lb01 but I can't see an answer. Also, if I issue a tracepath on one of the hosts to the other, the ping suddenly gets a reply.
My suspicion is, that since the maschines can reach each other via both interfaces, outgoing traffic of a connection is not routet to the same interface as the incoming. I guess that would mean that I have to set up different routing tables?
Could someone with a deeper knowledge in the whole routing stuff give me a few hints on how fix this?