setting up iperf3 on ubuntu 20.04

setting up iperf3 on ubuntu 20.04

Install iPerf

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

sudo apt update sudo apt install -y iperf3 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.048

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

How to use iPerf3 to measure throughput/Bandwidth

iPerf3 -s for different ports do iPerf3 -s -p 7575 to run as a client do iPerf3 -c 10.10.10.1 -p 7575 to do it bi directionally do iPerf3 -c 10.10.10.1 -p 7575 -bidir

Communicate between two machines

Use -b 0 flag for unlimited bandwidth to be shown

setup a server at one point using iperf3 -s

then use a client with iperf -c with commands above