Master Network Speed Testing with iPerf: Installation, Commands, and Advanced Options
This guide explains how to install iPerf on Linux, macOS, and Windows, start the server and client, use basic and advanced command‑line options, and run example tests to measure TCP and UDP bandwidth, providing practical tips for accurate network performance diagnostics.
iPerf is a network performance testing tool used to measure maximum TCP and UDP bandwidth. It supports multiple platforms including Windows, Linux, and macOS.
Installation
On Linux, use the package manager. For Ubuntu/Debian:
sudo apt-get update
sudo apt-get install iperfOn RPM‑based systems such as CentOS or RHEL:
sudo yum install epel-release # install EPEL repository
sudo yum install iperfFor CentOS 8 / RHEL 8, replace yum with dnf:
sudo dnf install epel-release
sudo dnf install iperfOn macOS, install via Homebrew: brew install iperf On Windows, download the pre‑compiled binary from the official iPerf website.
Using iPerf
iPerf usage consists of two steps: start the server, then run the client.
Server
Start iPerf in server mode (default listening port 5001):
iperf -sThe server waits for client connections.
Client
Connect to the server from the client: iperf -c <server_ip> Example:
iperf -c 192.168.178.223This connects to the server at the given IP and begins the test.
Advanced Options
Common iPerf options include: -i <interval>: set reporting interval in seconds. -n <bytes>: specify total number of bytes to send. -t <time>: set test duration in seconds. -u: use UDP instead of TCP. -p <port>: set server listening port. -P <parallel>: run multiple parallel streams.
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 Send 1 GB of data: iperf -c 192.168.178.223 -n 1g Report results every 5 seconds:
iperf -c 192.168.178.223 -i 5Summary
iPerf is a powerful network diagnostic tool that can test TCP and UDP bandwidth, providing reports on throughput, latency jitter, and packet loss. By configuring parameters such as server/client IP, port, test duration, and reporting interval, users can obtain accurate performance measurements.
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.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
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.
