iperf

7
IPERF TUTORIAL What is IPERF?: IPerf is a useful open-source tool for measuring the speed, throughput and quality of a network link. Jperf is the GUI Java driven front-end for IPerf. The tool utilizes TCP and UDP. TCP is used for measuring link speed and throughput. UDP is used for measuring jitter (variance in latency from packet to packet) and packet loss. GETTING STARTED: This tutorial is intended to cover basic TCP usage of Jperf and Iperf. To get started, you’ll need 2 devices running Iperf or Jperf. One will act as the server; the other will be the client. You’ll need to configure the role of each and run the test. The default setting tests using a single TCP stream for 10 seconds and displays the resulting information in Kbytes & Kbits per second. If you don’t have baseline results, I suggest establishing one. Start with 2 machines and a crossover cable or a switch and compare your results to that. Example Gigabit throughput baselines can be found at the end of this document.

Transcript of iperf

IPERF TUTORIAL

What is IPERF?:

IPerf is a useful open-source tool for measuring the speed, throughput and quality of a network link. Jperf is the GUI

Java driven front-end for IPerf. The tool utilizes TCP and UDP. TCP is used for measuring link speed and throughput.

UDP is used for measuring jitter (variance in latency from packet to packet) and packet loss.

GETTING STARTED:

This tutorial is intended to cover basic TCP usage of Jperf and Iperf.

To get started, you’ll need 2 devices running Iperf or Jperf. One will act as the server; the other will be the client. You’ll

need to configure the role of each and run the test. The default setting tests using a single TCP stream for 10 seconds

and displays the resulting information in Kbytes & Kbits per second. If you don’t have baseline results, I suggest

establishing one. Start with 2 machines and a crossover cable or a switch and compare your results to that. Example

Gigabit throughput baselines can be found at the end of this document.

JPERF Configuration:

JPERF Server:

Configure the server first so that a client can connect to it.

Ensure iPerf isn’t already running by clicking the Stop Iperf button. Choose the Server option in the iPerf Mode

area and then click RUN iPerf. You don’t need to configure anything else for simple testing.

JPERF Client:

Ensure iPerf isn’t already running by clicking the Stop Iperf button.

Choose the Client option in the iPerf Mode area. Type the IP address of the server in the Server Address and

then click RUN IPERF. You don’t need to configure anything else for simple testing

JPERF Results:

The resulting information is in the form of how much data transferred and the rate at which the data was

transferred at. By default, the information will be displayed in KiloBytes (amount transferred) and KiloBits Per

Second (rate of transfer). The results are displayed in both the graph and the text windows. The graph windows

shows plot points every 1 second. The text window will display the results for the report interval in 1 second

intervals (7.0-8.0 sec, 8.0-9.0 sec, 9.0-10.0 sec, etc) and the last line will display the overall average (0.0-10.0

sec).

JPERF Options:

• IPerf Command: This field is auto-filled with the CLI equivalent of whatever GUI options you select.

• Parallel Streams: How many tests to run simultaneously.

• Transmit: Length of test measured in Bytes or Seconds

• Output Format: Format of results (Bits, Bytes, MegaBits/Bytes, GigaBits/Bytes…etc)

• Report Interval: How often, in time, the results are displayed.

• Testing Mode: Trade = 2 Tests. Client to server followed by server to client, independent of each other.

Dual = 1 Test. Client to server and server to client at the same time (Bi-Directional).

• Test Port: Port on which to conduct test.

• Representative File: File from which data will be transferred from during test.

IPERF Configuration:

IPERF Server

You will need to start the server before any clients will be able to connect.

To start the server, type the following (in red, BOLD):

[nino@PS-ToolKit-2 ~]$ iperf –s

------------------------------------------------------------

Server listening on TCP port 5001

TCP window size: 85.3 KByte (default)

------------------------------------------------------------

IPERF Client:

To configure a device as an IPERF Client, type the following (in red, BOLD):

[nino@PS-ToolKit-2 ~]$ iperf -c 129.113.170.247

------------------------------------------------------------

Client connecting to 129.113.170.247, TCP port 5001

TCP window size: 64.0 KByte (default)

------------------------------------------------------------

[ 3] local 129.113.29.86 port 52032 connected with 129.113.170.247 port 5001

[ ID] Interval Transfer Bandwidth

[ 3] 0.0-10.0 sec 945 MBytes 793 Mbits/sec

IPERF Results

Like with Jpef, the resulting information is in the form of how much data transferred and the rate at which the

data was transferred at. By default, the information will be displayed in KiloBytes (amount transferred) and

KiloBits Per Second (rate of transfer). By default, the results display the overall average (0.0-10.0 sec) instead

of each interval’s results. You can change this by using the “-i” option to change the report intervals.

IPERF Options:

[nino@PS-ToolKit-2 ~]$ iperf –h

Usage: iPerf [-s|-c host] [options]

iPerf [-h|--help] [-v|--version]

Client/Server:

-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, Mbytes

-i, --interval # seconds between periodic bandwidth reports

-l, --len #[KM] length of buffer to read or write (default 8 KB)

-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)

-o, --output <filename> output the report or error message to this specified file

-p, --port # server port to listen on/connect to

-u, --udp use UDP rather than TCP

-w, --window #[KM] TCP window size (socket buffer size)

-B, --bind <host> bind to <host>, an interface or multicast address

-C, --compatibility for use with older versions does not sent extra msgs

-M, --mss # set TCP maximum segment size (MTU - 40 bytes)

-N, --nodelay set TCP no delay, disabling Nagle's Algorithm

-V, --IPv6Version Set the domain to IPv6

Server specific:

-s, --server run in server mode

-U, --single_udp run in single threaded UDP mode

-D, --daemon run the server as a daemon

Client specific:

-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec

(default 1 Mbit/sec, implies -u)

-c, --client <host> run in client mode, connecting to <host>

-d, --dualtest Do a bidirectional test simultaneously

-n, --num #[KM] number of bytes to transmit (instead of -t)

-r, --tradeoff Do a bidirectional test individually

-t, --time # time in seconds to transmit for (default 10 secs)

-F, --fileinput <name> input the data to be transmitted from a file

-I, --stdin input the data to be transmitted from stdin

-L, --listenport # port to receive bidirectional tests back on

-P, --parallel # number of parallel client threads to run

-T, --ttl # time-to-live, for multicast (default 1)

-Z, --linux-congestion <algo> set TCP congestion control algorithm (Linux only)

Miscellaneous:

-x, --reportexclude [CDMSV] exclude C(connection) D(data) M(multicast) S(settings)

V(server) reports

-y, --reportstyle C report as a Comma-Separated Values

-h, --help print this message and quit

-v, --version print version information and quit

Example Baseline Results:

Hardware:

Dell Lattitude D630 with a Broadcom NetXtreme 57xx Gigabit Controller

MACBook Pro (2010) with a Broadcom NetXtreme Gigabit Ethernet

HP PROCURVE 2520G-8-POE (8 Port Gigabit switch)

Operating Systems:

Windows 7 SP1

Mac OS X v 10.7

PERFSONAR Live CD (CENTOS 5.6)

Software:

IPERF 2.0.5 (Default settings, 10 second test duration)

RESULTS:

IPERF BASELINE TEST RESULTS

CLIENT SERVER Transfer Amt. Transfer Rate

Dell MacBook 557Mbytes 467 Mbits/Sec

Dell MacBook 519MBytes 435Mbits/Sec

MacBook Dell 972MBytes 815Mbits/Sec

MacBook Dell 980MBytes 822Mbits/Sec

Dell MacBook 1.12GBytes 941 Mbits/Sec

Dell MacBook 1.11GBytes 957Mbits/Sec

Macbook Dell 1.12GBytes 941Mbits/Sec

Macbook Dell 1.12GBytes 941Mbits/Sec

Dell Macbook 1.09GBytes 940Mbits/Sec

Dell Macbook 1.1GBytes 942Mbits/Sec

MacBook Dell 1.09GBytes 935Mbits/Sec

MacBook Dell 1.09GBytes 939Mbits/Sec

Dell MacBook 1.04GBytes 896Mbits/Sec

Dell MacBook 1.02GBytes 856Mbits/Sec

MacBook Dell 909MBytes 761Mbits/Sec

MacBook Dell 909MBytes 762Mbits/Sec

WINDOWS 7 SP1

MAC OSX 10.7

CENT OS 5.6

Downloads & Additional Information:

IPerf Download (CLI): http://sourceforge.net/projects/iPerf/

JPERF Download (GUI Requires Java): http://sourceforge.net/projects/jperf/

Java Download: http://java.com/inc/BrowserRedirect1.jsp?locale=en

Alternate Tutorial: http://openmaniak.com/iPerf.php

Document history: v1.2 - 10.15.12 – Nino Avila