Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 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.

6 comments
3
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

Windows Security Won’t Open or Shows a Blank...

May 17, 2022

How to Manually Install Windows Updates from CAB...

May 16, 2022

RDS and RemoteApp Performance Issues on Windows Server...

May 16, 2022

Fix: You’ll Need a New App to Open...

April 27, 2022

How to Completely Uninstall Previous Versions of Office...

April 26, 2022

6 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
navin Fernandes June 15, 2021 - 1:30 pm

is the default test using the server or client side hard disks or just memory?

Reply
dan C June 19, 2021 - 1:20 am

It doens’t test disk

Reply
dan C June 19, 2021 - 1:19 am

on iperf3 -d is for debug output. –bidir adds bidirectional/duplex testing (added in iperf 3.7)

-d, –debug emit debugging output
-R, –reverse run in reverse mode (server sends, client receives)
–bidir run in bidirectional mode.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows 7
  • Windows Server 2019
  • Windows Server 2016
  • Windows Server 2012 R2
  • PowerShell
  • VMWare
  • Hyper-V
  • MS Office

Recent Posts

  • Create Organizational Units (OU) Structure in Active Directory with PowerShell

    May 17, 2022
  • Windows Security Won’t Open or Shows a Blank Screen on Windows 10/ 11

    May 17, 2022
  • How to Manually Install Windows Updates from CAB and MSU Files?

    May 16, 2022
  • RDS and RemoteApp Performance Issues on Windows Server 2019/2016

    May 16, 2022
  • Deploying Software (MSI Packages) Using Group Policy

    May 12, 2022
  • Updating VMware ESXi Host from the Command Line

    May 11, 2022
  • Enable or Disable MFA for Users in Azure/Microsoft 365

    April 27, 2022
  • Fix: You’ll Need a New App to Open This Windows Defender Link

    April 27, 2022
  • How to Reset an Active Directory User Password with PowerShell and ADUC?

    April 27, 2022
  • How to Completely Uninstall Previous Versions of Office with Removal Scripts?

    April 26, 2022

Follow us

woshub.com

ad

  • 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
  • Install and Configure SNMP on RHEL/CentOS/Fedor
  • Hyper-V Boot Error: The Image’s Hash and Certificate Are not Allowed
Footer Logo

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


Back To Top