Iperf is a neat little tool with the simple goal of helping administrators measure the performance of their network. Worthy of mention is the fact that it can measure both TCP and UDP performance on a network.
Iperf is anetwork bandwidth testing tool that is available for a variety of operatingsystems. It is available as C++source code and also in precompiled, executable versions for the following operating systems fromiPerf - Download iPerf3 and original iPerf pre-compiled binaries:- Windows
- Android
- iPhone / iPad
- Apple macOS
- Ubuntu / Debian / Mint
- Fedora / Red Hat / CentOS
- openSUSE
- Arch Linux
- FreeBSD
It can be used to determine available bandwidth usingboth Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) data streams.
To install an already compiled version of iPerf on a Mac OS X system, such as a MacBook Pro laptop, download theApple macOS Intel 64bits version. The latest version is a 3.x version. You will need matchingversions on both the client and server systems. E.g., a 2.x version on bothor a 3.x version on both. The software is available inZIP file format. If you double-click on the zip file in the Apple Finder application, a Unix Executable File will be extracted from the.zip file, e.g.,
iperf3
. You can move the file to theApplications/Utilities
directory or place it whereveryou like on the system.To run the program, open a Terminal window -the Terminal application is found in the
Applications/Utilities
directory. If you type /pathtofile/iperf3 -h
, wherepathtofile is the location where you placed the executable file,for the iperf3 version you will see the following 'help' information onthe usage of the program:If you run iPerf version 3in server mode with the command
iperf -s
, you will see the following:Version 3 of the program listens on TCP port 5201 by default whereasversion 2.x versions listen on TCP port 5001 by default.
You will also see a window open with the following question(image):
Do you want the application 'iperf3' to
accept incoming network connections?
accept incoming network connections?
Clicking Deny may limit the application's behavior.
This setting can be changed in the Firewall pane of
Security & Privacy preferences.
This setting can be changed in the Firewall pane of
Security & Privacy preferences.
You will need to click on Allow to allow external systems runningiPerf in client mode to connect to the system. You can terminate theprogram from the command line by hitting
control-C
, i.e.,hit the control
and c
keys simultaneously.You can check on whether iPerf is allowed to listen for incoming connections on an OS X system by the following steps:
- Click on the Apple icon at the top, left-hand corner of the screen andselect System Preferences.
- Click on Security & Privacy.
- Click on the Firewall tab. If the padlock icon is showing a closedlock, click on it to unlock it, which will require that you providecredentials for an account with administrator level access to the system.
- Then click on Firewall Options. You should see iPerf listed. If you see 'Block incoming connections' click on 'Block incoming connections'and choose 'Allow incoming connections' instead.
- Click on Ok
- You can then close the Security & Privacy window.
You can determine if iperf is allowed to accept incoming connections froma command line interface (CLI), e.g., a Terminal window - the Terminal program is found in the
Applications/Utilities
directory - by using the socketfilterfw --listapps
command as shown below:The above command shows the status of firewall rules for other applicationsas well; you can restrict the displayed output to just the rule for iperfwith the command shown below:
If the firewall software on the system is blocking incoming connectivity toiperf, you would see the following, instead.
To run iPerf in client mode to connect to an external iPerf system,use the command
iperf -c remotehost
where remotehostis the IP address or fully qualified domain name (FQDN) for the remotesystem. E.g., the iPerf output included below is from a test to apublicly available iPerf server, bouygues.testdebit.info
.Related articles:
- Using iperf on a Microsoft Windows system
Created: Tuesday June 28, 2016
Last modified: Tuesday June 28, 2016
MoonPoint Support - Installing iperf on CentOS
Created: Tuesday October 27, 2015
Last modified: Tuesday October 27, 2015MoonPoint Support
References:
- Command Line Firewall Management In OS X 10.10
krypted.com
The software is available for a variety of operating systems. You can download iPerf binaries from iPerf - The network bandwidth measurement tool for the following operating systems:
- Microsoft Windows
- Android
- iPhone / iPad
- Apple OS X
- Download iPerf for Ubuntu / Debian / Mint
- Download iPerf for Fedora / Red Hat / CentOS
- Download iPerf for openSUSE
- Download iPerf for Arch Linux
- Download iPerf for FreeBSD
You can also download the C++ source code from that page. Alternatively, if you are using a Linux distribution, you may be able to install it using a standard package management tool for the particular distribution of Linux that you are using. E.g., see Installing iperf on CentOS for instructions on how to install the software with yum.
If you install the software on two systems you control, you can test between those systems. There are also public iPerf3 servers in various parts of the world with which you can test. Those systems are running in server mode, so you use client mode on your local system when testing with them. You specify client mode with the
-c
option. You can see the available options for the program by issuing the command iperf -h
from a command prompt while in the directory where you installed the software on the Microsoft Windows system.For a Microsoft Windows system, you need only download the zip file for Windows, unzip the contents of the file, and then move the two files within the zip file, which are
cygwin1.dll
and iperf3.exe
, if you downloaded a version 3 release of the software, to whatever directory you wish to keep the program in. Note: you can't test between a host running version 3 and one running version 2; both systems need to be running a version with the same major version unumber, e.g., a 2.x or 3.x version.The download site offers 32-bit and 64-bit versions of the software. If you have a 32-bit version of Windows, you should use a 32-bit version and if you have a 64-bit version of Windows you should use the 64-bit version. If you don't know whether your version of Microsoft Windows is 32-bit or 64-bit, see Determining if your version of Windows is a 32-bit or 64-bit version.
To test with a public iperf3 server, bouygues.testdebit.info, located in France, I could issue the command
iperf3 -c bouygues.testdebit.info
using the iperf3 software installed on a Microsoft Windows system. Note: if you see the error message below, you may need to open a command prompt window in administrator mode to be able to test with iperf on the Windows system.To open a command prompt window where you can run the command with administrator permissions, see the instructions at Obtaining a Command Prompt on a Windows 8 System; the steps for other versions of Windows are similar.
If you run the software in client mode, you will see output similar to the following, which is from a test with the public test server bouygues.testdebit.info.
For this particular test, the client system could achieve a bandwidth of about 7 - 8 Mbs, which was fairly good considering the client system was constrained by a 10 Mbs local area network (LAN) connection.
Justdeals Daily Electronics Deals