iperf
TLDR
Start server mode
SYNOPSIS
iperf -s [OPTIONS]
iperf -c HOST [OPTIONS]
DESCRIPTION
iperf measures network bandwidth between two endpoints. One host runs in server mode (-s), and another connects as a client (-c) to perform the test. By default, iperf measures TCP throughput.
UDP mode (-u) tests UDP performance with configurable target bandwidth. This is useful for measuring packet loss and jitter at specific rates. Parallel streams (-P) can saturate high-bandwidth links that a single stream cannot fill.
Results show bandwidth achieved, along with additional metrics depending on protocol (retransmits for TCP, packet loss and jitter for UDP).
PARAMETERS
-s
Run in server mode.-c HOST
Run in client mode, connecting to server at HOST.-p PORT
Server port to listen on or connect to (default: 5001).-u
Use UDP instead of TCP.-b BANDWIDTH
Target bandwidth for UDP (e.g., 10M, 1G). Unlimited for TCP.-t TIME
Test duration in seconds (default: 10).-i INTERVAL
Report interval in seconds.-P STREAMS
Number of parallel client streams.-d
Bidirectional test (simultaneous send and receive).-r
Bidirectional test (sequential).-f FORMAT
Report format: k/m/g/K/M/G (bits or bytes).-w SIZE
Socket buffer size (window size).-l LENGTH
Buffer length to read or write.
CAVEATS
iperf (version 2) and iperf3 are separate projects with incompatible protocols. This page covers iperf2. Firewall rules may need to allow the iperf port (default 5001). Results can be affected by CPU limitations on either end, especially at high bandwidths.
HISTORY
iperf was developed by NLANR/DAST as an open-source network testing tool. The original iperf (version 2) became widely used for network diagnostics. iperf3 is a complete rewrite by ESnet with enhanced features but uses an incompatible protocol, requiring both endpoints to use the same version.
SEE ALSO
iperf3(1), netcat(1), speedtest-cli(1), ping(8)


