iprf is an open-source command line tool designed to test network throughput between two network hosts. iPerf allows to generate TCP and UDP traffic (load) between two hosts. You can use iPerf to quickly measure maximum network bandwidth (throughput) between servers and clients, and stress test ISP links, routers, network gateways (firewalls), your Ethernet, or Wi-Fi network performance. can.
In this article, we will show you how to install and use it iperf Tools to test network speed (throughput) windows. Linux And VMware ESXi (There are iPerf versions for Android, macOS, RouterOS from MikroTik, and other platforms).
iprf Is a cross-platform tool and does not require installation in Windows. Simply download the executable and run it on two devices, the network throughput between which needs to be tested. IPerf works in client-server mode. On the first device, iPerf starts in server mode (it is waiting for traffic from the iPerf client). On the second computer, iPerf starts in client mode, generates TCP or UDP traffic, and measures the maximum data transfer rate.
In most cases, iPerf3 The version is now used (it supports high-speed UDP testing, TCP/UDP port 5201 is used by default).
How to Install and Use iPerf on Windows?
you can download iPerf 3.1.3 for windows by following link https://iperf.fr/iperf-download.php, if you want to use iperf 2.0, You can get it here. You do not need to install iPerf on Windows, it is enough to download the iPerf archive and extract it to the local directory on the drive. There are only two files in the archive: cygwin1.dll
And iperf3.exe
,
$iPerfZip = "https://iperf.fr/download/windows/iperf-3.1.3-win64.zip"
$TargetFolder = Join-Path $env:TEMP "iperf.zip"$iPerfPath = Join-Path $env:TEMP "iperf"
if (!(Test-Path $iPerfPath))
{ Invoke-WebRequest -Uri $iPerfZip -OutFile $TargetFolder
Expand-Archive -Path $TargetFolder -DestinationPath $iPerfPath
}
Iperf is a console tool and you need to run it in command line. Open a command prompt (cmd.exe) and go to the directory with the utility. For example:
cd c:\tools\iperf
If you run the iperf3.exe program without the parameters, it will list the available options.
The iPerf utility can run in server mode (-s
option) or client mode (-c
) If you are running iPerf Server on Windows, you must open the inbound port 5201 for the TCP and UDP protocols. You can open the port with the Windows Defender Firewall GUI or with a PowerShell command. Create and enable firewall rule like this:
New-NetFirewallRule -DisplayName 'iPerf-Server-Inbound-TCP' -Direction Inbound -Protocol TCP -LocalPort 5201 -Action Allow | Enable-NetFirewallRule
New-NetFirewallRule -DisplayName 'iPerf-Server-Inbound-UDP' -Direction Inbound -Protocol UDP -LocalPort 5201 -Action Allow | Enable-NetFirewallRule
There are several iPerf GUI implementations for Windows. For example, iperf3-cygwin-gui either JPRF,
jperf is written on Java (in order to run jperf, the Java VM must be installed on the computer). In addition to the graphical form for the CLI interface, jPrf can generate real-time graph bandwidth charts of communication channel loads. To use it, simply specify the iPerf server address and start the network throughput test.
Install-Module -Name iPerfAutomate
Installing iPerf on Linux
On CentOS/RHEL/Fedora/Rocky Linux/Oracle Linux 8, the iperf3 package is available in the base appstream 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/Mint distros you can install iperf3 with the command:
$ sudo apt install iperf3
If you want to use your Linux host as an iperf3 server, you need to open TCP/UDP port 5201 in the firewall (or iptables):
# firewall-cmd --permanent --add-port=5201/udp
# firewall-cmd --permanent --add-port=5201/tcp
# firewall-cmd --reload
Using iPerf on VMware ESXi
VMware removed the iPerf tool in ESXi 6.7 but brought it back in 6.7U1. Make sure iPerf is installed on your ESXi host. Connect to ESXi console via SSH, go to /usr/lib/vmware/vsan/bin directory and check if it contains iperf or iperf3 binary file.
If iPerf is not installed, you can manually download the iperf offline bundle from here (http://vibsdepot.v-front.de/depot/bundles/iperf-2.0.5-1-offline_bundle.zip) copy it to the ESXi host and install with the command:
# esxcli software vib install -d /iperf-2.0.5-1-offline_bundle.zip –no-sig-check
The tool will be installed in the /opt/iperf/bin directory. Use the following command to run iPerf on VMware ESXi:
# /opt/iperf/bin/iperf3
If you are running iPerf Server on ESXi host, you need to open port 5201. This port is disabled by default in the ESXi firewall. To open them, you can temporarily disable the ESXi Firewall:
# esxcli network firewall get
# esxcli network firewall set --enabled=false
# esxcli network firewall set --enabled true
When running iPerf on ESXi, it needs to be bound to the vmkernel interface:
# esxcli network ip interface ipv4 get
# vmkping IP_address
Run iPerf on the vmkernel IP address:
# iperf -s -B 192.168.31.50
Use iPerf Tool to Test Network Speed/Bandwidth
Let’s now look at some examples of using iPerf to test network throughput. In this example, we will be using a Linux host as the iperf server. Let’s run iperf in server mode:
# iperf3 –s
The iPerf server is running, it is waiting for a connection on TCP port 5201.
Server listening on 5201.
prompt, iPerf arguments are case sensitive!
# iperf3 -s -w 32768 –p 5200
- -w 32768 – Change the TCP windows size to 32KB (by default it’s about 8KB);
- -p 5200 – The port on which iPerf is waiting for a connection (note that by default iperf2 listens on port 5001 and iperf3 listens on port 5201).
You can run iPerf Server as a Windows service by using the -D argument.
I am using a computer with Windows 10 as an iPerf client. Open Command Prompt and change to the directory with the iPerf executable:cd c:\tools\iperf
To run a network bandwidth test from a client, specify the iPerf server address (or DNS name):iperf3.exe -c 192.168.1.200
The client will begin to generate network traffic, test the connection for 10 seconds, and display the following table of results.
- Interval – test interval (in seconds);
- transfer – the size of the transferred data;
- bandwidth – Average data transfer rate.
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 -i 5 -f g
- -c 192.168.1.200 – IP address of the iPerf server;
- -w 32768 – Increase the size of the TCP window;
- -t 30 – test duration in seconds (10 seconds by default);
- -p8 – is the number of parallel threads to achieve the maximum channel load;
- -i 5 – Display iPerf stats every 5 seconds. the parameter is convenient to use for long tests (several minutes, hours);
- FM – Display result in Mbps. Here you can use the kmgKMG value (kilobit, megabit, megabyte, gigabit, etc.).
In my example, the test lasted 30 seconds. In the final report, we are interested in the values of bandwidth last listed column [SUM] Line. It shows the average speed of sending and receiving data over the network. In our case, the average network bandwidth between two hosts is 85.9 Mbit/s, 307 MB data has been transferred (transfer column) with symmetrical motion (sender = receiver).
You can run iPerf in reverse mode (the server sends the data, and the client receives it). Use -R Option on the customer for this.
By default, iPerf generates TCP traffic, if you need to check your network bandwidth for UDP packets, you should use -u alternative. 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 available) Here,
iperf3 -c iperf.scottlinux.com
Note that the iPerf3 server only accepts a single client connection simultaneously (multiple client tests are allowed in iPerf2). If the iPerf server is currently serving client connections, you will receive an error: iperf3: error – The server is busy running a test. try again later,
If you need to measure the maximum network speed in both directions (in duplex mode), use -D Customer option:
iperf3.exe -c IP -P 8 -t 30 -w 32768 –d
When running network tests using iPerf, you can monitor your network connection throughput charts through Task Manager.
It is important to note that, during testing, iPerf uses All Available bandwidth of the communication channel between client and server, which can negatively affect productive apps and users.
You can display the full list of options as follows:
iperf3 –help
iperf It is an easy-to-use and easy-to-use network tool that helps you measure network connection performance and maximum data transfer speed between two devices.
Leave a Comment