Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows 10 / Using iPerf to Test Network Speed and Bandwidth (Throughput)

February 4, 2020 CentOSLinuxToolsWindows 10

Using iPerf to Test Network Speed and Bandwidth (Throughput)

IPerf is an open-source tool designed to test network bandwidth between two network nodes. The iPerf allows to generate TCP and UDP traffic/load between two hosts. You can use iPerf to quickly measure the maximum network bandwidth (throughput) between a server and a client, conduct stress testing of the ISP communication channel, router, network gateway (firewall), your Ethernet or Wi-Fi network.

In this article, we will show you how to install and use the iPerf tool to check the network throughput on Windows and Linux CentOS (there are iPerf versions for Android, MacOS, RouterOS from MikroTik and other platforms).

Contents:
  • iPerf Versions: iPerf2 vs iPerf3
  • How to Install iPerf on Windows?
  • Installing iPerf on CentOS Linux
  • Using iPerf Command to Measure Network Speed/Bandwidth

iPerf Versions: iPerf2 vs iPerf3

IPerf is a cross-platform tool and doesn’t require installation, just copy and run it on two devices, between which you want to test the network throughput.

IPerf works in a server-client mode. On the first device, the iPerf starts in server mode (it is waiting for traffic from the iPerf client). On the second computer, the iPerf starts in client mode, generates TCP or UDP traffic and measures the maximum data transfer rate.

There are currently two independent iPerf branches developing in parallel: iPerf2 and iPerf3. The functionality of these tools is mostly compatible, but they use different network ports by default. In iPerf1/2 it is 5001, in iPerf3 it is 5201.

  • iPerf2 is preferably used for parallel threads, bidirectional tests, and this version is officially supported on Windows OS;
  • iPerf3 has better implementation of high-speed UDP testing. IPerf3 code is significantly smaller and better optimized.

The remaining differences are not so significant, so no need to use a specific version of iPerf (even the CLI parameters are the same). In this article we will use the iperf3.

The iPerf3 is not officially supported for Windows platform, but it works quite fine. I did not notice any obvious bugs. You can send your bug report to the https://github.com/esnet/iperf.

How to Install iPerf on Windows?

You can download iPerf 3.1.3 for Windows from the following link https://iperf.fr/iperf-download.php. If you want to use the iPerf 2.0 – you can get it here. You do not need to install the tool, it is enough to download the iPerf archive and extract it to a local directory on the drive. There are only two files in the archive: cygwin1.dll and iperf3.exe.

download iperf3 for windows 10 x64

There are several iPerf GUI implementations for Windows. For example, Iperf3-Cygwin-GUI or jperf.

The jperf is written on Java (in order to run jperf, the Java VM must be installed on the computer). In addition to graphical form for the CLI interface, Jperf can build graphs bandwidth charts of the communication channel in real time.

To use it, just specify the iPerf server address and run the scan.

jPerf - java app

There is a separate iPerfAutomate module in the PowerShell Script Gallery that can be used to get network performance metrics from your PowerShell scripts. You can install the module with the command: Install-Module -Name iPerfAutomate

Installing iPerf on CentOS Linux

In CentOS 8, the iperf3 package is included in the AppStream base repository (in CentOS 7 you can find iperf3 in the EPEL repo). You can install it with the dnf (yum) command:

# dnf install iperf3

On Debian/Ubuntu distros you can install the iperf3 with the command:

sudo apt install iperf3

install iperf3 on linux centos via yum or dnf

If you want to use your Linux instance as the iperf3 server, you need to open the TCP/UDP ports 5201 in firewalld (iptables):

# firewall-cmd --permanent --add-port=5201/udp
# firewall-cmd --permanent --add-port=5201/tcp
# firewall-cmd --reload

Using iPerf Command to Measure Network Speed/Bandwidth

Let’s look at a few examples of using iPerf to test network throughput. In this example, we will use a Linux CentOS host as the iPerf server. Run the iPerf3 tool in server mode:

# iperf3 –s

The iPerf server is running, it is waiting for connections on the 5201 TCP port.

Server listening on 5201.
Hint. iPerf arguments are case sensitive!

iperf3: run listening server on linux. 5201 port

Depending on the firewall settings between the client and the server, you can change the listening port using the argument -p [port_number]. You can run the iPerf server with a large TCP window size and on a different TCP port. Use the command:

# iperf3 -s -w 32768 –p 5200

  • -w 32768 – set TCP windows size to 32 kB (by default it is about 8 kB)
  • –p 5200 – the port on which iPerf is waiting for connections (I remind you that iperf2 listens by default on port 5001 and the iperf3 on 5201).

I am using a computer with Windows 10 installed as an iPerf client. Run the command prompt and go to the directory with the iPerf executable:
cd c:\tools\iperf
In order to run a network bandwidth test from the client, specify the iPerf server address (or DNS name):
iperf3.exe -c 192.168.1.200
If you started the iPerf server with an increased TCP window size, you can use the following command to get the maximum network load:

iperf3.exe -c 192.168.1.200 -P 8 -t 30 -w 32768

  • -c 192.168.1.200 – IP address of the iPerf server;
  • -w 32768 – increase the TCP window size;
  • -t 30 – is the time in seconds for the test to be done (by default, it is 10 seconds);
  • -P 8 – is the number of parallel threads (streams) to get the maximum channel load;

generate maximum network load with iperf

In my example, the test lasted 30 seconds. In the final report, we are interested in the values of the Bandwidth column listed in the last [SUM] line. In this case the average network bandwidth between two hosts is 85.9 Mbit/s. 307 MB of data was transferred (Transfer column) with the symmetric speed (sender=receiver).

Using the -f argument, you can change the speed format (bits, kilobits or megabits). In the continuous tests, when you have to estimate the performance during several minutes (hours), you can set the period of time to display the intermediate results using the –i option.

get max network bandwith with iperf tool

You can run iPerf in reverse mode (the server sends data, and the client accepts). User the –R option on the client for this.

By default, the utility generates TCP traffic, if you need to check your network bandwidth  for UDP packets, you must use the –u option. In this case, you should start the iPerf server with the command: iperf3 -s –u).

If you need to test your Internet service provider bandwidth, you can use one of the public iPerf servers (iPerf public host list is available here):

iperf3 -c iperf.scottlinux.com

If you need to measure the maximum network speed in both directions (in a duplex mode), use the –d option on the client:

iperf3.exe -c IP -P 8 -t 30 -w 32768 –d

network bandwidth

During the network test using iPerf, you can monitor your network connection throughput chart through the Task Manager.

It is important to note that, during the test, iPerf uses all available bandwidth of the communication channel between the client and server, which can negatively affect productive apps and users.

ethernet throughtput

You can display the full list of the options as follows:

iperf3 –help

Iperf is an easy-to-use and convenient network utility that helps you to measure network connection performance and maximum data transfer speed between two devices.

3 comments
2
Facebook Twitter Google + Pinterest
previous post
Generating Strong Random Password with PowerShell
next post
Fixing Volume Shadow Copy (VSS) Error with Event ID 8193

Related Reading

How to Disable NetBIOS and LLMNR Protocols in...

April 9, 2021

Enable Windows Lock Screen after Inactivity via GPO

April 8, 2021

Can’t Copy and Paste via Remote Desktop (RDP)...

March 31, 2021

UAC: This App Has Been Blocked for Your...

March 30, 2021

How to Unlock a File Locked by Any...

March 29, 2021

3 comments

myr4ik07 October 14, 2015 - 6:19 pm

Дякую

Reply
Peto February 6, 2020 - 12:44 pm

Thanks!

Reply
Robert McMahon February 7, 2020 - 7:58 pm

The major feature differences between iperf 2 vs iperf 3 is that iperf 2 supports latency related tests, video traffic profiles and multicast including source specific multicast while iperf 3 supports sctp tests and json output. The client’s and server’s clocks have to be synchronized to for the latency tests to work. Latency measurements consist of packet latencies, video frame latencies, and and tcp write tor read latencies. Iperf 2 also has a few new metrics per latency which include network power and end/end queue depth (per Little’s law)

I don’t know that iperf 3 is better with UDP. I’ll need to check into that as both tools should provide very similar performance measurements as the tools should be designed to provide accurate metrics.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • How to Disable NetBIOS and LLMNR Protocols in Windows Using GPO?

    April 9, 2021
  • Enable Windows Lock Screen after Inactivity via GPO

    April 8, 2021
  • How to Create and Manage Scheduled Tasks with PowerShell?

    April 7, 2021
  • Updating Windows VM Templates on VMWare with PowerShell

    April 5, 2021
  • Running Multiple IIS Websites on the Same Port or IP Address

    April 1, 2021
  • Can’t Copy and Paste via Remote Desktop (RDP) Clipboard

    March 31, 2021
  • UAC: This App Has Been Blocked for Your Protection on Windows 10

    March 30, 2021
  • How to Unlock a File Locked by Any Process or SYSTEM?

    March 29, 2021
  • Configuring a Domain Password Policy in the Active Directory

    March 26, 2021
  • Using Native Package Manager (WinGet) on Windows 10

    March 24, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Configure MariaDB Master-Master/Slave Replication?
  • How to Mount Google Drive or OneDrive in Linux?
  • KVM: How to Expand or Shrink a Virtual Machine Disk Size?
  • Adding VLAN Interface in CentOS/Fedora/RHEL
  • Configuring High Performance NGINX and PHP-FPM Web Server
  • Hyper-V Boot Error: The Image’s Hash and Certificate Are not Allowed
  • Install and Configure PostgreSQL on CentOS/RHEL
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top