Iperf Tutorial
Iperf Tutorial
Abstract
For some of the assignments in the Advanced Networking Lab you may
need to test the performance of your network connection. This document
explains how to use the iperf tool for performance testing.
1 Introduction
The iperf tool is a commonly used network testing tool that can create TCP
and UDP data streams and measure the throughput of a network that is carrying
them. iperf allows the user to set various parameters that can be used for
testing a network, or alternately for optimizing or tuning a network. iperf has
a client and server functionality, and can measure the throughput between the
two ends, either unidirectonally or bi-directionally. It allows you to also test the
performance of dierent TCP congestion control algorithms by picking dierent
ones while running it in client mode.
Please note that when used for testing TCP capacity, Iperf measures the
throughput of the payload. One thing to note is that Iperf uses 1024*1024 for
megabytes and 1000*1000 for megabits.
2 Installation
This document assumes that you are running an Ubuntu distribution, however,
any Debian based distribution should also work. In case you are not on a Debian
based distribution, please try to compile iperf from source.
1
http://sourceforge.net/projects/iperf/
Once your project downloads, using the terminal, navigate to the folder
where the file was downloaded. Assuming you downloaded iperf version 2.0.5,
issue the following commands:
On other distributions, you may use the package manager provided to you;
for example, on SuSe you can use yum.
3 Bandwidth Testing
iperf can be started in client or server mode. We have already setup three
servers for you to use in order to perform bandwidth tests. The server addresses
you can use are:
meat.eecs.jacobs-university.de
veggie.eecs.jacobs-university.de
cook.eecs.jacobs-university.de
2
You may make the bandwidth testing more complex, as desired, by using
various command line switches to setup the iperf test. In the above example
-c switch is used to instruct iperf to start in client mode, in order to connect
to meat.eecs.jacobs-university.de. This test is unidirectional; in case you
wish to do a bi-directional test, you may use the -d switch as shown below:
One of the most handy features of iperf is to test the performance of TCP
over a connection using dierent congestion control algorithms. Using the -Z
command line switch you can instruct iperf to use the specified congestion
control algorithm, rather than the kernel default:
The congestion control switch only applies to Linux and some options that
you may use on any distribution are, reno, yeah, highspeed, bic and vegas.