0

I've been using iperf for some time but at present day i need to use the birectional test using -d or -r in the iperf command. The thing is that i always have "Connect failed: Connection refused" when using more than on thread. The scenario is:

  1. 2 laptops (192.168.1.20 - Client & 192.168.1.185 Server) (Windows 10 & Windows 8.1). I've also tested changing the server for client. Same results.
  2. in the server side i launch: iperf -s -w 1MB
  3. In client side: iperf -c 192.168.1.185 -w 1MB -d -P 5 -L 20000. In server side i receive:

(i've tested this with iperf 2.0.8 and 2.0.9) (CMD windows is opened in Admin mode, just to be sure)

D:\iperf\iperf-2.0.8b-win64>iperf -s -w 1MB

Server listening on TCP port 5001

TCP window size: 1.00 MByte

[ 4] local 192.168.1.185 port 5001 connected with 192.168.1.20 port

2388

Client connecting to 192.168.1.20, TCP port 20000

TCP window size: 1.00 MByte

  • [ 9] local 192.168.1.185 port 55098 connected with 192.168.1.20 port 20000
  • [ 7] local 192.168.1.185 port 55096 connected with 192.168.1.20 port 20000
  • [ 8] local 192.168.1.185 port 55097 connected with 192.168.1.20 port 20000
  • [ 6] local 192.168.1.185 port 55095 connected with 192.168.1.20 port 20000
  • [ 5] local 192.168.1.185 port 55094 connected with 192.168.1.20 port 20000
  • [ 10] local 192.168.1.185 port 5001 connected with 192.168.1.20 port 2390
  • [ 16] local 192.168.1.185 port 5001 connected with 192.168.1.20 port 2386
  • [ 21] local 192.168.1.185 port 5001 connected with 192.168.1.20 port 2387
  • [ 28] local 192.168.1.185 port 5001 connected with 192.168.1.20 port 2389
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • connect failed: Connection refused
  • [ ID] Interval Transfer Bandwidth
  • [ 9] 0.0-10.0 sec 99.0 MBytes 83.0 Mbits/sec
  • [ 7] 0.0-10.0 sec 109 MBytes 91.0 Mbits/sec
  • [ 8] 0.0-10.0 sec 110 MBytes 92.1 Mbits/sec
  • [ 5] 0.0-10.0 sec 98.9 MBytes 82.8 Mbits/sec
  • [ 6] 0.0-10.0 sec 106 MBytes 88.7 Mbits/sec
  • [SUM] 0.0-10.0 sec 523 MBytes 437 Mbits/sec
  • [ 16] 0.0-13.4 sec 28.9 MBytes 18.1 Mbits/sec
  • [ 21] 0.0-13.5 sec 42.8 MBytes 26.5 Mbits/sec
  • [ 4] 0.0-13.5 sec 32.1 MBytes 19.9 Mbits/sec
  • [ 10] 0.0-13.5 sec 29.0 MBytes 18.0 Mbits/sec
  • [ 28] 0.0-13.5 sec 33.4 MBytes 20.7 Mbits/sec
  • [SUM] 0.0-13.5 sec 166 MBytes 103 Mbits/sec
  • D:\iperf\iperf-2.0.8b-win64>

And in client side i receive:

  • D:\iperf\iperf-2.0.8b-win64>iperf -c 192.168.1.185 -w 1MB -P5 -d -L20000

Server listening on TCP port 20000

TCP window size: 1.00 MByte

  • [ 9] local 192.168.1.20 port 20000 connected with 192.168.1.185 port 55094
  • [ 10] local 192.168.1.20 port 20000 connected with 192.168.1.185 port 55095
  • [ 11] local 192.168.1.20 port 20000 connected with 192.168.1.185 port 55096
  • [ 12] local 192.168.1.20 port 20000 connected with 192.168.1.185 port 55097
  • [ 13] local 192.168.1.20 port 20000 connected with 192.168.1.185 port 55098


  • Client connecting to 192.168.1.185, TCP port 5001

  • TCP window size: 1.00 MByte


  • [ 3] local 192.168.1.20 port 2386 connected with 192.168.1.185 port 5001

  • [ 4] local 192.168.1.20 port 2387 connected with 192.168.1.185 port 5001
  • [ 7] local 192.168.1.20 port 2389 connected with 192.168.1.185 port 5001
  • [ 8] local 192.168.1.20 port 2390 connected with 192.168.1.185 port 5001
  • [ 5] local 192.168.1.20 port 2388 connected with 192.168.1.185 port 5001
  • [ ID] Interval Transfer Bandwidth
  • [ 9] 0.0-10.1 sec 98.9 MBytes 81.8 Mbits/sec
  • [ 10] 0.0-10.1 sec 106 MBytes 87.8 Mbits/sec
  • [ 11] 0.0-10.1 sec 109 MBytes 90.0 Mbits/sec
  • [ 12] 0.0-10.1 sec 110 MBytes 91.4 Mbits/sec
  • [ 13] 0.0-10.1 sec 99.0 MBytes 82.3 Mbits/sec
  • [SUM] 0.0-10.1 sec 523 MBytes 432 Mbits/sec
  • [ 3] 0.0-10.0 sec 28.9 MBytes 24.1 Mbits/sec
  • [ 4] 0.0-10.0 sec 42.8 MBytes 35.8 Mbits/sec
  • [ 7] 0.0-10.0 sec 33.4 MBytes 27.9 Mbits/sec
  • [ 8] 0.0-10.0 sec 29.0 MBytes 24.3 Mbits/sec
  • [ 5] 0.0-10.0 sec 32.1 MBytes 26.9 Mbits/sec
  • [SUM] 0.0-10.0 sec 166 MBytes 139 Mbits/sec

I've checked everything that has passed my mind and nothing. I'm testing the througput between 2 routers. Both routers are connected through WDS, and the ping between bot computers, each connected to one of the routers is correct (iperf works although not 100% correctly). I've put bot laptops in DMZ of router to avoid any port contraints. Alse deactivated SPI firewal available in each router. Both laptops do not have antivirus, and both windows firewall are all deactivated. (Even so just in case i've added an inbound and outbound rule to the program iperf, with no kind of restraints). Also both laptops have the same User session (Same user name, password and both are admins).

But after a couple days, i alwyas have the connection refused. If i launch a basic iperf withouth -P5, i do not have this problem. Can someone give me an idea? Many thanks!!!

  • Is half-open connections limit disabled in Windows on both laptops? If not then disable it. Is the Qos Packet Scheduler enabled on network adapter? If not then enable it. Use ping with packet size 1400 bytes and count 100 at one time when you run iperf. How many packets will be lost? And what minimum and average timeouts will be? – Mikhail Khirgiy Oct 6 '16 at 19:31
  • Hi Mikhail.Thanks for the comments. halp-open connections limit is not activated or disabled in Windows 8.1/10. In registry there is no entrance where it should. Even so i added, disabling the limit. My netwotk adapter does not have QoS Packet Scheduler in adavanced options. Regarding ping packet test i have not done it yet. I'll try to test it soon. Many thanks. – Portuguevos Oct 18 '16 at 14:50
1

This should be fixed now, or at least for TCP. There still are some issues with -d, -P and -u that I need to figure out.

Should look something like:

[root@hera iperf2-code]# src/iperf -v

iperf version 2.0.10alpha (18 Oct 2016) pthreads

Client:

root@hera iperf2-code]# src/iperf -c 10.19.85.173 -w 1MB -P 5 -d -e 
------------------------------------------------------------
Server listening on TCP port 5001 with pid 10748
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
Alloc 11 multislots
------------------------------------------------------------
Client connecting to 10.19.85.173, TCP port 5001 with pid 10748
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[  9] local 10.19.85.172 port 35166 connected with 10.19.85.173 port 5001
[  6] local 10.19.85.172 port 35158 connected with 10.19.85.173 port 5001
[  5] local 10.19.85.172 port 35160 connected with 10.19.85.173 port 5001
[  7] local 10.19.85.172 port 35162 connected with 10.19.85.173 port 5001
[  8] local 10.19.85.172 port 35164 connected with 10.19.85.173 port 5001
[  4] local 10.19.85.172 port 5001 connected with 10.19.85.173 port 48948
[ 10] local 10.19.85.172 port 5001 connected with 10.19.85.173 port 48950
[ 12] local 10.19.85.172 port 5001 connected with 10.19.85.173 port 48954
[ 11] local 10.19.85.172 port 5001 connected with 10.19.85.173 port 48952
[ 14] local 10.19.85.172 port 5001 connected with 10.19.85.173 port 48956
[ ID] Interval        Transfer    Bandwidth       Write/Err  Rtry        Cwnd/RTT
[  9] 0.00-10.00 sec   235 MBytes   197 Mbits/sec  1/0          0       49K/1173 us
[  5] 0.00-10.00 sec   196 MBytes   165 Mbits/sec  1/0          0       35K/957 us
[  7] 0.00-10.00 sec   200 MBytes   167 Mbits/sec  1/0          0       36K/894 us
[  6] 0.00-10.01 sec   213 MBytes   179 Mbits/sec  1/0          0       52K/1282 us
[  8] 0.00-10.01 sec   192 MBytes   161 Mbits/sec  1/0          0       41K/2145 us
[SUM] 0.00-10.01 sec  1.01 GBytes   868 Mbits/sec  5/0         0
[ 10] 0.00-10.01 sec   206 MBytes   172 Mbits/sec  93076    93074:2:0:0:0:0:0:0
[ 11] 0.00-10.01 sec   208 MBytes   174 Mbits/sec  93550    93548:1:1:0:0:0:0:0
[  4] 0.00-10.02 sec   217 MBytes   182 Mbits/sec  90896    90895:0:0:0:1:0:0:0
[ 12] 0.00-10.02 sec   197 MBytes   165 Mbits/sec  92646    92639:6:1:0:0:0:0:0
[ 14] 0.00-10.02 sec   208 MBytes   174 Mbits/sec  93687    93684:0:2:1:0:0:0:0

Server:

[root@zeus iperf2-code]# src/iperf -s -e -P10
------------------------------------------------------------
Server listening on TCP port 5001 with pid 24290
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 10.19.85.172, TCP port 5001 with pid 24290
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------  
[ 10] local 10.19.85.173 port 48948 connected with 10.19.85.172 port 5001
------------------------------------------------------------
Client connecting to 10.19.85.172, TCP port 5001 with pid 24290
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[ 11] local 10.19.85.173 port 48950 connected with 10.19.85.172 port 5001
------------------------------------------------------------
Client connecting to 10.19.85.172, TCP port 5001 with pid 24290
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[ 13] local 10.19.85.173 port 48952 connected with 10.19.85.172 port 5001
------------------------------------------------------------
Client connecting to 10.19.85.172, TCP port 5001 with pid 24290
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[ 12] local 10.19.85.173 port 48954 connected with 10.19.85.172 port 5001
------------------------------------------------------------
Client connecting to 10.19.85.172, TCP port 5001 with pid 24290
TCP window size:  416 KByte (WARNING: requested 1.00 MByte)
------------------------------------------------------------
[ 14] local 10.19.85.173 port 48956 connected with 10.19.85.172 port 5001
[ ID] Interval        Transfer    Bandwidth       Reads   Dist(bin=16.0K)
[  6] 0.00-10.01 sec   200 MBytes   167 Mbits/sec  94147    94146:1:0:0:0:0:0:0
[  9] 0.00-10.01 sec   235 MBytes   197 Mbits/sec  93822    93819:2:0:0:0:1:0:0
[ 11] 0.00-10.00 sec   206 MBytes   173 Mbits/sec  1/0          0       38K/832 us
[ 13] 0.00-10.00 sec   208 MBytes   174 Mbits/sec  1/0          0       57K/820 us
[  5] 0.00-10.02 sec   196 MBytes   164 Mbits/sec  93704    93703:1:0:0:0:0:0:0
[  7] 0.00-10.02 sec   192 MBytes   160 Mbits/sec  92715    92712:3:0:0:0:0:0:0
[ 10] 0.00-10.01 sec   217 MBytes   182 Mbits/sec  1/0          0      100K/5649 us
[ 12] 0.00-10.01 sec   197 MBytes   165 Mbits/sec  1/0          0       57K/628 us
[ 14] 0.00-10.00 sec   208 MBytes   174 Mbits/sec  1/0          0       63K/1962 us
[  4] 0.00-10.02 sec   213 MBytes   178 Mbits/sec  91756    91754:2:0:0:0:0:0:0

Bob

0

This looks like an iperf 2 bug. I'm looking into now. You can file a ticket if you want.

Bob

0

I tried to talk in iperf forum but for some reason i cannot remembe i was not able to add a comment. Since iperf is already in version 3, i believe they do not change / correct /develop older versions. Iperf 3 does not have -r or -d options. Still, i hope to do some more tests this week. I'll get back here with my results. Many thanks.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.