Use iPerf to test NIC speed between two ESXi hosts

by Oct 26, 2020ESXi

Sometimes you want/need use iPerf to test the nic speed between two ESXi hosts. I did because I was seeing a NIC with low throughput in my lab.

How can we test raw speeds between the two hosts? iPerf comes to the rescue. I was looking on how to do this on an ESXi host. I doesn’t come as a surprise that I found the solution here at William Lams’ virtuallyghetto.com. Apparently iperf has been added to ESXi since 6.5 U2. You used to have to copy iperf to iperf.copy. In ESXi 7.0 that has been done for you, although you will need to look for /usr/lib/vmware/vsan/bin/iperf3.copy

ESXi host 1 (iperf server)

Disable the firewall:

esxcli network firewall set --enabled false
ShellSession

Change to the directory containing the iperf binary

cd /usr/lib/vmware/vsan/bin/
ShellSession

Execute iPerf as server

./iperf3.copy -s -B 10.11.6.171
ShellSession

Overview of the used parameters:

-swill start iperf as server
-Bdefines the IP the iperf server will listen to

Disable the firewall

esxcli network firewall set --enabled false
ShellSession

ESXi host 2 (iperf client)

Change to the directory containing the iperf binary

cd /usr/lib/vmware/vsan/bin/
ShellSession

Execute iPerf as client

./iperf3.copy -i 1 -t 10 -c 10.11.6.171 -fm
ShellSession

Overview of the used parameters:

-iwill determine the interval of reporting back
-ttime iperf will be running
-cclient IP, will force the usage of the correct vmkernel interface
-fmdefaults to kbit/s, adding m will use mbit/s