According to iperf project site. This writeup is taken from iPerf Tutorial by OpenManiak. For a more detailed and in-depth writeup, do real up the iPerf Tutorial
Iperf was developed by NLANR/DAST as a modern alternative for measuring maximum TCP and UDP bandwidth performance. Iperf allows the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss.
Iperf can generate traffic using TCP and UDP Traaffic to perform the following kinds of test
- Latency (response time or RTT): can be measured with the Ping utility.
- Jitter: can be measured with an Iperf UDP test.
- Datagram loss: can again, be measured with an Iperf UDP test.
- Bandwidth tests are done using the Iperf TCP tests
Iperf uses the unique characteristics of TCP and UDP to provide statistics about network links. (TCP checks that the packets are correct sent to the receiver. UDP is sent without any checks.
Iperf can be easily installed on the linux box. After downloading the package, you can do a
# tar -zxvf iperf-2.0.5.tar.gz # cd iperf-2.0.5 # ./configure # make # make install # cd src
IPerf follows a client-server model. The Server or the Client can be linux or windows. Since this blog is linux, our server and client will be both linux.
Do note that the ipef client connects to the iperf server through port 5001. The bandwidth is from the client to the server.
1. Single Data Uni-Direction with Data Formatting
On the Client, we can use the following format
- -f argument display the results in the desired format
- The following parameter for formatting ( bits(b), bytes(B), kilobits(k), kilobytes(K), megabits(m), megabytes(M), gigabits(g) or gigabytes(G).
# iperf -c 192.168.50.1 -f G
On the Server, we just use
# iperf -s
2. Bi-directional bandwidth measurement (-r parameter )
By default, the connection from client connection to the server is measured. But with the “-r” argument inclusion, the iperf server will re-connects back to the client thus allowing the bi-drectional measurement.
On the Client Side
# iperf -c 192.168.50.1 -r -f G
On the Server Side
# iperf -s
3. Simultaneous bi-directional bandwidth measurement: (-d argument)
# iperf -c 192.168.50.1 -d -f G
On the Server Side
# iperf -s
4. Interval Settings ( -t timing, -i interval)
On the Client Side,
# iperf -c 192.168.50.1 -t 20 -i 1
On the Server Side
# iperf - s
5. UDP Settings (-u) and Bandwidth Settings (-b)
The UDP tests with the -u argument will give invaluable information about the jitter and the packet loss. If there is no -u parameter, iperf will default to TCP
On the Client Side
# iperf -c 192.168.50.1 -u -b 10m
On the Server side, (-i interval)
# iperf -c 192.168.50.1 -u -i 2
6. Parallel tests (-P argument, number of parallel):
On Client side
# iperf -c 192.168.50.1 -P 4
On Server side,
# iperf -s