Simple network performance measurements with iperf

iperf is free open-source command-line utility for measuring network performance. It is available for Linux, Windows and macOS. It can be used in both client and server mode.

Install iperf

  • Ubuntu: sudo apt-get install -y iperf
  • macOS: brew install iperf
  • Windows: download here

Server mode

To run iperf in server mode, run the following command:

iperf -s

It listens to TCP port 5001 by default. You change this by specifying the -p parameter.

If you are doing wireless network performance monitoring, then you probably want to run iperf in server mode on a device with a wired ethernet connection.

Client mode

To run iperf in client mode, run the following command:

iperf -c <SERVER_IP>

The default behavior is that the client will send and the server will receive. You can change this behavior by specifying the -R parameter.


There are plenty of options you can use. Use iperf --help to list all available options.

Below some useful options are listed.


  • -p specify the port to listen to.
    Example: to have iperf listen on port 5551, use iperf -s -p 5551


  • -t specify the duration of the test.
    Example: iperf -c <SERVER_IP> -t 10
  • -i specify the interval between reports.
    Example: iperf -c <SERVER_IP> -t 30 -i 5
  • -R reverse the test so that the server receives and the client sends.
Show Comments