Master iPerf: Install, Run, and Optimize Network Bandwidth Tests
This guide explains how to install iPerf on Linux, macOS, and Windows, shows basic server‑client usage, details advanced command‑line options, and provides practical examples for measuring TCP and UDP bandwidth performance.
What Is iPerf?
iPerf is a cross‑platform network performance testing tool used to measure the maximum TCP and UDP bandwidth between two hosts. It runs on Linux, Windows, macOS and many other systems.
Installation
Linux (Debian/Ubuntu)
sudo apt-get update
sudo apt-get install iperfLinux (RPM‑based, CentOS/RHEL)
sudo yum install epel-release # install EPEL repo
sudo yum install iperfCentOS 8 / RHEL 8
sudo dnf install epel-release
sudo dnf install iperfmacOS
brew install iperfWindows
Download the pre‑compiled binary from the official iPerf website and place it in a directory that is in your PATH.
Basic Usage
Start the Server
On the machine that will act as the server, run: iperf -s This starts iPerf in listening mode on the default port 5001.
Run the Client
On the client machine, connect to the server’s IP address: iperf -c <server_ip> Example:
iperf -c 192.168.178.223Advanced Options
-i <seconds>: Interval between periodic bandwidth reports. -n <bytes>: Transmit a specific amount of data. -t <seconds>: Duration of the test. -u: Use UDP instead of TCP. -p <port>: Specify a custom port for server and client. -P <parallel>: Run multiple parallel streams.
Practical Examples
Run a 10‑second TCP bandwidth test: iperf -c 192.168.178.223 -t 10 Run a 30‑second UDP test: iperf -c 192.168.178.223 -u -t 30 Transfer exactly 1 GB of data: iperf -c 192.168.178.223 -n 1g Report results every 5 seconds:
iperf -c 192.168.178.223 -i 5Interpretation of Results
iPerf outputs the achieved bandwidth in Bytes per second, along with total transferred data and, for UDP, jitter and packet loss statistics. These metrics help diagnose network capacity and performance bottlenecks.
Conclusion
iPerf is a powerful, flexible tool for network diagnostics. By installing it on the appropriate platforms, launching a server, and using the client with suitable options, you can obtain detailed TCP/UDP bandwidth measurements and fine‑tune your network testing strategy.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
