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
ShellSessionChange to the directory containing the iperf binary
cd /usr/lib/vmware/vsan/bin/
ShellSessionExecute iPerf as server
./iperf3.copy -s -B 10.11.6.171
ShellSessionOverview of the used parameters:
-s | will start iperf as server |
-B | defines the IP the iperf server will listen to |
Disable the firewall
esxcli network firewall set --enabled false
ShellSessionESXi host 2 (iperf client)
Change to the directory containing the iperf binary
cd /usr/lib/vmware/vsan/bin/
ShellSessionExecute iPerf as client
./iperf3.copy -i 1 -t 10 -c 10.11.6.171 -fm
ShellSessionOverview of the used parameters:
-i | will determine the interval of reporting back |
-t | time iperf will be running |
-c | client IP, will force the usage of the correct vmkernel interface |
-fm | defaults to kbit/s, adding m will use mbit/s |
Don’t forget to re-enable the firewall on both systems.
esxcli network firewall set –enabled true