Tutorials · Troubleshooting

How to Test Network Speed Between Two Points With iperf3

Internet speed tests do not tell you how fast your LAN, Wi-Fi or site-to-site link really is. iperf3 measures throughput, loss and jitter between two machines you control.

Beginner10 min7 steps

Before you start

  • Two computers or servers, one at each end of the link
  • iperf3 on both (apt install iperf3, brew install iperf3, or the Windows build)
  • TCP/UDP port 5201 allowed between them

Step by step

  1. Start the server

    Run iperf3 in server mode on the machine at the far end.

    iperf3 -s
    
  2. Run a TCP test

    From the other machine, test for 30 seconds. The result is the throughput from client to server.

    iperf3 -c 10.1.20.15 -t 30
    
  3. Test the other direction

    -R reverses the test so the server sends to you. Many problems only show in one direction.

    iperf3 -c 10.1.20.15 -t 30 -R
    
  4. Use parallel streams for fast links

    One TCP stream may not fill a 10G link or a long-distance WAN. Use 4–8 streams.

    iperf3 -c 10.1.20.15 -t 30 -P 8
    
  5. Measure loss and jitter with UDP

    For voice and video, test UDP at the expected rate and read loss % and jitter. Voice needs under 1% loss and under 30 ms jitter.

    iperf3 -c 10.1.20.15 -u -b 50M -t 30
    
  6. Compare with what you expect

    Gigabit wired: about 940 Mbit/s. Wi-Fi 6 on 80 MHz close to the AP: often 500–900 Mbit/s. Site-to-site VPN: below the ISP contract because of encryption overhead. Much lower results point to a bottleneck to investigate.

  7. Stop the server

    Do not leave iperf3 listening on production servers. Stop it with Ctrl+C when finished.

Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.

Pro tips

  • Test from wired to wired first, then add Wi-Fi: this separates LAN problems from wireless problems.
  • Laptop power saving and old USB adapters limit results. Use a good wired NIC for baseline tests.
  • Run tests at quiet times so you do not disturb users.