Cyberithub

Install iperf and Perform Network throughput Test in Linux(RHEL/CentOS 7/8) in 5 Easy Steps

Advertisements

In this article, I will take you through the steps to Install iperf and perform network throughput test in Linux (RHEL/CentOS 7/8). In many occasions you might have observed that Organization want to test their Network performance to understand the bandwidth limit and troubleshooting other network issues both from Server as well as from Client side. iperf is one of the best tool in Linux suitable for this kind of tasks. To know more about other Network Troubleshooting tools you might want to check 10 Best Network Troubleshooting tools in Linux.

Install iperf and Perform Network throughput Test in Linux(RHEL/CentOS 7/8) in 5 Easy Steps 1

How to Install iperf and Perform Network throughput test in Linux

Also Read: 10 Useful swapon command examples in Linux (RedHat/CentOS 7/8)

Step 1: Prerequisites

a)You need to have a Running Linux (RHEL/CentOS 7/8) System.

b)You should have a user with sudo access.

c)You also need yum installed in your system. To know more about YUM you might want to check Top 22 YUM Command Examples in RedHat/CentOS 7

NOTE:

Please note that here I am using root user to run all the below commands.You can use any user with sudo access to run all these commands.For more information Please check Step by Step: How to Add User to Sudoers to provide sudo access to the User.

Step 2: Update Your System

First you need to update your system with the latest available updates using yum update -y command as shown below. This command will update all the installed packages with the latest updates. This is an important step which needs to be completed before going to install iperf tool in your system. You might want to check 15 Best Examples of locate command in Linux (RedHat/CentOS 7/8)

[root@localhost ~]# yum update -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 8.2 kB 00:00:00
* base: mirrors.piconets.webwerks.in
* epel: mirrors.aliyun.com
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package bind-export-libs.x86_64 32:9.11.4-16.P2.el7_8.2 will be updated
---> Package bind-export-libs.x86_64 32:9.11.4-16.P2.el7_8.3 will be an update
---> Package bind-libs-lite.x86_64 32:9.11.4-16.P2.el7_8.2 will be updated
---> Package bind-libs-lite.x86_64 32:9.11.4-16.P2.el7_8.3 will be an update
---> Package bind-license.noarch 32:9.11.4-16.P2.el7_8.2 will be updated
---> Package bind-license.noarch 32:9.11.4-16.P2.el7_8.3 will be an update
---> Package binutils.x86_64 0:2.27-43.base.el7 will be updated
---> Package binutils.x86_64 0:2.27-43.base.el7_8.1 will be an update
---> Package device-mapper.x86_64 7:1.02.164-7.el7_8.1 will be updated
---> Package device-mapper.x86_64 7:1.02.164-7.el7_8.2 will be an update
---> Package device-mapper-event.x86_64 7:1.02.164-7.el7_8.1 will be updated
---> Package device-mapper-event.x86_64 7:1.02.164-7.el7_8.2 will be an update
---> Package device-mapper-event-libs.x86_64 7:1.02.164-7.el7_8.1 will be updated
---> Package device-mapper-event-libs.x86_64 7:1.02.164-7.el7_8.2 will be an update
---> Package device-mapper-libs.x86_64 7:1.02.164-7.el7_8.1 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.164-7.el7_8.2 will be an update
---> Package kernel.x86_64 0:3.10.0-1127.8.2.el7 will be installed
---> Package kernel-tools.x86_64 0:3.10.0-1127.el7 will be updated

Step 3: Install iperf in Linux

After installing latest updates, you can install iperf command using yum install iperf command as shown below. You might want to check Top 12 Nmap Commands to Scan Remote Hosts with Best Practices.

[root@localhost ~]# yum install iperf -y
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink | 6.7 kB 00:00:00
* base: mirrors.piconets.webwerks.in
* epel: mirror.xeonbd.com
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/3): updates/7/x86_64/primary_db | 1.3 MB 00:00:00
(3/3): epel/x86_64/primary_db | 6.8 MB 00:00:01
Resolving Dependencies
--> Running transaction check
---> Package iperf.x86_64 0:2.0.13-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
iperf x86_64 2.0.13-1.el7 epel 86 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 86 k
Installed size: 185 k
Is this ok [y/d/N]: y
Downloading packages:
iperf-2.0.13-1.el7.x86_64.rpm | 86 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : iperf-2.0.13-1.el7.x86_64 1/1
Verifying : iperf-2.0.13-1.el7.x86_64 1/1

Installed:
iperf.x86_64 0:2.0.13-1.el7

Complete!

Step 4: Check iperf version

Once iperf is installed successfully, you can check iperf version using iperf -v command as shown below. You might want to check 30 Most Popular IPTAbles Command in Linux

[root@localhost ~]# iperf -v
iperf version 2.0.13 (21 Jan 2019) pthreads

Step 5: Perform Network throughput Test

If you want to test your network performance in Server mode by listening to a Port for Incoming connections then you need to use iperf -s -f K command as shown below. This command will start in Server mode and will listen to a free Port 5001 for Incoming connections.

[root@localhost ~]# iperf -s -f K
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.0.100 port 5001 connected with 192.168.0.100 port 54310 (peer 12857.11824.3338-unk)
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-64.9 sec 0.08 KBytes 0.00 KBytes/sec

-s : run in server mode. Check more on iperf Man Page.

-f : format to report: adaptive, bits, Bytes, Kbits, Mbits, Gbits, KBytes, MBytes, GBytes

 

 

 

Popular Recommendations:-

How to Cleanup Failed Actions from PCS Status of Cluster

How to Enable or Disable SELinux Temporarily or Permanently on RedHat/CentOS 7/8

10 Popular Examples of sudo command in Linux(RedHat/CentOS 7/8)

How to Install and Use telnet command in Linux (RedHat/Linux 7/8) using 5 Easy Steps

12 Most Popular rm command in Linux with Examples

Create a Self Signed Certificate using OpenSSL

25+ Popular Examples of Openssl commands in Linux (RedHat/CentOS 7/8)

Leave a Comment