iperf
networkingLinux/Unix/Windows
The iperf command is one of the most frequently used commands in Linux/Unix-like operating systems. iperf Measure network performance
Quick Reference
Command Name:
iperf
Category:
networking
Platform:
Linux/Unix/Windows
Basic Usage:
iperf [options] [arguments]
Common Use Cases
Syntax
iperf [-s|-c host] [options]
Options
Option | Description |
---|---|
-s, --server |
Run in server mode |
-c, --client host |
Run in client mode, connecting to host |
-p, --port port |
Server port to listen on/connect to (default 5001) |
-u, --udp |
Use UDP rather than TCP |
-b, --bandwidth bandwidth |
Set target bandwidth to bandwidth bits/sec (default 1 Mbit/sec for UDP, unlimited for TCP) |
-t, --time seconds |
Time to transmit for (default 10 secs) |
-i, --interval seconds |
Seconds between periodic bandwidth reports (default 0) |
-f, --format [kmgKMG] |
Format to report: Kbits, Mbits, KBytes, MBytes |
-P, --parallel n |
Number of parallel client streams to run |
-w, --window size[KM] |
TCP window size (socket buffer size) |
-M, --mss mss |
Set TCP maximum segment size (MTU - 40 bytes) |
-N, --nodelay |
Set TCP no delay, disabling Nagle's algorithm |
-v, --version |
Print version information and quit |
-V, --verbose |
More verbose output |
-d, --dualtest |
Do a bidirectional test simultaneously |
-r, --tradeoff |
Do a bidirectional test individually |
-L, --listenport port |
Port to receive bidirectional tests on |
-F, --fileinput file |
Input the data to be transmitted from a file |
-T, --ttl value |
Time-to-live for multicast packets |
Examples
How to Use These Examples
The examples below show common ways to use the iperf
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
iperf -s