Using Iperf to Test Your Local Network Speed

November 25, 2026 · 3 min read · Advanced & Tool Comparisons

You've run an internet speed test and your results look fine — but your local network feels sluggish. Files transfer slowly between computers. Streaming from your NAS stutters. The problem might not be your internet connection at all. It might be your local network. Iperf is a free command-line tool that measures the actual speed between two devices on your network, cutting your internet connection out of the equation entirely.

What Is Iperf and Why Use It?

Iperf is a lightweight, open-source tool that tests network performance between two endpoints. Unlike a regular speed test, which measures your connection to a remote server on the internet, Iperf measures speed between two devices you control — like your laptop and your desktop, or your phone and your server.

When Iperf Makes Sense

Here are some situations where Iperf is the right tool:

  • You want to know if your Ethernet cables are actually delivering gigabit speeds.
  • You're testing whether a new Wi-Fi router performs better than your old one.
  • Files copy slowly between two computers and you're not sure why.
  • You just upgraded your network gear and want to verify it's working properly.
  • You're troubleshooting a network bottleneck — maybe a bad switch port or a flaky cable.

If your issue is with your internet connection itself, start with a broadband speed test instead. Iperf won't tell you anything about your ISP's performance.

Iperf2 vs. Iperf3: Which Version Should You Use?

There are two main versions of Iperf floating around, and they're not compatible with each other. You can't run Iperf2 on one machine and Iperf3 on the other — they won't connect. Here's how they compare:

Feature Iperf2 Iperf3
Multi-threaded Yes No (single-threaded)
Max throughput (typical) 10+ Gbps ~3–5 Gbps (CPU-limited)
JSON output No Yes (-J flag)
Bidirectional test Yes (-d flag) Yes (--bidir flag)
UDP jitter/loss testing Yes Yes
Best for High-speed links (10G+) Most home/office networks

For most people, Iperf3 is the better choice. It's actively maintained, easier to script with JSON output, and more than fast enough for testing gigabit connections. If you're testing 10-gigabit or faster links, Iperf2's multi-threading will give you more accurate results since Iperf3 can max out a single CPU core before saturating the link.

How to Install Iperf3

Iperf3 is available on Windows, macOS, and Linux. Installation takes about 30 seconds on most systems.

Linux (Ubuntu/Debian)

Open a terminal and run: sudo apt install iperf3. That's it. It's in the default repositories for almost every Linux distribution.

macOS

If you have Homebrew installed, run: brew install iperf3. If you don't have Homebrew, you can download a binary from the Iperf website directly.

Windows

Download the Windows binary from the official Iperf3 page (iperf.fr). Extract the zip file to a folder, then open Command Prompt or PowerShell and navigate to that folder. There's no installer — you just run the executable directly.

Remember, you need Iperf3 installed on both machines. One will act as the server, and the other as the client.

Running Your First Test

Step 1: Start the Server

On one machine, open a terminal and type: iperf3 -s. This starts Iperf3 in server mode. It'll listen on port 5201 by default and wait for a client to connect. Note this machine's local IP address — you'll need it. On most systems, you can find it with ip addr (Linux),