Find the answer to your Linux question:
Results 1 to 7 of 7
Hello All, I'm trying to do network testing using iperf or netperf tools, and I'd like to be able to run both the client and server on the same computer. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2012
    Posts
    2

    Network Performance test - server and client on same computer


    Hello All,

    I'm trying to do network testing using iperf or netperf tools, and I'd like to be able to run both the client and server on the same computer.

    The problem is that the packets sent internally route (in the kernel) and not going out to the out side world (physical layer).

    Does some one have an example how to work with iperf or netperf tools with the same computer with two Ethernet device that connecting to device i need to test?

    Thanks in advance!!!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    You will need dual network adapters (cards/nics) and set up your routing tables accordingly so that packets are sent outside to the network router back to the other nic. You might be able to do this with one nic with a virtual nic, but otherwise the issues are the same.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    First question is what is your goal? What are you trying to prove or dis-prove?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #4
    Just Joined!
    Join Date
    Dec 2012
    Posts
    2
    Thanks a lot for the answers,

    i need it to test a Gigabit Ethernet Switch (with 24 Ethernet ports) the way i do it now is to connect from "computer 1 (run netserver)" to the first Ethernet port in the switch the other ports are connected one to each other and the last Ethernet port connected to "computer 2 (run netperf)".

    i will like to do the same test only with one computer (with two Ethernet ports), the problem is when i have using Netperf/iperf (even if i do ping before) probably in the kernel there is a routing between the two ports and no packets going out to the real world.

    "You will need dual network adapters (cards/nics) and set up your routing tables accordingly so that packets are sent outside to the network router back to the other nic. You might be able to do this with one nic with a virtual nic, but otherwise the issues are the same."

    i have two nics, but i cat send outside packets from one nic to the other by using Netperf/iperf, i have already configure different subnet to each of the nic's and also try to use VLAN's the result was the same.

    do you have example how to do it?

    Thanks in advance

    and HAPPY NEW YEAR!!!

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Look at the following and let me know if this is helpful.

    Force local ip traffic to an external interface

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    Quote Originally Posted by Lazydog View Post
    Look at the following and let me know if this is helpful.

    Force local ip traffic to an external interface
    Good link LD. I knew the general methods, but not specifically how to do it. Thanks.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Same here that is why I went on the search after I understood more what the OP was looking for.

    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
  •