The iPerf is a command line tool that allows to test network performance and speed by sending data traffic from one host to another. This tool supports TCP, UDP and SCTP protocols.
This tutorial shows how to install iPerf 3 on Raspberry Pi.
Install iPerf
Connect to Raspberry Pi via SSH. Execute the following command to update the package lists:
sudo apt update
Next, install iPerf 3:
sudo apt install -y iperf3
Once installation is finished, we can check version of iPerf:
iperf3 --version
Testing iPerf
In order to test, you need to have two systems with iPerf. One system will act as a server, while the other will act as a client. Of course, the server and the client can be on the same Raspberry Pi.
Execute the following command to start server:
iperf3 -s
Server starts to listen client connections.
Connect client to server by providing IP address:
iperf3 -c 192.168.0.48
Output example of server (Ubuntu 20.04):
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.0.3, port 56890
[ 5] local 192.168.0.48 port 5201 connected to 192.168.0.3 port 56892
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 11.3 MBytes 94.3 Mbits/sec
[ 5] 1.00-2.00 sec 11.9 MBytes 99.9 Mbits/sec
[ 5] 2.00-3.00 sec 11.8 MBytes 99.4 Mbits/sec
.......
[ 5] 10.00-10.03 sec 291 KBytes 83.3 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.03 sec 119 MBytes 99.4 Mbits/sec receiver
-----------------------------------------------------------
Output example of client (Raspberry Pi 4 Model B):
Connecting to host 192.168.0.48, port 5201
[ 5] local 192.168.0.3 port 56892 connected to 192.168.0.48 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 12.5 MBytes 105 Mbits/sec 0 581 KBytes
[ 5] 1.00-2.00 sec 12.2 MBytes 102 Mbits/sec 0 612 KBytes
[ 5] 2.00-3.00 sec 12.1 MBytes 101 Mbits/sec 0 650 KBytes
.......
[ 5] 9.00-10.00 sec 11.6 MBytes 97.5 Mbits/sec 0 724 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 120 MBytes 101 Mbits/sec 0 sender
[ 5] 0.00-10.03 sec 119 MBytes 99.4 Mbits/sec receiver
Uninstall iPerf
If you decided to completely remove iPerf and related dependencies, execute the following command:
sudo apt purge --autoremove -y iperf3
Leave a Comment
Cancel reply