A simple quick post this Friday, for people willing to quickly test network connectivity by using the vmkping command. If you're new to VMware vSphere, you might be not aware of vmkping command or do not know exactly what's the purpose and use cases.
VMKping command is useful when testing network connectivity for vmkernel adapters, used for iscsi, vsan, vmotion, management etc. Also, when having jumbo frames activated within your storage network.
Jumbo frames reduce the CPU load caused by transferring data. Enable jumbo frames on a VMkernel network interface by changing the maximum transmission units (MTU) of the VMkernel interface.
The vmkping command will, by default, use any path to reach the destination IP. By specifying an additional parameter we can send out a ping command via a specific vmkernel port. We'll show that option in a minute.
Test Network Connectivity with a vmkping command – The steps:
Step 1: Connect to your ESXi host via SSH.
Step 2: use this command. In the command shell, run this command:
is the hostname or IP address of the remote server's vmkernel network interface that you want to ping.
If you have Jumbo Frames configured in your environment, run the vmkping command with the -s and -d options.
vmkping -d -s 8972 x.x.x.x
In order to specify the vmkernel port which you want to use, you must first have a look for more details. You must know which vmkernel port you want to test. You can check the detail through the command line as well.
First, run this command to list all available adapters:
See the output below.
Then only select the one which you want to test and enter:
So here is the option to specify which vmkernel port to use for outgoing ICMP traffic with the -I option:
vmkping -I vmkX x.x.x.x
vmkping -I vmk1 10.10.5.11
would test a remote host connectivity via vmk1 vmkernel port.
It's actually quite old news, as it is possible since vSphere 5.1, the vmkping command can also specify a VMkernal port to be used for testing with.
Tip: To display the host's vmkernel routing table, use the esxcfg-route -l command.
Hope it will help someone.
A while back, I have also published some other networking command posts. You might be interested in those as well.
- ESXi Commands List – networking commands
- ESXi Commands List – networking commands [Part 2]
- ESXi Commands List – Getting started
- Basic VMware ESX CLI networking commands
Well, this is it. Hope you've learned something. Stay tuned for more tips and tutorials.
More from ESX Virtualization
- What is VMware vMotion?
- VCP6.5-DCV Objective 7.1 – Troubleshoot vCenter Server and ESXi Hosts
- Free Tools VMware