:: Guest shell and iPerf3

Now I dive into one of the options to what extend guest shell can be used.

Let’s try iPerf3 for some speed and load testing.

For the starting point, I assume you have the following:

  • Configured Guest shell
  • Enabled Guest shell
  • Provided Internet access from Guest shell
  • Enabled communication between the guest shells

Please check my previous post about configuring and using the guest shell.

:: Install iPerf3

We install Iperf3 on both devices. Installation is similar, so I only show the install from TestMonkey.

TestMonkey#guestshell 
[guestshell@guestshell ~]$ 
[guestshell@guestshell ~]$ 
[guestshell@guestshell ~]$ 
[guestshell@guestshell ~]$ 
[guestshell@guestshell ~]$ 
[guestshell@guestshell ~]$ sudo yum install iperf3
CentOS-8 - AppStream                            3.1 MB/s | 8.9 MB     00:02    
CentOS-8 - Base                                 3.6 MB/s | 7.4 MB     00:02    
CentOS-8 - Extras                                20 kB/s |  10 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64  3.1 MB/s |  10 MB     00:03    
Dependencies resolved.
================================================================================
 Package             Architecture  Version               Repository        Size
================================================================================
Installing:
 iperf3              x86_64        3.5-6.el8             AppStream        100 k
Installing dependencies:
 lksctp-tools        x86_64        1.0.18-3.el8          BaseOS           100 k

Transaction Summary
================================================================================
Install  2 Packages

Total download size: 200 k
Installed size: 481 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): lksctp-tools-1.0.18-3.el8.x86_64.rpm     594 kB/s | 100 kB     00:00    
(2/2): iperf3-3.5-6.el8.x86_64.rpm              568 kB/s | 100 kB     00:00    
--------------------------------------------------------------------------------
Total                                           319 kB/s | 200 kB     00:00     
warning: /var/cache/dnf/AppStream-a520ed22b0a8a736/packages/iperf3-3.5-6.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - AppStream                            1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <security@centos.org>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : lksctp-tools-1.0.18-3.el8.x86_64                       1/2 
  Running scriptlet: lksctp-tools-1.0.18-3.el8.x86_64                       1/2 
  Installing       : iperf3-3.5-6.el8.x86_64                                2/2 
  Running scriptlet: iperf3-3.5-6.el8.x86_64                                2/2 
  Verifying        : iperf3-3.5-6.el8.x86_64                                1/2 
  Verifying        : lksctp-tools-1.0.18-3.el8.x86_64                       2/2 

Installed:
  iperf3-3.5-6.el8.x86_64            lksctp-tools-1.0.18-3.el8.x86_64           

Complete!
[guestshell@guestshell ~]$ iperf3 -v
iperf 3.5 (cJSON 1.5.2)
Linux guestshell 4.19.157 #1 SMP Wed Feb 10 10:15:44 UTC 2021 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, SCTP, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, authentication
[guestshell@guestshell ~]$ 

:: Run iPerf3

Before we continue, please note that you need to enable communications between both Guest shells. So 192.168.30.10 needs to communicate to 192.168.30.12 and vice versa.

Installing some static host routes will do the trick.

  • BunnyRabbit acts as a server
  • TestMonkey is the client

On BunnyRabbit:

[guestshell@guestshell ~]$ iperf3 -s -p 7575
-----------------------------------------------------------
Server listening on 7575
-----------------------------------------------------------

Note: services will be bind on guestip-address: 192.168.30.12

On TestMonkey:

[guestshell@guestshell ~]$ iperf3 -c 192.168.30.12 -p 8000
Connecting to host 192.168.30.12, port 8000
[  5] local 192.168.30.10 port 50100 connected to 192.168.30.12 port 8000
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   390 KBytes  3.20 Mbits/sec    0   39.6 KBytes       
[  5]   1.00-2.00   sec  90.5 KBytes   741 Kbits/sec    0   45.2 KBytes       
[  5]   2.00-3.00   sec   100 KBytes   822 Kbits/sec    0   52.3 KBytes       
[  5]   3.00-4.00   sec   110 KBytes   903 Kbits/sec    0   59.4 KBytes       
[  5]   4.00-5.00   sec   447 KBytes  3.66 Mbits/sec    0   82.0 KBytes       
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec    0    117 KBytes       
[  5]   6.00-7.00   sec   509 KBytes  4.17 Mbits/sec    0    165 KBytes       
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec    0    225 KBytes       
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec    0    283 KBytes       
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec    0    341 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec  1.61 MBytes  1.35 Mbits/sec    0             sender
[  5]   0.00-12.97  sec  1.59 MBytes  1.03 Mbits/sec                  receiver

A nice and useful feature to test speed tests from device to device.

:: Resources