I have 2 pairs of setups.
1. OpenSuse(A) and Opensuse(B)
2. OpenSuse(C) and Centos(D)
I have 3 interfaces in both the setups, all are connected internally between them.
i.e, First pair has eth0,eth1,eth2
and second pair has eth0,eth1,eth2
.
The IP addresses assigned to the interfaces are as follows:
First pair
- Opensuse eth0-172.28.215.10/24, eth1-20.1.121.2/24, eth2-30.1.121.2/24
- Opensuse eth0-172.28.215.11/24, eth1-20.1.121.3/24, eth2-30.1.121.3/24
Second pair
- Opensuse eth0-172.28.215.20, eth1-21.1.121.2, eth2-31.1.121.2
- Centos eth0-172.28.215.21, eth1-21.1.121.3, eth2-31.1.121.3
172.28.215.1
is the gateway for eth0. There are no gateways for eth1 and eth2. And there is no cable connected between AB and CD regarding eth1 and eth2, but only eth0. i.e, eth1 and eth2 are connected between A&B but not between A&C or A&D
The problem is
In first pair(A&B):
20.1.121.2 --> 20.1.121.3 -- works fine
20.1.121.2 --> 30.1.121.3 -- works fine
30.1.121.2 --> 20.1.121.3 -- works fine
30.1.121.2 --> 30.1.121.3 -- works fine
and the other way also works fine More over I could ARP packets being sent between different subnets. I don't know how this happened. May be arptables configured like that, I am new to arptables concept.
Where as in second pair(C&D)
21.1.121.2 --> 21.1.121.3 -- works fine
21.1.121.2 --> 31.1.121.3 -- doesn't work
31.1.121.2 --> 21.1.121.3 -- doesn't work
31.1.121.2 --> 31.1.121.3 -- works fine
The scenario where packets are not being sent is between different subnets. Here what's happening is(regarding arp and routes):
21.1.121.2 -> 21.1.121.3 ==> arp request was sent from C and arp response came from D and the packet was sent perfectly on eth1.
21.1.121.2 -> 31.1.121.3 ==> arp request was sent from C and arp response never came from D so, the packet was not sent.
Now what makes it more interesting is packet transfer from D to C:
21.1.121.3 -> 21.1.121.2 ==> arp request was sent from D and arp response came from C and the packet was sent perfectly on eth1.
31.1.121.3 -> 21.1.121.2 ==> arp request was never sent from D. Instead the packet was sent on eth0.
FYI: I could see all this in tshark/tethereal
packet capture. And I cleared the arp cache before doing this. I decided the packets sent and received based on mac addresses. The packets we were sending are SIP packets.
Please let me know if you need any more information.
Now the question is, why is this difference and what should I do for the second pair(mostly on machine D) to work as first one?