Iperf3
Iperf3 is a powerful command-line tool for measuring network performance. It allows users to test the maximum achievable bandwidth, jitter, and packet loss on IP networks. This updated version of iperf3 offers improved features and more accurate performance measurements compared to its predecessors.
Iperf3 Server Commands
To initiate network tests, you first need to set up an iperf3 server. The server listens for incoming client connections and reports the performance metrics. Below are common commands for starting an iperf3 server.
# Start an iperf3 server on the default port (5201)
iperf3 -s
Iperf3 Client Commands for Bandwidth Testing
Once the server is running, you can use the iperf3 client to connect to it and conduct various tests. These commands cover basic connectivity, duration, bandwidth limits, and port specifications.
# Run a basic iperf3 client test to a server located at [server IP]
iperf3 -c [server IP]
# Run a client test with a specified duration (e.g., 10 seconds) to a server
iperf3 -c [server IP] -t 10
# Run a client test with a specified bandwidth limit (e.g., 1Mbps) to a server
iperf3 -c [server IP] -b 1M
# Run a client test on a specified port (e.g., port 5001) of the server
iperf3 -c [server IP] -p 5001
# Run a client test with a specified number of parallel streams (e.g., 5 streams) to a server
iperf3 -c [server IP] -P 5
Advanced Iperf3 Testing Options
Iperf3 supports various advanced testing scenarios, including UDP tests, reverse mode, bidirectional tests, and JSON output for programmatic analysis. Explore these options to gain deeper insights into your network's capabilities.
# Run a client test using UDP (instead of the default TCP)
iperf3 -c [server IP] -u
# Run a reverse test where the server sends data to the client
iperf3 -c [server IP] -R
# Run a bidirectional test where data is exchanged in both directions
iperf3 -c [server IP] --bidir
# Display results in JSON format for easier parsing and scripting
iperf3 -c [server IP] -J
Server Configuration and Protocol Options
Configure your iperf3 server for logging and specify network protocol versions for your tests. These settings are crucial for detailed network analysis and troubleshooting.
# Set the server to log connections, errors, and results to a file
iperf3 -s --logfile /path/to/logfile.txt
# Use a specific protocol version (e.g., IPv4) for testing
iperf3 -c [server IP] -4
# Use a specific protocol version (e.g., IPv6) for testing
iperf3 -c [server IP] -6