Using Iperf To Test Network Bandwidth

Iperf is a network bandwidth tool which can measure TCP and UDP bandwidth performance. Iperf runs in a client-server setup between two or more points on a network (or over the internet).

Installation

Linux

Installation of Iperf can be done easily with the EPEL (Extra Packages for Enterprise Linux) package repository. To use this repository, execute the following as the root user:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Once the EPEL repository is in use, iperf is installed through yum.

yum install iperf

Windows

For windows, Iperf is available through a java based frontend, 'jperf'. Download JPerf here and extract the archive. To run, be sure Java is installed, and execute 'jperf.bat' in the extracted directory.

Usage

Iperf must first be executed in 'server' mode on the machine or network you're testing bandwidth to. Then iperf is execute in 'client' mode on the other, and upload bandwidth from the client to the server will be measured.

Linux

To execute iperf in server mode, simply pass the '-s' switch. Additionally, the '-f' switch can be passed to specified the format results should be displayed in ('M' for Megabytes, 'K' for Kilobytes); the default is kilobits per second.

iperf -s -f M

To execute in client mode, use the '-c' switch and supply the IP or hostname of the iperf server instance.

iperf -c 1.2.3.4 -f M

Windows

Once JPerf is executed via jperf.bat, 'Client' or 'Server' can be selected to specify the mode. If running as a client, 'Server address' must be provided. Once the needed mode is selected, click 'Run iperf' to execute.

The default run options will execute 10 tests and plot the results.

iperf