sudo apt update
sudo apt install iperf3
brew install iperf3
yum install iperf3
iperf3 -s
iperf3 -c <server_ip_address>
iperf3 -c <server_ip_address> -t 30
iperf3 -c <server_ip_address> -u
iperf3 -c <server_ip_address> -u -b 10M
iperf3 -c <server_ip_address> -P 5
iperf3 -c <server_ip_address> -R
iperf3 -c <server_ip_address> -f b
iperf3 -s -p 5201
iperf3 -c <server_ip_address> -V
iperf3 -c <server_ip_address> -w 512K
iperf3 -c <server_ip_address> -i 5
iperf3 -c <server_ip_address> -J
iperf3 -c <server_ip_address> -P 10
iperf3 -c <server_ip_address> -6
This guide will help you understand how to send a specific amount of data (in MB) using iperf
over UDP. The goal is to specify the total data size to be transmitted, rather than using the time-based condition.
To send a specified amount of data using UDP in iperf
, the following command can be used:
iperf -c <server_ip> -u -b <bandwidth> -n <data_size>
-c <server_ip>
: Specifies the client mode and the server's IP address.-u
: Indicates that UDP should be used (instead of TCP).-b <bandwidth>
: Specifies the bandwidth for the UDP test (e.g., 10M
for 10 Mbps).-n <data_size>
: Specifies the total amount of data to send. The data size can be in KB, MB, or GB (e.g., 10M
for 10 MB).In this example, the client sends 50 MB of data to the server at an IP address of 192.168.1.1
with a bandwidth of 10 Mbps:
iperf -c 192.168.1.1 -u -b 10M -n 50M
To send 100 MB of data at 20 Mbps, the command would look like this:
iperf -c 192.168.1.1 -u -b 20M -n 100M
-b
, iperf
will send at the maximum available bandwidth.K
for KB, M
for MB, and G
for GB.