Using iPerf3 to Test Network Throughput and Speed

Online services like speedtest.net and fast.com are useful for testing you connection speed to the internet but it cannot be used to test connection speeds across a local network. iPerf3 is a free command line tool that allows you to test the connection speed between two computers.

iPerf3 requires a computer running the software and the other computer running the software as a client that will connect to it. It doesn’t matter which computer performs which role.

On Both the Server and Client

Download the appropriate iPerf3 version from the iPerf3 website. The two computers in use do not have to be running the same operating system, for example you can run the test between a Windows PC and a Mac without a problem. The download will be a zipped folder. moved this folder to somewhere sensible and unzip it.

If using a Windows PC, open Command Prompt. If using a Mac, open Terminal.

Change to the folder that iPerf3 executable is in by typing cd followed by the filepath to the folder. For example:

cd C:\Users\staff\Desktop\iperf-3.1.3-win64\

The next instructions will only work if you have entered the correct filepath here.

Available Options

The instructions below show basic operation of iPerf. To see a full list of options, simply type iperf3 and press enter.

On the Computer Acting as the Server

Type the following into the command prompt and press enter:

iperf3 -s -p 5000

You will see a message saying that the iPerf server is listening on port 5000. The options we have used in the command above are:
-s Makes this a server
-p Sets the port number the server is listening for connection on, we have sed port 5000 in this example.

On the Computer Acting as the Client

Type the following into the command prompt and press enter:

iperf3 -c 172.16.16.2 -p 5000

This will start the speed test to the server at 172.16.16.2 on port 5000 using default options. You should change this to the server and options being used in your setup. The options we have used above are:
-c Makes this PC a client and it will try to connect to 172.16.16.2
-p We are connecting to the server on port 5000

There are a couple of other useful options that you can add to this command:
-u Changes the packet type to UDP instead of TCP
-t follow this with a number to set how long, in seconds, you want the test to run for. The default when you don’t specify a value is 10 seconds
-R Reverses the flow of data, so the client sends data to the server.
-P by default iPerf is a single threaded test so it bottlenecks at the CPU. To in crease this you can add further threads using this swiych and a number ie -P 4

Just type iperf3 to get a full list of commands.

The Output

Both the client and server end of the system will display the results. It will show information every second as the test is running but the final lines are the ones we are interested in. It will display the amount of data that was transferred (which we are not particularly interested in) and the speed at which it was transferred.

In the screen shot above, the connection between the two computers was 785Mbps.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *