Preparation:
- Note: iperf3 is already included in ESXi; no need to download it from the iperf website.
- Enable ESXi Shell and SSH on both hosts.
Steps for Each Host:
- Disable the ESXi Firewall (only during the test period) using the command:
esxcli network firewall set --enabled false
- Enable iperf3 Execution by disabling application domain security policies:
localcli system secpolicy domain set -n appDom -l disabled
- Navigate to the iperf3 location where the executable is stored.
cd /usr/lib/vmware/vsan/bin
Testing:
- On Host 1 (acting as the server), run:
./iperf3 -s
- On Host 2 (acting as the client), connect to Host 1 by specifying its IP address (replace
10.1.0.21
with the actual server IP):
./iperf3 -c 10.1.0.21 -P 2 -w 10M -l 1M
Here,-P 2
sets up 2 parallel connections. Adjust the number of connections by changing the value of-P
(e.g.,-P 6
,-P 8
,-P 20
).-w 10M
sets the TCP window size to 10 MB, and-l 1M
sets the buffer length to 1 MB per I/O operation.
Final Steps:
- After testing, re-enable the ESXi firewall on both hosts:
esxcli network firewall set --enabled true
- Re-enable security policies if necessary.
This guide will help you test network bandwidth between two ESXi hosts effectively using iperf3. Remember to restore the original security settings after completing your tests to maintain the security of your hosts.