iperf3(1)
iperf3 measures network bandwidth and performance between two hosts using TCP, UDP, or SCTP protocols.
Synopsis
iperf3 -s [OPTION]... | iperf3 -c SERVER [OPTION]...Description
iperf3 is a tool for measuring maximum network throughput and latency between a client and server. One instance runs in server mode (-s) listening for connections, while another runs in client mode (-c) connecting to the server and sending test traffic. It supports multiple parallel streams, bidirectional testing, and detailed performance statistics.
Common use cases include validating network link capacity, troubleshooting bandwidth issues, and benchmarking network hardware. Results show throughput in Mbps or Gbps, jitter, packet loss, and other metrics depending on the protocol used.
Common options
| Flag | What it does |
|---|---|
-s | Run in server mode, listening for incoming client connections |
-c HOST | Run in client mode and connect to server at HOST (IP or hostname) |
-p PORT | Set the port to listen on (server) or connect to (client); default is 5201 |
-P NUM | Number of parallel client streams to create (default 1) |
-t SECONDS | Duration of test in seconds; default is 10 |
-u | Use UDP instead of TCP for the test |
-b BITRATE | Set UDP bitrate limit, e.g. '10M' for 10 Mbps (client mode) |
-R | Run bidirectional test (measure both directions simultaneously) |
-i SECONDS | Interval for periodic bandwidth reports; default is 1 |
-J | Output results in JSON format instead of human-readable text |
-w SIZE | Set TCP window size or UDP buffer size, e.g. '512K' |
-B BIND_ADDRESS | Bind to specific local address (useful for multi-homed systems) |
Examples
Start iperf3 in server mode listening on the default port 5201
iperf3 -sConnect to a server at 192.168.1.100 and run a 10-second TCP throughput test
iperf3 -c 192.168.1.100Test with 4 parallel streams for 30 seconds to measure aggregate bandwidth
iperf3 -c 192.168.1.100 -P 4 -t 30Run UDP test with bandwidth limited to 100 Mbps, measuring jitter and packet loss
iperf3 -c 192.168.1.100 -u -b 100MMeasure throughput in both directions simultaneously (client to server and server to client)
iperf3 -c 192.168.1.100 -RStart server on port 5202 running as a daemon in the background
iperf3 -s -p 5202 -DConnect to server and output JSON results every 2 seconds, parsed with jq for readability
iperf3 -c 192.168.1.100 -i 2 -J | jqRun 60-second test with a 2MB TCP window size for high-bandwidth networks
iperf3 -c 192.168.1.100 -w 2M -t 60