Hi,
I have a topology (attached with this post) in which:
Linux machine 2 has two virtual interfaces eth0 and eth1. eth0 is connected to the external switch.
In Linux machine 1, I've added the default gateway as:
route add default gw 192.168.100.10
so that all the packets leaving Linux machine 1 are received at eth1 interface of Linux machine 2.
Using iptables, I have written rules in Linux machine 2 to forward any packets received at eth1 interface to the eth0 interface. (using these commands)
Now, I am using pcktgen to tranmit packets in the following different cases:
Case 1>> Packets are successfully transmitted from Linux machine 2 to Linux machine 3 (by specifying dst ip: 10.10.10.10).
Case 2>> Packets are successfully transmitted from Linux machine 1 to either of the interfaces (eth1=> dst ip: 192.168.100.10 or eth0=> dst ip:10.10.10.4) of Linux machine 2.
Problem Case 3>> However, when I try to transmit the packets from Linux machine 1 to Linux machine 3 (by specifying the dst ip:10.10.10.10), packets don't even reach the eth1 interface of Linux machine 2.
iperf works fine in all of the above cases and I am able to ping all of the IP Addresses from Linux machine 1 as well.
Kindly guide me what is the reason behind this or if I am missing on something. Any help would be much appreciated;
Thanks.