iperf Parameters and Commands with Examples
iperf is a powerful tool used to measure the bandwidth and performance of network links. Below is a comprehensive guide to the commands and parameters used in iperf Parameters.

Basic Syntax
The basic syntax foriperf Parameters (specifically iperf3, the most commonly used version) is:
iperf3 [options]Common iperf Parameters and Options
Server Mode
- -s: Starts iperf in server mode. This command needs to be run on the server side.
iperf3 -sClient Mode
- -c [hostname or IP]: Specifies the server to connect to. This command needs to be run on the client side.
iperf3 -c 192.168.1.1Test Duration
- -t [time]: Sets the duration of the test in seconds. The default is 10 seconds.
iperf3 -c 192.168.1.1 -t 30Parallel Streams
- -P [number]: Specifies the number of parallel client streams to use.
iperf3 -c 192.168.1.1 -P 5Bandwidth (for UDP tests)
- -b [bandwidth]: Sets the target bandwidth for UDP streams (default is 1 Mbit/sec). For TCP tests, this sets the upper limit.
iperf3 -c 192.168.1.1 -u -b 10MUDP Mode
- -u: Uses UDP rather than TCP.
iperf3 -c 192.168.1.1 -uReverse Test
- -R: Runs the test in reverse mode (from server to client).
iperf3 -c 192.168.1.1 -RBidirectional Test
- –bidir: Tests bandwidth in both directions simultaneously.
iperf3 -c 192.168.1.1 --bidirInterval
- -i [interval]: Sets the interval time in seconds between periodic bandwidth reports.
iperf3 -c 192.168.1.1 -i 1Output Format
- -f [format]: Sets the format of the output report (k for kilobits, m for megabits, g for gigabits).
iperf3 -c 192.168.1.1 -f mReport Format
- -J: Outputs the report in JSON format.
iperf3 -c 192.168.1.1 -JServer Port
- -p [port]: Specifies the port to connect to on the server (default is 5201).
iperf3 -c 192.168.1.1 -p 5001Window Size
- -w [window size]: Sets the TCP window size.
iperf3 -c 192.168.1.1 -w 256KAdvanced Options
TTL (Time to Live)
- -T [TTL]: Sets the IP time-to-live for packets.
iperf3 -c 192.168.1.1 -T 64Bind to a Specific Interface
- -B [host]: Binds the socket to a specific interface or IP address.
iperf3 -c 192.168.1.1 -B 192.168.1.100MSS (Maximum Segment Size)
- -M [MSS]: Sets the TCP maximum segment size.
iperf3 -c 192.168.1.1 -M 1460Compatibility Mode
- –cport [port]: Specifies the client-side port to use for the test.
iperf3 -c 192.168.1.1 --cport 6000Example Commands
Basic TCP Test
To perform a basic TCP test from a client to a server for 10 seconds:
- Start the server:
iperf3 -s- Run the client:
iperf3 -c 192.168.1.1UDP Test with Specified Bandwidth
To run a UDP test with a target bandwidth of 10 Mbps for 20 seconds:
- Start the server:
iperf3 -s- Run the client:
iperf3 -c 192.168.1.1 -u -b 10M -t 20Parallel Streams Test
To run a test with 5 parallel streams:
- Start the server:
iperf3 -s- Run the client:
iperf3 -c 192.168.1.1 -P 5Bidirectional Test
To test bandwidth in both directions simultaneously:
- Start the server:
iperf3 -s- Run the client:
iperf3 -c 192.168.1.1 --bidirReverse Mode Test
To perform a reverse mode test where the server sends data to the client:
- Start the server:
iperf3 -s- Run the client:
iperf3 -c 192.168.1.1 -RSummary – iperf Parameters
iperf Parameters is a powerful and flexible tool for network performance testing, allowing you to measure bandwidth, latency, and packet loss. It supports both TCP and UDP protocols and offers a wide range of options to customize the test parameters. By understanding and utilizing these commands and parameters, you can effectively diagnose network issues, optimize performance, and validate network configurations.
Useful Links
Complete Guide to iperf Parameters and Commands
This article provided insights on the topic. For latest updates and detailed guides, stay connected with Sanchit Gurukul.
Your feedback matters
Was this post helpful?
Discussion
0 approved comments
No approved comments yet. You can start the discussion below.
Leave a Comment
No login is required. Name and email are used for moderation/security. Your email is never displayed publicly. All comments require administrator approval.
Discover more from SanchitGurukul
Subscribe to get the latest posts sent to your email.
