2
I have a network that has to be configured as a loop. It consists on 3 nodes each of which has two interfaces. The diagram below explains it.
+--->(eth0) Node 1 (eth1)--->(eth0) Node 2 (eth1)--->(eth0) Node 3 (eth1)--->+
| 10.0.3.1 10.0.1.1 10.0.1.2 10.0.2.2 10.0.2.3 10.0.3.3 |
+--<----------------------------<--------------------------------------------+
I want to make a ping from Node 1 to Node 3 so the request goes through Node2 and the reply goes directly to Node 1 from Node 3.
node1$ ping 10.0.2.3
I have configured the nodes as:
node1# route add -net 10.0.2.0/24 gw 10.0.1.2
node2# route add -net 10.0.3.0/24 gw 10.0.2.3
node3# route add -net 10.0.1.0/24 gw 10.0.3.1
When running the ping, the request from Node 1 arrives at Node 3. However Node 3 doesn't reply, it does not generate even the reply (at least that I can capture with wireshark).
Could you please give me some hint?
TA
I have managed to make the loop. I have to include net.ipv4.conf.all.rp_filter=0 in order to get the reply generated. However when the package arrives at the destination node on the other interface, the ping doesn't considered the packet as good and therefore the ping doesn't succeed, but the packet got there. The destination and source address of the reply doesn't match the ones on the request. I guess this is the reason. – jlanza – 2013-01-11T18:12:33.813
That's bizarre. If you're not doing any NAT, there's no reason the addresses wouldn't match. – David Schwartz – 2013-01-11T18:49:55.457
the packet received if I recall (not in front of the system right now) has the same addresses (sorry) the issue is that as the packet is received through a different interface it seems that is not acknowledging it. I have to further test if time let me do so. – jlanza – 2013-01-13T10:06:44.800