Skip to content

Instantly share code, notes, and snippets.

@lnthien97
Last active March 25, 2024 03:40
Show Gist options
  • Save lnthien97/86874e0dce1c5b0fe0d2fd5f6426648f to your computer and use it in GitHub Desktop.
Save lnthien97/86874e0dce1c5b0fe0d2fd5f6426648f to your computer and use it in GitHub Desktop.
iperf3
How to use iperf3 to test bandwidth between 2 hosts
# Ubuntu 22.04
# Install iperf3
sudo apt install iperf3
# On host-01 (10.10.10.205), run iperf3 as a server
iperf3 -s
# On host-02 10.10.10.204 run iperf3 as a client
iperf3 -c 10.10.10.205
# Output
root@testing-server-205:~# iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.10.10.204, port 35070
[ 5] local 10.10.10.205 port 5201 connected to 10.10.10.204 port 35072
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 2.74 GBytes 23.6 Gbits/sec
[ 5] 1.00-2.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 2.00-3.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 3.00-4.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 4.00-5.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 5.00-6.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 6.00-7.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 7.00-8.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 8.00-9.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 9.00-10.00 sec 2.76 GBytes 23.7 Gbits/sec
[ 5] 10.00-10.00 sec 938 KBytes 23.3 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 27.6 GBytes 23.7 Gbits/sec receiver
root@testing-server-204:~# iperf3 -c 10.10.10.205
Connecting to host 10.10.10.205, port 5201
[ 5] local 10.10.10.204 port 35072 connected to 10.10.10.205 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.08 MBytes
[ 5] 1.00-2.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.40 MBytes
[ 5] 2.00-3.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.62 MBytes
[ 5] 3.00-4.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.62 MBytes
[ 5] 4.00-5.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.62 MBytes
[ 5] 5.00-6.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.81 MBytes
[ 5] 6.00-7.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.81 MBytes
[ 5] 7.00-8.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.81 MBytes
[ 5] 8.00-9.00 sec 2.76 GBytes 23.7 Gbits/sec 0 3.81 MBytes
[ 5] 9.00-10.00 sec 2.76 GBytes 23.7 Gbits/sec 0 4.05 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 27.6 GBytes 23.7 Gbits/sec 0 sender
[ 5] 0.00-10.00 sec 27.6 GBytes 23.7 Gbits/sec receiver
iperf Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment