Friday, January 8, 2016

Using iPerf 3 to Test Network Throughput

iPerf 3 is a lightweight, cross-platform, command-line tool for measuring network throughput between 2 hosts.

Installation

Windows

Simply download the appropriate (x86 or x64) version from the iPerf site, extract the archive to a location of your choice, and browse to that folder in a command prompt.

iPerf 3 on Windows

Linux

iPerf 3 is available from the default repositories in many distros. For example, you would run the following command to install iPerf3 on Ubuntu.

sudo apt-get install iperf3

If your distro doesn't have it in the repositories, you can download various binaries here.

iPerf 3 on Ubuntu

OSX

The easiest way to install iPerf 3 in OSX is to use Homebrew

Open a terminal and run this command to install Homebrew:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Next, run this command to install iPerf3:

brew install iperf3



iPerf 3 on OSX

Usage

On the machine that you want to use as the server, run the following command.

iperf3 -s

This will start iPerf 3 in server mode, and it will listen for incoming connections.

iPerf 3 in server mode listening for incoming connections

Next, run the following command on the client machine:

iperf3 -c <hostname or IP of server>

For example:

iperf3 -c 192.168.1.2

iperf3 -c server.mydomain.com

A session will establish and a test will be run. The progress and results will be displayed on both the client and the server.

Test results as seen on the server

Test results as seen on the client

Advanced Options

iPerf 3 supports a number of command-line options that I didn't cover. To see a complete list of options, go to the iPerf user docs section of the iPerf site.