Find the answer to your Linux question:
Results 1 to 2 of 2
I have the following topology: Capture.jpg Linux machine 2 has two virtual interfaces: eth0 and eth1. eth1 is connected to the external switch. In Linux machine 1, I've added the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    1

    pktgen: packets donot pass through gateway


    I have the following topology:
    Capture.jpg

    Linux machine 2 has two virtual interfaces: eth0 and eth1. eth1 is connected to the external switch.

    In Linux machine 1, I've added the default gateway as:
    Code:
    $> 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.

    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.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    Make sure FORWARD is set to 'ON' on system 2. IPTABLES does not forward packets the kernel does this step.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •