IPERF: Real-time speed, performance and bandwidth measurementsandrewc2019-06-29T15:26:04+11:00
  1. Home
  2. Knowledge Base
  3. Tutorials
  4. IPERF: Real-time speed, performance and bandwidth measurements

iperf is a command line tool for performing real-time network throughput measurements. It is a powerful tool for testing the maximum achievable bandwidth in an IP network.

To perform an iperf test the user must establish both a server and a client.

Initial Setup

Server

First, connect to the router which you will use as the server

-s run in server mode
-p port to listen n (default 5001)
-f traffic format to report

K KBytes M Mbytes G Gbytes
iperf -s -p 5111 -f K
------------------------------------------------------------
Server listening on TCP port 5111
TCP window size: 85.3 KByte (default)
------------------------------------------------------------

Client

Next, connect to the router/computer which you will use as the client.

-c connect to the specified server
-p port to connect to n (default 5001)
-f traffic format to report

K KBytes M Mbytes
iperf -c 172.30.6.110 -p 5111 -f K
------------------------------------------------------------
Client connecting to 172.30.6.110, TCP port 5111
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.199.138 port 51840 connected with 172.30.6.110 port 5111
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.1 sec  5248 KBytes   519 KBytes/sec

The iperf client will send the test data to the iperf server.

Reverse Mode

iperf -c 172.30.6.110 -p 5111 -f K -R
------------------------------------------------------------
Client connecting to 172.30.6.110, TCP port 5111
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.199.138 port 51842 connected with 172.30.6.110 port 5111
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.3 sec  6144 KBytes   598 KBytes/sec

The iperf server will send the test data to the iperf client.

UDP protocol

Server

iperf -s -p 5111 -f K -u
------------------------------------------------------------
Server listening on UDP port 5111
Receiving 1470 byte datagrams
UDP buffer size: 41.1 KByte (default)
------------------------------------------------------------
[  3] local 172.30.6.1 port 5111 connected with 172.30.6.101 port 36141
------------------------------------------------------------

Client

iperf -c 172.30.6.1 -p 5111 -f K -f -u
------------------------------------------------------------
Client connecting to 172.30.6.110, TCP port 5111
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.199.138 port 51842 connected with 172.30.6.110 port 5111
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.3 sec  6144 KBytes   598 KBytes/sec

Server Results

[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3] local 172.30.6.1 port 5111 connected with 172.30.6.101 port 34011
[  3]  0.0- 9.9 sec  1282 KBytes   130 KBytes/sec   8.960 ms 2147481861/2147482754 (1e+02%)

Was this article helpful?