Network Bandwidth Testing using iPerf

From time to time you will find yourself needing to check the actual bandwidth capacity from one endpoint to another. Whether it is to determine any bottlenecks, to carry out troubleshooting or merely to satisfy your own curiosity, knowing how to test your Network is a fundamental tool to have in your arsenal.

By far the most popular tool to test Network bandwidth is a program called iPerf.

This quick guide will show you how to run the tool on a Windows Operating System.

Preparation

iPerf is downloaded from the above linked website, and then run from the command line.

If you were to download iPerf for Windows, you would find yourself with 2 files:

  1. The main EXE file
  2. A secondary DLL file

Simply open the Command Prompt inside the same directory (or browse to the directory from a standard Command Prompt window) to start using iPerf. An easy way I like to do this is by holding down the SHIFT key on your keyboard and right-clicking in a blank area of the folder window where iPerf has been downloaded (once unzipped).

This will give you an option to open a Command Prompt session in this exact directory, its pretty handy and allows you to start exactly where you want to be.

Local Network Usage

iPerf testing can be used locally to determine the maximum available bandwidth between 2 separate hosts on the same Network.

In this scenario, we assume control of both devices and the ability to un iPerf on them simultaneously. iPerf works by running in one instance as a Server, and the other as a Client. As the role names imply, the Host configured to be the Client will be sending traffic to the remote Host configured as a Server.

To configure a Host as a Client, run a Command Prompt session in the same location as the iPerf executable (mentioned in the section above) and run the following command:

iperf3.exe -c [SERVER IP ADDRESS]

To configure a Host as a Server, run the following command:

iperf3.exe -s

As long as both hosts can reach each other, you will find the iPerf test begin right away.

Internet Usage

Testing locally on your LAN is very useful, but what if you wanted to test your WAN connection? What if you wanted to test your maximum available internet bandwidth? Thankfully there is a way to do so too.

Once we have a Host we want to initiate the test from, we have a list of public iPerf servers available to us to be used as remote endpoints.

These Servers are almost always on and available, ready for us to use in our testing. The listed table on the page mentions the geographic location of these Servers, so we can choose the one most relevant to the type of testing we want to carry out. Other information such as maximum bandwidth available to test is also listed, but for the average connection this isn’t something that we need to worry about too much.

These publicly accessible Servers are always on and listening, so we just need to set up our internet-connected Host to act as a Client using the familiar command from above:

iperf3.exe -c [PUBLIC SERVER IP ADDRESS]

If you are using this in an Enterprise Network, make sure that the relevant Ports are open on your Firewall.

This brings us to the next section.

Ports

By default, the iPerf uses TCP Port 5201, however we can amend this to use UDP, at which point it will use Port 5001.

This brings me to the next point, which is the fact that we can customise and configure options while using the tool.

Customisable Options

iPerf itself comes with many customisable options that we can utilise. The full list is documented on the iPerf User Guide page here, but for ease of use I have listed some common options here too:

OptionDescription
-uUses UDP instead of TCP
-P (Uppercase)Runs multiple parallel streams instead of only 1
-p (lowercase)Allows you to specify a specific Port Number
-4Uses only IPv4
-6Uses only IPv6
-RReverses the direction of the test, Client receives, Server sends

I hope this has served as a brief, basic introduction to iPerf, A powerful, yet simple tool which can help us with troubleshooting Network issues.

References



Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.

Subscribe to Blog

Enter your email below to subscribe to this blog.

Blog Stats

  • 52,970 hits

Me Elsewhere

Ads

Menu