IPerf - IPerf3 and IPerf2 User Documentation
IPerf - IPerf3 and IPerf2 User Documentation
IPerf - IPerf3 and IPerf2 User Documentation
iPerfiPerf3andiPerf2userdocumentation
Home
Contact
Table of contents :
1. Change between iPerf 2.0, iPerf 3.0 and iPerf 3.1
2. iPerf 3 user documentation
3. iPerf 2 user documentation
1/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
2/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
3/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
-n, --num
n[KM]
The number of buffers to transmit. Normally, iPerf sends for 10 seconds. The -n option
overrides this and sends an array of len bytes num times, no matter how long that takes. See
also the -l, -k and -t options.
-k, -The number of blocks (packets) to transmit. (instead of -t or -n) See also the -t, -l and -n
blockcount options.
n[KM]
-l, --length The length of buffers to read or write. iPerf works by writing an array of len bytes a number of
n[KM]
times. Default is 128 KB for TCP, 8 KB for UDP. See also the -n, -k and -t options.
-P, -The number of simultaneous connections to make to the server. Default is 1.
parallel n
-R, -Run in reverse mode (server sends, client receives).
reverse
-w, -Sets the socket buffer sizes to the specified value. For TCP, this sets the TCP window size.
window
(this gets sent to the server and used on that side too)
n[KM]
-M, --set- Attempt to set the TCP maximum segment size (MSS). The MSS is usually the MTU - 40 bytes
mss n
for the TCP/IP header. For ethernet, the MSS is 1460 bytes (1500 byte MTU).
-N, --no- Set the TCP no delay option, disabling Nagle's algorithm. Normally this is only disabled for
delay
interactive applications like telnet.
-4, -only use IPv4.
version4
-6, -only use IPv6.
version4
-S, --tos n The type-of-service for outgoing packets. (Many routers ignore the TOS field.) You may
specify the value in hex with a '0x' prefix, in octal with a '0' prefix, or in decimal. For example,
'0x10' hex = '020' octal = '16' decimal. The TOS numbers specified in RFC 1349 are:
IPTOS_LOWDELAYminimizedelay0x10
IPTOS_THROUGHPUTmaximizethroughput0x08
IPTOS_RELIABILITYmaximizereliability0x04
IPTOS_LOWCOSTminimizecost0x02
-L, -flowlabel n
-Z, -zerocopy
-O, --omit
n
-T, --title
str
-C, --linuxcongestion
algo
4/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
GENERAL OPTIONS
Command Environment variable
Description
line option
option
-f, --format
$IPERF_FORMAT
A letter specifying the format to print bandwidth numbers in.
[bkmaBKMA]
Supported formats are
'b'=bits/sec'B'=Bytes/sec
'k'=Kbits/sec'K'=KBytes/sec
'm'=Mbits/sec'M'=MBytes/sec
'g'=Gbits/sec'G'=GBytes/sec
'a'=adaptivebits/sec'A'=adaptiveBytes/sec
-m, -print_mss
$IPERF_PRINT_MSS
https://iperf.fr/iperfdoc.php#change
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
MSS is usually the MTU - 40 bytes for the TCP/IP header. Often a
slightly smaller MSS is reported because of extra header space from
IP options. The interface type corresponding to the MTU is also
printed (ethernet, FDDI, etc.). This option is not implemented on
many OSes, but the read sizes may still indicate the MSS.
-p, --port #
$IPERF_PORT
The server port for the server to listen on and the client to connect
to. This should be the same in both client and server. Default is 5001,
the same as ttcp.
-u, --udp
$IPERF_UDP
Use UDP rather than TCP. See also the -b option.
-w, --window $TCP_WINDOW_SIZE Sets the socket buffer sizes to the specified value. For TCP, this sets
#[KM]
the TCP window size. For UDP it is just the buffer which datagrams
are received in, and so limits the largest receivable datagram size.
-B, --bind
$IPERF_BIND
Bind to host, one of this machine's addresses. For the client this sets
host
the outbound interface. For a server this sets the incoming interface.
This is only useful on multihomed hosts, which have multiple
network interfaces.
For iPerf in UDP server mode, this is also used to bind and join to a
multicast group. Use addresses in the range 224.0.0.0 to
239.255.255.255 for multicast. See also the -T option.
-C, -$IPERF_COMPAT
compatibility
-M, --mss #
[KM}
$IPERF_MSS
Compatibility mode allows for use with older version of iPerf. This
mode is not required for interoperability but it is highly
recommended. In some cases when using representative streaming
you could cause a 1.7 server to crash or cause undesired connection
attempts.
Attempt to set the TCP maximum segment size (MSS) via the
TCP_MAXSEG option. The MSS is usually the MTU - 40 bytes for the
TCP/IP header. For ethernet, the MSS is 1460 bytes (1500 byte
MTU). This option is not implemented on many OSes.
Set the TCP no delay option, disabling Nagle's algorithm. Normally
this is only disabled for interactive applications like telnet.
Bind to an IPv6 address
Server side:
$ iperf -s -V
Client side:
$ iperf -c <Server IPv6 Address> -V
-h, --help
-v, --version
Note: On version 1.6.3 and later a specific IPv6 Address does not
need to be bound with the -B option, previous 1.6 versions do. Also
on most OSes using this option will also respond to IPv4 clients using
IPv4 mapped addresses.
Print out a summary of commands and quit.
Print version information and quit. Prints 'pthreads' if compiled with
POSIX threads, 'win32 threads' if compiled with Microsoft Win32
threads, or 'single threaded' if compiled without threads.
SERVER SPECIFIC OPTIONS
https://iperf.fr/iperfdoc.php#change
6/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
Environment variable
Description
option
$IPERF_BANDWIDTH The UDP bandwidth to send at, in bits/sec. This implies the -u option.
Default is 1 Mbit/sec.
$IPERF_CLIENT
7/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
-S, --tos #
$IPERF_TOS
-T, --ttl #
$IPERF_TTL
-F (from v1.2 .
or higher)
-I (from v1.2 .
or higher)
https://iperf.fr/iperfdoc.php#change
8/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
ServerlisteningonTCPport5001
TCPwindowsize:60.0KByte(default)
[4]local<IPAddrnode2>port5001connectedwith<IPAddrnode1>port2357
[ID]IntervalTransferBandwidth
[4]0.010.1sec6.5MBytes5.2Mbits/sec
node1>iperfcnode2
Clientconnectingtonode1,TCPport5001
TCPwindowsize:59.9KByte(default)
[3]local<IPAddrnode1>port2357connectedwith<IPAddrnode2>port5001
[ID]IntervalTransferBandwidth
[3]0.010.0sec6.5MBytes5.2Mbits/sec
node2>iperfsw130k
ServerlisteningonTCPport5001
TCPwindowsize:130KByte
[4]local<IPAddrnode2>port5001connectedwith<IPAddrnode1>port2530
[ID]IntervalTransferBandwidth
[4]0.010.1sec19.7MBytes15.7Mbits/sec
node1>iperfcnode2w130k
Clientconnectingtonode2,TCPport5001
TCPwindowsize:129KByte(WARNING:requested130KByte)
[3]local<IPAddrnode1>port2530connectedwith<IPAddrnode2>port5001
[ID]IntervalTransferBandwidth
[3]0.010.0sec19.7MBytes15.8Mbits/sec
Another test to do is run parallel TCP streams. If the total aggregate bandwidth is more than what an
individual stream gets, something is wrong. Either the TCP window size is too small, or the OS's TCP
implementation has bugs, or the network itself has deficiencies. See above for TCP window sizes;
otherwise diagnosing which is somewhat difficult. If iPerf is compiled with pthreads, a single client and
server can test this, otherwise setup multiple clients and servers on different ports. Here's an example
where a single stream gets 16.5 Mbit/sec, but two parallel streams together get 16.7 + 9.4 = 26.1 Mbit/sec,
even when using large TCP window sizes:
node2>iperfsw300k
ServerlisteningonTCPport5001
TCPwindowsize:300KByte
[4]local<IPAddrnode2>port5001connectedwith<IPAddrnode1>port6902
[ID]IntervalTransferBandwidth
[4]0.010.2sec20.9MBytes16.5Mbits/sec
https://iperf.fr/iperfdoc.php#change
9/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
[4]local<IPAddrnode2>port5001connectedwith<IPAddrnode1>port6911
[5]local<IPAddrnode2>port5001connectedwith<IPAddrnode2>port6912
[ID]IntervalTransferBandwidth
[5]0.010.1sec21.0MBytes16.7Mbits/sec
[4]0.010.3sec12.0MBytes9.4Mbits/sec
node1>./iperfcnode2w300k
Clientconnectingtonode2,TCPport5001
TCPwindowsize:299KByte(WARNING:requested300KByte)
[3]local<IPAddrnode2>port6902connectedwith<IPAddrnode1>port5001
[ID]IntervalTransferBandwidth
[3]0.010.2sec20.9MBytes16.4Mbits/sec
node1>iperfcnode2w300kP2
Clientconnectingtonode2,TCPport5001
TCPwindowsize:299KByte(WARNING:requested300KByte)
[4]local<IPAddrnode2>port6912connectedwith<IPAddrnode1>port5001
[3]local<IPAddrnode2>port6911connectedwith<IPAddrnode1>port5001
[ID]IntervalTransferBandwidth
[4]0.010.1sec21.0MBytes16.6Mbits/sec
[3]0.010.2sec12.0MBytes9.4Mbits/sec
A secondary tuning issue for TCP is the maximum transmission unit (MTU). To be most effective, both
hosts should support Path MTU Discovery. Hosts without Path MTU Discovery often use 536 as the MSS,
which wastes bandwidth and processing time. Use the -m option to display what MSS is being used, and
see if this matches what you expect. Often it is around 1460 bytes for ethernet.
node3>iperfsm
ServerlisteningonTCPport5001
TCPwindowsize:60.0KByte(default)
[4]local<IPAddrnode3>port5001connectedwith<IPAddrnode4>port1096
[ID]IntervalTransferBandwidth
[4]0.02.0sec1.8MBytes6.9Mbits/sec
[4]MSSsize1448bytes(MTU1500bytes,ethernet)
[4]Readlengthsoccurringinmorethan5%ofreads:
[4]952bytesread219times(16.2%)
[4]1448bytesread1128times(83.6%)
Here is a host that doesn't support Path MTU Discovery. It will only send and receive small 576 byte
packets.
node4>iperfsm
ServerlisteningonTCPport5001
TCPwindowsize:32.0KByte(default)
https://iperf.fr/iperfdoc.php#change
10/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
[4]local<IPAddrnode4>port5001connectedwith<IPAddrnode3>port13914
[ID]IntervalTransferBandwidth
[4]0.02.3sec632KBytes2.1Mbits/sec
WARNING:PathMTUDiscoverymaynotbeenabled.
[4]MSSsize536bytes(MTU576bytes,minimum)
[4]Readlengthsoccurringinmorethan5%ofreads:
[4]536bytesread308times(58.4%)
[4]1072bytesread91times(17.3%)
[4]1608bytesread29times(5.5%)
iPerf supports other tuning options, which were added for exceptional network situations like HIPPI-toHIPPI over ATM.
ServerlisteningonUDPport5001
Receiving1470bytedatagrams
UDPbuffersize:60.0KByte(default)
[4]local<IPAddrnode2>port5001connectedwith<IPAddrnode1>port9726
[ID]IntervalTransferBandwidthJitterLost/TotalDatagrams
[4]0.01.0sec1.3MBytes10.0Mbits/sec0.209ms1/894(0.11%)
[4]1.02.0sec1.3MBytes10.0Mbits/sec0.221ms0/892(0%)
[4]2.03.0sec1.3MBytes10.0Mbits/sec0.277ms0/892(0%)
[4]3.04.0sec1.3MBytes10.0Mbits/sec0.359ms0/893(0%)
[4]4.05.0sec1.3MBytes10.0Mbits/sec0.251ms0/892(0%)
[4]5.06.0sec1.3MBytes10.0Mbits/sec0.215ms0/892(0%)
[4]6.07.0sec1.3MBytes10.0Mbits/sec0.325ms0/892(0%)
[4]7.08.0sec1.3MBytes10.0Mbits/sec0.254ms0/892(0%)
[4]8.09.0sec1.3MBytes10.0Mbits/sec0.282ms0/892(0%)
https://iperf.fr/iperfdoc.php#change
11/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
[4]0.010.0sec12.5MBytes10.0Mbits/sec0.243ms1/8922(0.011%)
node1>iperfcnode2ub10m
Clientconnectingtonode2,UDPport5001
Sending1470bytedatagrams
UDPbuffersize:60.0KByte(default)
[3]local<IPAddrnode1>port9726connectedwith<IPAddrnode2>port5001
[ID]IntervalTransferBandwidth
[3]0.010.0sec12.5MBytes10.0Mbits/sec
[3]Sent8922datagrams
Notice the higher jitter due to datagram reassembly when using larger 32 KB datagrams, each split into 23
packets of 1500 bytes. The higher datagram loss seen here may be due to the burstiness of the traffic,
which is 23 back-to-back packets and then a long pause, rather than evenly spaced individual packets.
node2>iperfsul32kw128ki1
ServerlisteningonUDPport5001
Receiving32768bytedatagrams
UDPbuffersize:128KByte
[3]local<IPAddrnode2>port5001connectedwith<IPAddrnode1>port11303
[ID]IntervalTransferBandwidthJitterLost/TotalDatagrams
[3]0.01.0sec1.3MBytes10.0Mbits/sec0.430ms0/41(0%)
[3]1.02.0sec1.1MBytes8.5Mbits/sec5.996ms6/40(15%)
[3]2.03.0sec1.2MBytes9.7Mbits/sec0.796ms1/40(2.5%)
[3]3.04.0sec1.2MBytes10.0Mbits/sec0.403ms0/40(0%)
[3]4.05.0sec1.2MBytes10.0Mbits/sec0.448ms0/40(0%)
[3]5.06.0sec1.2MBytes10.0Mbits/sec0.464ms0/40(0%)
[3]6.07.0sec1.2MBytes10.0Mbits/sec0.442ms0/40(0%)
[3]7.08.0sec1.2MBytes10.0Mbits/sec0.342ms0/40(0%)
[3]8.09.0sec1.2MBytes10.0Mbits/sec0.431ms0/40(0%)
[3]9.010.0sec1.2MBytes10.0Mbits/sec0.407ms0/40(0%)
[3]0.010.0sec12.3MBytes9.8Mbits/sec0.407ms7/401(1.7%)
node1>iperfcnode2b10ml32kw128k
Clientconnectingtonode2,UDPport5001
Sending32768bytedatagrams
UDPbuffersize:128KByte
[3]local<IPAddrnode2>port11303connectedwith<IPAddrnode1>port5001
[ID]IntervalTransferBandwidth
[3]0.010.0sec12.5MBytes10.0Mbits/sec
[3]Sent401datagrams
Multicast
https://iperf.fr/iperfdoc.php#change
12/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
To test multicast, run several servers with the bind option (-B, --bind) set to the multicast group address.
Run the client, connecting to the multicast group address and setting the TTL (-T, --ttl) as needed. Unlike
normal TCP and UDP tests, multicast servers may be started after the client. In that case, datagrams sent
before the server started show up as losses in the first periodic report (61 datagrams on arno below).
node5>iperfc224.0.67.67uttl5t5
Clientconnectingto224.0.67.67,UDPport5001
Sending1470bytedatagrams
SettingmulticastTTLto5
UDPbuffersize:32.0KByte(default)
[3]local<IPAddrnode5>port1025connectedwith224.0.67.67port5001
[ID]IntervalTransferBandwidth
[3]0.05.0sec642KBytes1.0Mbits/sec
[3]Sent447datagrams
node5>iperfsuB224.0.67.67i1
ServerlisteningonUDPport5001
Bindingtolocaladdress224.0.67.67
Joiningmulticastgroup224.0.67.67
Receiving1470bytedatagrams
UDPbuffersize:32.0KByte(default)
[3]local224.0.67.67port5001connectedwith<IPAddrnode5>port1025
[ID]IntervalTransferBandwidthJitterLost/TotalDatagrams
[3]0.01.0sec131KBytes1.0Mbits/sec0.007ms0/91(0%)
[3]1.02.0sec128KBytes1.0Mbits/sec0.008ms0/89(0%)
[3]2.03.0sec128KBytes1.0Mbits/sec0.010ms0/89(0%)
[3]3.04.0sec128KBytes1.0Mbits/sec0.013ms0/89(0%)
[3]4.05.0sec128KBytes1.0Mbits/sec0.008ms0/89(0%)
[3]0.05.0sec642KBytes1.0Mbits/sec0.008ms0/447(0%)
node6>iperfsuB224.0.67.67i1
ServerlisteningonUDPport5001
Bindingtolocaladdress224.0.67.67
Joiningmulticastgroup224.0.67.67
Receiving1470bytedatagrams
UDPbuffersize:60.0KByte(default)
[3]local224.0.67.67port5001connectedwith<IPAddrnode5>port1025
[ID]IntervalTransferBandwidthJitterLost/TotalDatagrams
[3]0.01.0sec129KBytes1.0Mbits/sec0.778ms61/151(40%)
[3]1.02.0sec128KBytes1.0Mbits/sec0.236ms0/89(0%)
[3]2.03.0sec128KBytes1.0Mbits/sec0.264ms0/89(0%)
[3]3.04.0sec128KBytes1.0Mbits/sec0.248ms0/89(0%)
[3]0.04.3sec554KBytes1.0Mbits/sec0.298ms61/447(14%)
Start multiple clients or servers as explained above, sending data to the same multicast server. (If you have
multiple servers listening on the multicast address, each of the servers will be getting the data)
https://iperf.fr/iperfdoc.php#change
13/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
IPv6 Mode
Get the IPv6 address of the node using the 'ifconfig' command.
Use the -V option to indicate that you are using an IPv6 address Please note that we need to
explicitly bind the server address also.
Server side:
$ iperf -s -V
Client side:
$ iperf -c <Server IPv6 Address> -V>
Note: iPerf version 1.6.2 and eariler require a IPv6 address to be explicitly bound with the -B option
for the server.
14/15
14/10/2015
iPerfiPerf3andiPerf2userdocumentation
-s -D
-s -R
Examples:
iperf -s -D -o iperflog.txt
will install the iPerf service and run it. Messages will be reported into
"%windir%\system32\iperflog.txt"
iperf -s -R
will uninstall the iPerf service if it is installed.
Note: If you stop want to restart the iPerf service after having killed it with the Microsoft
Management Console or the Windows Task Manager, make sure to use the proper OPTION in the
service properties dialog.
Compiling
Once you have the distribution, on UNIX, unpack it using gzip and tar. That will create a new directory
'iperf-<version#>' with the source files and documentation.
iPerf compiles cleanly on many systems including Linux, SGI IRIX, HP-UX, Solaris, AIX, and Cray UNICOS.
Use 'make' to configure for your OS and compile the source code.
gunzipciperf<version>.tar.gz|tarxvf
cdiperf<version>
./configure
make
To install iPerf, use 'make install', which will ask you where to install it. To recompile, the easiest way is to
start over. Do 'make distclean' then './configure; make'. See the Makefile for more options.
https://iperf.fr/iperfdoc.php#change
15/15