Install iPerf 3 on Ubuntu 20.04

The iPerf is a command line tool for testing network performance and speed by sending data traffic from one host to another. This tool supports TCP, UDP and SCTP protocols.

This tutorial demonstrates how to install iPerf 3 on Ubuntu 20.04.

Install iPerf

Make sure the package lists are up-to-date:

sudo apt update

Install iPerf 3:

sudo apt install -y iperf3

After installation is completed, we can check iPerf version:

iperf3 --version

Testing iPerf

For testing, we need to have two systems. One system will act as a server, while the other will act as a client. Of course, you can have both the server and the client on the same machine.

Run command to start server:

iperf3 -s

Server starts to listen client connections.

Run the following command to connect client to server by providing IP address:

iperf3 -c 192.168.0.48

Output example of server:

-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.0.135, port 37416
[  5] local 192.168.0.48 port 5201 connected to 192.168.0.135 port 37418
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  34.0 MBytes   285 Mbits/sec
[  5]   1.00-2.00   sec  38.8 MBytes   326 Mbits/sec
[  5]   2.00-3.00   sec  36.6 MBytes   307 Mbits/sec
.......
[  5]  10.00-10.11  sec  4.32 MBytes   340 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.11  sec   392 MBytes   325 Mbits/sec                  receiver
-----------------------------------------------------------

Output example of client:

Connecting to host 192.168.0.48, port 5201
[  4] local 192.168.0.135 port 37418 connected to 192.168.0.48 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  39.2 MBytes   328 Mbits/sec    0   1.12 MBytes       
[  4]   1.00-2.00   sec  38.3 MBytes   322 Mbits/sec    0   1.88 MBytes       
[  4]   2.00-3.00   sec  36.2 MBytes   304 Mbits/sec    0   3.05 MBytes       
.......
[  4]   9.01-10.01  sec  41.2 MBytes   344 Mbits/sec    0   3.05 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.01  sec   393 MBytes   329 Mbits/sec    0             sender
[  4]   0.00-10.01  sec   392 MBytes   328 Mbits/sec                  receiver

Uninstall iPerf

If you want to completely remove iPerf and related dependencies, run the following command:

sudo apt purge --autoremove -y iperf3

Leave a Comment

Your email address will not be published.