Uses of iperf command in Different Testing Scenarios
iperf command is a versatile network testing tool that can be used in a variety of scenarios to measure and diagnose network performance. Here are some common testing scenarios where iperf command can be effectively utilized.

iperf command Testing Scenarios:
1. Basic Bandwidth Testing
Scenario: You want to measure the maximum bandwidth available between two networked devices.
Steps:
- Start the iperf server on one device:
iperf3 -s
- Run the iperf client on the other device:
iperf3 -c [server_ip]
Output: This will provide a report showing the maximum bandwidth achieved, such as:
[ ID] Interval Transfer Bandwidth [ 4] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec
2. UDP Performance Testing
Scenario: You need to measure the performance of a UDP network, which is important for real-time applications like VoIP or video streaming.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with UDP option:
iperf3 -c [server_ip] -u -b 10M
Output: This will show the UDP bandwidth and packet loss, such as:
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 4] 0.00-10.00 sec 11.9 MBytes 10.0 Mbits/sec 0.187 ms 0/8500 (0%)
3. Bidirectional Testing
Scenario: You want to measure the network performance in both directions simultaneously to ensure symmetric bandwidth.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with bidirectional option:
iperf3 -c [server_ip] --bidir
Output: This will provide bandwidth measurements for both directions:
[ ID] Interval Transfer Bandwidth [ 4] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec sender [ 4] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec receiver
4. Parallel Streams Testing
Scenario: You need to measure the aggregate bandwidth of multiple parallel connections, which simulates multiple users or services accessing the network simultaneously.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with parallel streams:
iperf3 -c [server_ip] -P 10
Output: This will provide bandwidth measurements for each stream and the total:
[ ID] Interval Transfer Bandwidth [SUM] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec
5. Latency and Jitter Testing
Scenario: You need to measure network latency and jitter, which are critical for real-time applications.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with UDP option:
iperf3 -c [server_ip] -u -b 10M
Output: This will show the latency (jitter) and packet loss:
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [ 4] 0.00-10.00 sec 11.9 MBytes 10.0 Mbits/sec 0.187 ms 0/8500 (0%)
6. Network Stress Testing
Scenario: You need to stress test the network to see how it performs under heavy load.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with high bandwidth and parallel streams:
iperf3 -c [server_ip] -b 1000M -P 10 -t 60
Output: This will provide bandwidth measurements under high load:
[ ID] Interval Transfer Bandwidth [SUM] 0.00-60.00 sec 66.0 GBytes 944 Mbits/sec
7. Bandwidth Verification
Scenario: Verify that your network link provides the advertised bandwidth.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with a bandwidth parameter:
iperf3 -c [server_ip] -b 500M -t 30
Output: This will show if the network can sustain the specified bandwidth:
[ ID] Interval Transfer Bandwidth [ 4] 0.00-30.00 sec 1.10 GBytes 500 Mbits/sec
8. Testing Over Specific Interfaces
Scenario: You need to test network performance over a specific network interface.
Steps:
- Start the iperf server:
iperf3 -s -B [server_ip]
- Run the iperf client bound to a specific interface:
iperf3 -c [server_ip] -B [client_ip]
Output: This will provide performance metrics for the specified network interface:
[ ID] Interval Transfer Bandwidth [ 4] 0.00-10.00 sec 1.10 GBytes 944 Mbits/sec
9. Using iperf3 JSON Output for Integration
Scenario: Integrate iperf3 results into a monitoring or logging system.
Steps:
- Start the iperf server:
iperf3 -s
- Run the iperf client with JSON output:
iperf3 -c [server_ip] -J > iperf_results.json
Output: This will save the results in JSON format, which can be parsed and integrated into other systems:
{ "start": { ... }, "intervals": [ { "streams": [ { ... } ] } ], "end": { ... } }
Summary – iperf command
iperf command is an essential tool for network performance testing, offering a wide range of parameters and options to suit various testing scenarios. Whether you are measuring basic bandwidth, stress testing your network, validating bandwidth claims, or integrating results into monitoring systems, iperf command provides the functionality you need. Understanding these use cases and command examples will help you effectively diagnose, optimize, and validate your network infrastructure.
Useful Links
https://sanchitgurukul.com/tutorials-cat
iperf Command: 9 Essential Testing Scenarios Explained
This article provided insights on the topic. For latest updates and detailed guides, stay connected with Sanchit Gurukul.
