An aide memoire for iperf options…
Data is normally sent from client to server. Can reverse test direction (data sent from server to client) using -R option.
iperf -s -p 5000
(run iperf server, default TCP mode, on port 5000)
iperf -s -p 5002 -u
(run iperf server, UDP mode, on port 5002)
iperf -c <server address> -p 5000
(run iperf client, specify server address IP or hostname, port 5000)
iperf -c <server address> -u
(run iperf client, specify server address IP or hostname, UDP mode)
iperf -c <server address> -d
(run iperf client, specify server address IP or hostname, duplex i.e. both directions simultaneously)
iperf -c <server address> -r
(run iperf client, specify server address IP or hostname, bi-directional i.e. both directions, one after the other)
iperf -c <server address> -w 2048
(run iperf client, specify server address IP or hostname, change TCP window size (bytes, example shows 2kB))
iperf -c <server address> -t 60
(run iperf client, specify server address IP or hostname, duration 60 seconds)
iperf -c <server address> -R
(REQUIRES iperf3: run iperf client, specify server address IP or hostname, reverse test = server sends, client receives)
iperf -c <server address> -p 5002 -u -t 20 -b 3M
(run iperf client, specify server address IP or hostname, UDP mode, duration 20s, set bandwidth to 3 Mbps… if bandwitdh is higher than the actual link speed then the server will report the true bandwidth and percentage/number of dropped packets it didn’t receive)