Manage Learn to apply best practices and optimize your operations.

How to use iPerf to measure throughput

Learn how to use iPerf, a network testing tool to measure throughput and benchmark your WAN links.

In the second part of this tip series, Ping latency test results, we explored the mechanics of using the ping network utility to benchmark wide area network (WAN) latency. In this third and final installment, we'll detail how to use iPerf, a network performance measurement tool, to measure throughput of your WAN links.

IPerf is the Windows-based testing tool developed by the U.S. National Laboratory for Applied Networking Research (NLANR) Distributed Application Support Team (DAST). The tool is built on a client/server model and can be used to measure maximum UDP and TCP throughput between the client and server stations. While our focus is on the WAN, you can also learn how to use iPerf to measure LAN and wireless LAN throughput.

Where to download and how to install iPerf

While the NLANR/DAST project evaporated when funding ran out in 2006, the iPerf tool lives on as a SourceForge project. It can be downloaded for free from SourceForge's iPerf project page.

While SourceForge provides the latest version of iPerf, version 2.0.5 as of this writing, the download provides only source files, which requires the user to compile the code to produce a usable, executable binary. Fortunately, for those among us who are allergic to compilers, a ready-to-go executable of iPerf version 1.7 can be downloaded from Softpedia's website. For most users, this version should prove just fine as the core functions are the same as in version 2.0.5.

As with ping, you will choose two Windows stations on opposite ends of the WAN to serve as the endpoints for the measurement process. These stations must be addressable via private or public IP addresses or network names. Depending upon how your network is configured, this may require you to place one or both stations in the demilitarized zone (DMZ) of their respective firewalls or to map the addresses/ports in the firewall configuration.

Installation of iPerf is simple: Just place the iPerf.exe file on both systems in a folder contained in a system path -- or one that you can access via change directory -- and you are ready to go. The role of each station (client or server) is determined by switches at runtime. The iPerf program contains both client and server functionality.

Important considerations for using iPerf

Before we get to the commands required to run the program, there are a few very important considerations about how to use iPerf with respect to measuring throughput, and the impact that testing can have on your users.

When ping generates minimal network load (at least in a default configuration), the opposite is true of iPerf. In order to measure the capacity of your WAN link, iPerf essentially tries to consume all the bandwidth that your WAN will deliver. This can give you great bandwidth measurements, but also gives you incredibly unhappy users. The bottom line is that you will need to schedule your iPerf runs outside of normal business hours if you want to run more than just a quick test.

In addition to this, you must deal with the asymmetry of both your WAN link and the iPerf program. Let me explain what I mean by this.

Older WAN link offerings, such as T1, are symmetrical; that is, the bandwidth was provisioned to be the same in both directions. For example, T1 provided 1.544 Mbps of bandwidth "upstream" (from branch office to headquarters) as well as "downstream" (from headquarters to branch). This is not the case with most Internet-based WAN offerings over cable or DSL. Note that while Symmetrical DSL does exist (SDSL), the generic DSL that AT&T and other Internet service providers (ISPs) reference is almost always asymmetric DSL (ADSL).

In South Florida, for example, AT&T's "DSL Xtreme 6.0" provides up to 6 Mbps downstream, but only 512 Kbps upstream. Cable operators offer similar services where the downstream bandwidth is significantly greater than the upstream bandwidth. Ultimately, you will need to benchmark your link for both up- and downstream throughput.

It should be noted that iPerf, by default, only measures the bandwidth from client to server. You will need to configure the commands properly, as shown below, to measure bi-directional throughput.

How to use iPerf to measure throughput

Now we will discuss how to use iPerf to measure throughput. The simplest way to run iPerf is to open up a command line prompt in Windows. If the command line approach doesn't work for you, you can install JPerf 2.0.2, which is a graphical front-end for iPerf written in Java. Of course, given that the iPerf parameters are so simple, it might be more challenging to install the Java-based graphical user interface (GUI) than to just run iPerf from the command line.

Type the following into the server's command line window:

iPerf -s

Then hit return.

That's it -- simple! This command tells this instance of iPerf that it will be functioning as a server -- that is, waiting to receive data. By default, the iPerf server will listen on Port 5001. You may need to know this if you need to configure your firewall to map traffic for the iPerf port to your iPerf server.

If you want to use a port other than the default port, you must specify that in the command line. If you need to use say, Port 7575, type the following in the command line window on the server:

iPerf -s -p 7575

Then hit return.

We will now cover how to use iPerf to emulate the client. As the client initiates the benchmark, it has more configuration options. For starters, the client needs to know the IP address of the target server and it needs to know the port number if a port other than the default is being used.

In our example, we will use Port 7575 for the iPerf traffic, and the client will communicate with an iPerf server located at IP address By default, this will benchmark the throughput in one direction: from client to server. The "-c" tells the iPerf instance to function as a client station.

Type the following into the client's command line window:

iPerf -c -p 7575

Then hit return.

By default, the benchmark will run for 20 seconds. Then, it will present you with the average throughput for the run.

You'll certainly want to measure the throughput both upstream and downstream. To do that, you simply add one of two options to the iPerf client command line.

The "-r" option on the client's command line instructs iPerf to measure bi-directional throughput sequentially, i.e., upstream followed by downstream. The "-d" option instructs iPerf to run both upstream and downstream at the same time.

To modify our previous command to run upstream and downstream throughput simultaneously, type the following into the client's command line window:

iPerf -c -p 7575 -d

Then hit return.

Finally, our engineers at The Tolly Group have noted that the results reported on the server machine are not always accurate, so we suggest that you always use only the results displayed on the iPerf client machine.

The bi-directional results should be virtually the same, whether run separately or simultaneously. If the simultaneous run results are significantly lower than the bi-directional results, you will want to investigate further and try to determine if there is perhaps a performance issue with your cable modem or router.

While broadband providers are careful to advertise their bandwidth offerings with the "up to X Mbps" language, you will want to see throughput results that are at least somewhere in that range. If you don't, at least you have some hard evidence to back up claims of slow service when you contact your ISP.

Read the other tips in this series:

This was last published in February 2012

Dig Deeper on WAN technologies and services