Network Performance Testing — Quick Reference
v3.x
basics
Server
-sStart server mode
-p <port>Listen on custom port (default: 5201)
-B <addr>Bind to specific interface/IP
-DRun as daemon (background)
-1Handle one client then exit
--forceflushForce output flush after each interval
iperf3 -s iperf3 -s -p 9999 iperf3 -s -B 192.168.2.11 iperf3 -s -D # daemonize
Client
-c <host>Connect to server at host/IP
-p <port>Connect to custom port
-t <sec>Test duration in seconds (default: 10)
-n <bytes>Transfer exactly N bytes instead of timed
-i <sec>Interval between reports (default: 1)
-RReverse mode (server→client)
--bidirBidirectional simultaneous test
iperf3 -c 192.168.2.11 iperf3 -c 192.168.2.11 -t 30 -i 5 iperf3 -c 192.168.2.11 -R iperf3 -c 192.168.2.11 --bidir
Bandwidth Control
-b <rate>Target bitrate (K/M/G suffix). Default: unlimited TCP, 1M UDP
-b 0Unlimited (TCP only)
iperf3 -c host -b 100M # 100 Mbps TCP iperf3 -c host -b 500K # 500 Kbps iperf3 -c host -b 1G # 1 Gbps iperf3 -c host -u -b 50M # 50 Mbps UDP
⚠ TCP bitrate is a target, not a hard cap. UDP bitrate is precise.
protocols & tuning
UDP Mode
-uUse UDP instead of TCP
-b <rate>Bandwidth (required for UDP, default 1M)
-l <bytes>UDP datagram / packet size
# UDP at 100 Mbps, 1400 byte datagrams iperf3 -c host -u -b 100M -l 1400 # Check jitter and packet loss in output iperf3 -c host -u -b 10M -t 30
TCP Tuning
-w <size>Socket/window buffer size (K/M)
-M <mss>Set TCP max segment size
-NDisable Nagle's algorithm
-4 / -6Force IPv4 or IPv6
-P <n>Parallel streams
# 4 parallel streams, 256K buffer iperf3 -c host -P 4 -w 256K # IPv6 test iperf3 -c host -6
Output & Logging
-JOutput results as JSON
--logfileSave output to file
-f <fmt>Format: k/m/g/K/M/G (bits or bytes)
-VVerbose output
-dDebug output
iperf3 -c host -J # JSON output iperf3 -c host -f m # Mbps display iperf3 -c host --logfile test.log # Parse JSON for bandwidth iperf3 -c host -J | jq '.end.sum_received.bits_per_second'
common scenarios
Common Test Scenarios
LAN / Throughput
# Basic TCP throughput iperf3 -c host -t 30 # Max throughput (multi-stream) iperf3 -c host -P 8 -t 30 # Full duplex iperf3 -c host --bidir # Upload + download (separate runs) iperf3 -c host iperf3 -c host -R
VPN / WAN
# Bandwidth-limited VPN test iperf3 -c host -b 50M -t 30 # UDP jitter (VoIP sim) iperf3 -c host -u -b 1M -l 160 -t 30 # Long test, 5s intervals iperf3 -c host -t 120 -i 5 --logfile vpn_test.log
Reading Output
[ ID] Interval Transfer Bitrate [ 5] 0.00-1.00 sec 112 MBytes 940 Mbits/sec [ 5] 1.00-2.00 sec 111 MBytes 935 Mbits/sec ... - - - - - - - Summary - - - - - - - [ ID] 0-10s Transfer 1.09 GBytes Bitrate 940 Mbits/sec Retr: 2
BitrateThroughput per interval
RetrTCP retransmits (lower = better)
JitterUDP only — variance in delay
Lost/TotalUDP only — packet loss count/%
CwndTCP congestion window size
advanced
Advanced Flags
-O <sec>Omit first N seconds (skip slow-start)
--connect-timeoutConnection timeout in ms
--rcv-timeoutIdle read timeout (ms)
-T <title>Add prefix string to output
-ZUse zero-copy send (sendfile)
--pacing-timerPacing timer interval (us)
--get-server-outputRetrieve output from server side
TLS / Auth (v3.9+)
--authorized-users-filePath to user credentials file
--rsa-private-key-pathRSA key for auth
--usernameClient username for auth
# Authenticated server iperf3 -s --authorized-users-file users.csv --rsa-private-key-path server.key # Authenticated client iperf3 -c host --username chris --rsa-public-key-path server.pub
Tips & Gotchas
FirewallOpen TCP/UDP 5201 on server (or use -p)
Skip slow-startUse -O 2 for cleaner TCP results
CPU bound?Use -Z (zero-copy) to reduce CPU overhead
VPN testingRun server on both ends; test each direction with -R
Parallel streams-P 4 often reveals true max throughput on high-latency paths
Only 1 clientiPerf3 accepts one client at a time; use -s per port for multi
quick reference
Flag Summary
-sServer mode
-c <h>Client → host
-p <n>Port
-t <s>Duration (sec)
-i <s>Report interval
-n <b>Transfer N bytes
-uUDP mode
-b <r>Bandwidth/bitrate
-P <n>Parallel streams
-RReverse direction
--bidirBidirectional
-w <b>Window size
-4 / -6IPv4 / IPv6
-JJSON output
-f <k/m/g>Output format
-O <s>Omit N seconds
-ZZero-copy mode
-DDaemon (server)