How to Use iPerf for Accurate Network Bandwidth and Latency Testing
This guide walks you through preparing the environment, installing iPerf on Windows or Linux servers, running it in server and client modes, testing TCP and UDP performance, measuring latency with ping, and checking all available options to ensure reliable network bandwidth and latency measurements.
Prerequisites
Ensure network connectivity between the source and target servers and that the target server's security‑group rules allow the ports iPerf will use.
Steps
Download the iPerf binary that matches the source server's operating system.
Extract the iPerf package on both the source and target servers (or on another server in the same region). For Windows servers the extracted package looks like the screenshot below.
On the target server, start iPerf in server mode.
Change to the directory containing the iPerf executable: cd /d path Run iPerf in server mode (example for Windows): iperf3 -p port -s The port is the listening port. Windows users typically choose 8900, Linux users often use 22, but any open port may be used as long as the target server’s security group permits the corresponding TCP/UDP traffic.
On the source server, run iPerf in client mode to test TCP bandwidth.
Change to the iPerf directory: cd /d path Execute the client command (Windows example): iperf3 -c target_IP -p port -t time Parameters: -c target_IP – IP address of the iPerf server. -p port – Port used by the server (e.g., 8900). -t time – Test duration in seconds (default is seconds).
To test UDP jitter, packet loss, and bandwidth, add the -u flag: iperf3 -c target_IP -p port -u -t time The -u option switches iPerf to UDP mode, which reports jitter, loss, and bandwidth.
Optionally, measure network latency with ping: ping target_IP Make sure the target server’s VPC security group allows ICMP packets.
View all iPerf options or get help from the official website: iperf3 -h If the command output shows "Server listening on 8900", the iPerf server is running correctly.
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.
