When a network connection feels slow, a standard internet speed test does not always reveal where the problem is.
The connection between two servers may be slower than expected. A VPN tunnel might deliver inconsistent throughput. A Wi-Fi network may have enough bandwidth for downloads but still experience packet loss or unstable latency-sensitive traffic.
iPerf3 is a command-line network performance tool that helps measure throughput between two endpoints. It supports TCP, UDP, and SCTP testing, allowing administrators to evaluate network capacity and investigate performance problems across local networks, WAN links, VPNs, and data center infrastructure.
Unlike a typical internet speed test, iPerf3 lets you choose both endpoints. You can run a controlled test between two Linux servers, a workstation and a network appliance, or two systems connected through a specific network path.
This guide explains how iPerf3 works, how to configure its server and client, how to run TCP and UDP tests, how to understand the results, and how to troubleshoot low throughput and packet loss.
iPerf3 is an open-source network performance measurement tool developed by the Energy Sciences Network (ESnet).
It uses a client-server architecture:
iPerf3 can measure:
The official project documentation is available at iPerf3 Documentation.
iPerf3 primarily measures network throughput between the two test endpoints.
For example, if two servers are connected through a 1 Gbps network, iPerf3 can help determine how much TCP or UDP traffic they can exchange under the test conditions.
However, the result is not necessarily the maximum physical capacity of the network link.
The measured throughput can also depend on:
iPerf3 is therefore a network measurement tool, not a replacement for packet analysis or application-level performance monitoring.
Although their names are similar, iPerf2 and iPerf3 are separate implementations.
They are not fully backward-compatible, so both endpoints should use compatible versions of the same tool.
| Feature | iPerf2 | iPerf3 |
|---|---|---|
| TCP testing | Yes | Yes |
| UDP testing | Yes | Yes |
| Client-server model | Yes | Yes |
| JSON output | Different options | Supported with -J |
| Parallel streams | Yes | Yes |
| Modern multi-threaded implementation | Yes | Supported from version 3.16 |
| Official Windows support | Yes | No |
| SCTP testing | Limited by platform/build | Supported on Linux and FreeBSD |
One important difference is the iPerf3 threading model.
Versions before 3.16 were single-threaded. Beginning with version 3.16, iPerf3 uses a separate thread for each test stream, allowing parallel tests to use multiple CPU cores.
This matters when measuring high-speed links, where the test application itself can become the bottleneck.
For detailed compatibility information, see the official iPerf3 FAQ.
Windows compatibility note: iPerf3 is not officially supported on Windows. Community-provided Windows builds exist, but compatibility can vary. ESnet recommends iPerf2 for Windows environments.
You need iPerf3 installed on both the client and server.
Update the package index:
sudo apt update Install iPerf3:
sudo apt install iperf3 Check the installed version:
iperf3 --version Where the package is available in your configured repositories:
sudo dnf install iperf3 Check the installation:
iperf3 --version Using Homebrew:
brew install iperf3 Then:
iperf3 --version Install the package:
sudo pkg install iperf3 Verify:
iperf3 --version For other platforms, consult the official iPerf3 project repository.
An iPerf3 test requires two endpoints.
Consider this example:
+------------------+ +------------------+
| Client | | Server |
| | | |
| 192.0.2.20 |------------>| 192.0.2.10 |
| | | |
| iperf3 -c | | iperf3 -s |
+------------------+ +------------------+ The example addresses belong to a documentation-only IP range. Replace them with addresses that are actually reachable in your environment.
On the remote system, execute:
iperf3 -s The server starts listening for incoming connections.
By default, iPerf3 uses TCP port 5201 for its control connection.
To use a different port:
iperf3 -s -p 5002 Keep the server running while performing the test.
On the client system:
iperf3 -c 192.0.2.10 The client connects to the server and starts a TCP throughput test.
To run a longer test with one-second reporting intervals:
iperf3 -c 192.0.2.10 -t 30 -i 1 This runs the test for 30 seconds and displays periodic results every second.
A longer test can help reveal sustained performance problems that may not appear during a brief measurement.
TCP is the best starting point for most network throughput investigations.
It measures the amount of data that can be transferred while TCP handles acknowledgments, congestion control, retransmissions, and flow control.
Start with a standard test:
iperf3 -c 192.0.2.10 -t 30 -i 1 For multiple simultaneous TCP streams:
iperf3 -c 192.0.2.10 -P 4 -t 30 -i 1 The -P 4 option creates four parallel test streams.
Compare the single-stream and multi-stream results.
If four streams achieve substantially higher throughput than one stream, investigate whether a single TCP flow is limited by CPU processing, TCP window behavior, congestion control, or another host-side constraint.
Do not automatically assume that the higher multi-stream result represents normal application performance. Real applications may use different numbers of connections.
A standard iPerf3 test sends data from the client to the server.
To measure the opposite direction, use:
iperf3 -c 192.0.2.10 -R -t 30 This makes the server send data to the client.
Reverse testing is particularly useful when investigating:
To test both directions simultaneously on a compatible iPerf3 version:
iperf3 -c 192.0.2.10 --bidir -t 30 This is useful when both endpoints transmit and receive at the same time, although the result represents a different workload from two separate one-way tests.
TCP automatically adjusts transmission based on congestion and network conditions.
UDP behaves differently. It does not provide TCP-style congestion control or retransmission.
An iPerf3 UDP test allows you to specify a target transmission rate and measure how the network handles that offered traffic.
Run a UDP test at 50 Mbps:
iperf3 -c 192.0.2.10 -u -b 50M -t 30 -i 1 Important options:
| Option | Meaning |
|---|---|
-u | Use UDP instead of TCP |
-b 50M | Set the target bitrate to 50 Mbps |
-t 30 | Run for 30 seconds |
-i 1 | Display results every second |
Important: Specify -b when performing UDP tests. The default UDP target bitrate is 1 Mbit/s, which may be too low for the network capacity you intend to investigate.
Start with a conservative rate, then increase it gradually.
For example:
iperf3 -c 192.0.2.10 -u -b 10M -t 30
iperf3 -c 192.0.2.10 -u -b 50M -t 30
iperf3 -c 192.0.2.10 -u -b 100M -t 30 Compare the received bitrate, jitter, and lost datagrams at each rate.
Do not assume that a UDP test showing high packet loss automatically indicates a faulty switch or cable. The sender may simply be transmitting faster than the path or receiving host can handle.
Correctly interpreting the output is just as important as running the test.
A simplified TCP output might look like this:
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 1.09 GBytes 936 Mbits/sec
[ 5] sender
[ 5] 0.00-10.00 sec 1.08 GBytes 928 Mbits/sec
[ 5] receiver The important fields are:
Interval: The time period used for the measurement.
Transfer: The amount of data transferred during that interval.
Bitrate: The measured data rate.
Sender: Statistics from the sending endpoint.
Receiver: Statistics from the receiving endpoint.
For TCP, inspect the final sender and receiver summaries, and check retransmission statistics when available.
A difference between sender and receiver results can be useful when investigating congestion, loss, or endpoint limitations.
UDP output includes additional information:
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-10.00 sec 119 MBytes 99.8 Mbits/sec 0.185 ms 12/86540 (0.014%) receiver The main fields are:
Jitter: Variation in the arrival timing of UDP datagrams, as reported by the test.
Lost/Total Datagrams: Number of datagrams reported as missing compared with the total expected.
Bitrate: The measured data rate.
The receiver-side result is particularly important because it shows what arrived at the destination.
Jitter should be interpreted according to the application being tested. There is no single universal threshold that determines whether a network is suitable for every voice, video, or real-time workload.
The following examples are useful during routine troubleshooting.
iperf3 -c 192.0.2.10 -t 60 -i 1 iperf3 -c 192.0.2.10 -R iperf3 -c 192.0.2.10 -P 4 iperf3 -c 192.0.2.10 -u -b 100M -t 30 iperf3 -c 192.0.2.10 -J JSON output is useful when integrating network measurements with scripts, dashboards, and monitoring systems.
iperf3 -c 192.0.2.10 -i 5 -t 60 iperf3 -c 192.0.2.10 -B 192.0.2.20 This is useful on multihomed systems where traffic must leave through a particular source address.
iperf3 -c 192.0.2.10 -O 3 -t 30 The -O 3 option omits the first three seconds from reported test statistics. It does not mean that the test itself begins after three seconds of network inactivity.
For the complete list of options, consult the iPerf3 manual.
A successful connection does not necessarily mean that the measured performance is healthy.
The following workflow helps narrow down common problems.
Example error:
iperf3: error - unable to connect to server Possible causes include:
On the server, check whether iPerf3 is listening:
ss -lntp | grep 5201 Check basic reachability:
ping 192.0.2.10 Test the TCP connection:
nc -vz 192.0.2.10 5201 For more connection-testing techniques, see our Netcat Explained guide.
Remember that UDP tests also require the UDP data path to be permitted by the relevant firewalls. Allow only the required traffic between trusted test endpoints.
If a network link is expected to deliver high throughput but iPerf3 reports a much lower result, investigate both endpoints before changing network configurations.
Check CPU utilization:
top Inspect interface statistics:
ip -s link Check the interface speed and negotiated link mode:
sudo ethtool eth0 Look for:
Next, compare one stream with multiple streams:
iperf3 -c 192.0.2.10 -P 1 -t 30
iperf3 -c 192.0.2.10 -P 4 -t 30 If performance changes significantly, investigate host processing, TCP behavior, and the network path.
An example result might show:
Lost/Total Datagrams: 1250/50000 (2.5%) Possible causes include:
Reduce the target rate and repeat the test.
For example:
iperf3 -c 192.0.2.10 -u -b 20M -t 30 Then increase the rate gradually.
If unexpected UDP loss remains, confirm that both systems are running a recent version of iPerf3. The official FAQ also recommends investigating socket-buffer settings on affected systems, including testing a larger buffer with:
iperf3 -c 192.0.2.10 -u -b 50M -w 2M -t 30 Change one variable at a time so that the result remains useful for diagnosis.
See the official iPerf3 FAQ for additional UDP troubleshooting details.
A TCP test may begin normally and then show a severe throughput reduction.
One possible cause is a TCP segmentation offload problem involving the network adapter.
On some systems, TSO or Windows Large Send Offload (LSO) can interact incorrectly with path MTU behavior.
Useful diagnostic tests include:
For example:
iperf3 -c 192.0.2.10 -l 512 -t 30 The -l option changes the test buffer length. It is a diagnostic technique, not a universal performance fix.
The iPerf3 FAQ describes this class of problem and the relationship between TCP segmentation offload, packet sizing, and reverse testing.
For example:
Client to Server: 900 Mbps
Server to Client: 250 Mbps This may indicate asymmetric performance.
Possible causes include:
Run both directions separately:
iperf3 -c 192.0.2.10 -t 30
iperf3 -c 192.0.2.10 -R -t 30 If the problem occurs only in one direction, investigate the sender and receiver roles in that test rather than changing unrelated network settings.
iPerf3 gives you useful throughput statistics, but it does not show every packet-level detail.
When a test produces unexpected results, Wireshark can help identify what is happening on the wire.
For example, you can investigate:
A practical workflow is:
For a detailed introduction to packet capture and filtering, read our Wireshark Explained guide.
You can also use our Linux Network Tools guide for additional commands such as ip, ss, ping, dig, and tcpdump.
A well-designed test should minimize variables that could distort the measurement.
Follow these practices:
Use consistent endpoints. Run tests between the same two systems when comparing results over time.
Start with one stream. Establish a baseline before introducing parallel streams.
Test both directions. Upload and download performance may differ.
Use appropriate UDP rates. Gradually increase the offered bitrate instead of immediately sending traffic at the theoretical maximum link speed.
Monitor CPU utilization. A high-speed network test can become limited by the test endpoints.
Use recent versions. Version differences can affect functionality and performance.
Repeat tests. Run multiple tests to distinguish persistent problems from temporary congestion.
Use JSON output for automation. The -J option makes it easier to collect and process results programmatically.
Avoid exposing an unrestricted test server. Restrict access to trusted clients and use firewall rules to limit who can connect.
Separate network testing from application testing. A high iPerf3 result does not guarantee that file transfers, web applications, or database operations will achieve the same throughput.
iPerf3 measures network throughput between two endpoints. It is commonly used to test TCP and UDP performance, measure packet loss and jitter, and troubleshoot network bottlenecks.
Start the server:
iperf3 -s Then run the client:
iperf3 -c SERVER_IP Replace SERVER_IP with the reachable address of the server.
The default server port is TCP 5201 for the initial control connection. Depending on the test protocol, the data traffic uses the corresponding TCP or UDP transport.
TCP testing measures throughput with TCP reliability and congestion-control mechanisms. UDP testing sends datagrams at a configurable rate and reports metrics such as jitter and datagram loss.
The -R option reverses the test direction. The server sends traffic to the client instead of the client sending traffic to the server.
The -P option sets the number of parallel client streams. Multiple streams can help test whether a single TCP flow or endpoint processing is limiting throughput.
UDP packet loss may occur because of congestion, excessive sending rates, host CPU limitations, receive-buffer pressure, or packet drops in network equipment.
Yes. You can run iPerf3 between a Wi-Fi-connected client and a wired server to measure throughput across the wireless network path. The result can help reveal wireless performance limitations.
No. The official project does not list Windows as a supported platform. Community builds exist, but ESnet recommends iPerf2 for Windows users.
It can measure throughput between two endpoints across the internet, but the result depends on the selected server, routing, host performance, and the path between the systems. It is not identical to a typical consumer internet speed test.
iPerf3 is an important tool for network engineers, system administrators, and infrastructure teams who need to measure throughput and investigate network performance.
Its client-server model makes it possible to test a specific path rather than relying on generic internet speed measurements.
By combining TCP tests, UDP measurements, reverse-mode testing, parallel streams, and packet analysis with Wireshark, administrators can identify performance limitations more accurately.
The most reliable approach is to begin with simple tests, measure both directions, increase test complexity gradually, and investigate the endpoints as carefully as the network itself.
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is iPerf3 used for?",
"acceptedAnswer": {
"@type": "Answer",
"text": "iPerf3 measures network throughput between two endpoints. It is commonly used to test TCP and UDP performance, measure packet loss and jitter, and troubleshoot network bottlenecks."
}
},
{
"@type": "Question",
"name": "How do I run an iPerf3 test?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Start the server with iperf3 -s, then run the client with iperf3 -c SERVER_IP using the reachable address of the server."
}
},
{
"@type": "Question",
"name": "What is the default iPerf3 port?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The default server port is TCP 5201 for the initial control connection. Test data uses the corresponding TCP or UDP transport."
}
},
{
"@type": "Question",
"name": "What is the difference between an iPerf3 TCP test and a UDP test?",
"acceptedAnswer": {
"@type": "Answer",
"text": "TCP testing measures throughput with TCP reliability and congestion-control mechanisms. UDP testing sends datagrams at a configurable rate and reports metrics such as jitter and datagram loss."
}
},
{
"@type": "Question",
"name": "What does the iPerf3 -R option do?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The -R option reverses the test direction so that the server sends traffic to the client."
}
},
{
"@type": "Question",
"name": "Can iPerf3 test Wi-Fi performance?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Yes. Running iPerf3 between a Wi-Fi-connected client and a wired server measures throughput across the wireless network path."
}
},
{
"@type": "Question",
"name": "Is iPerf3 officially supported on Windows?",
"acceptedAnswer": {
"@type": "Answer",
"text": "No. The official project does not list Windows as a supported platform. Community builds exist, but ESnet recommends iPerf2 for Windows users."
}
}
]
} Introduction Border Gateway Protocol (BGP) is the routing protocol used to exchange network reachability information…
Introduction A Linux server can experience connection failures even when its network interface is working…
Introduction TCP retransmissions are an important indicator of network reliability and performance. When a Linux…
Open Shortest Path First (OSPF) is a link-state routing protocol widely used in enterprise networks…
Group Policy is one of the most important management features in Windows Server Active Directory…
Windows DNS servers play an essential role in Active Directory environments, allowing computers, servers, applications,…