3

I am looking for a way how I can run iperf benchmark between 2 interfaces on the same host as shown on the schema:

Setup Schema

Both of the machines (pc and router) are linux.
I'm need a way to run some functional tests on my "router" machine using my only 1 PC with 2 ethernet ports.


I tried already few different ways to solve it but still no luck:
1) Adding static routes for destination hosts with metric
2) Binding iperf to specific ip address
3) Disabling local loopback interface

Basicly what I'm looking for is to run traffic 192.168.1.10<-->1.1.1.10 thru the router device (with ip forwarding enabled).

user2988257
  • 882
  • 4
  • 25
  • 43
  • 1
    Could you add the routing tables on your host computer to your post. Also, consider asking this on http://superuser.com since this is not really a programming question. – Dima Chubarov Jul 30 '15 at 11:04
  • Maybe checkout: https://github.com/esnet/iperf/issues/865 – JohannesB Mar 17 '22 at 10:16

1 Answers1

3

Don't forget to bind the server as well:

For the server run iperf -s -B 1.1.10 in terminal and on another terminal instance for the client run iperf -c 1.1.10 -B 192.168.1.10 This will normally work if your OS doesn't use the loop-back interface by default.

  • No, tried it already, it doesn't work: `[root@localhost ~]# iperf -s -B 1.1.1.10 & [1] 18312 [root@localhost ~]# ------------------------------------------------------------ Server listening on TCP port 5001 Binding to local address 1.1.1.10 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [root@localhost ~]# iperf -c 1.1.1.10 -B 192.168.1.10 connect failed: Connection timed out [root@localhost ~]# ` Local Loopback (lo) interface is down – user2988257 Sep 01 '15 at 13:06