How to do the ESXi VMkernel PING: Unknown interface: Invalid argument

Over the years one of my favourite tool when troubleshooting network problems in the vSphere world was vmkping. It allows us to send an ICMP request based on a specified VMkernel port (perfect for troubleshooting vMotion/vXLAN problems).

With ESXCLI NETWORK DIAG PING a nice wrapper for the ping tool was implemented into the ESXCLI namespaces, so that we can use this command remote via vCLI oder even through the PowerCLI cmdlet.

Unfortunately in vSphere 6.0 the command doesn’t work anymore as it has been before (in case that you do NOT use the default networking stack). VXLAN, vMotion and Provisioning traffic can now be configured to use a seperate tcp/ip stack (dedicated routing/arp tables).

Once you use such a non-default-VMkernel port via ping or the according ESXCLI command you receive the following error:

Unknown interface ‘vmkX’: Invalid argument

Invalid Argument

To make it work again make sure to specify the networking stack.

esxcli network diag ping -I vmk2 –netstack=vmotion -H

VMkping suc

Take care since the stack parameter requires a case-sensitive input?

esxcli network diag ping -I vmk2 –netstack=vMotion -H

leads to

Got no data from process:
/bin/ping ++netstack=vMotion -S vMotion -I vmk2 -X

so better use the correct value out of the following command return:

esxcli network ip netstack list



vxlan / vmotion or skip the entry for defaultTcpipStack

If you don’t like the ESXCLI method, just use the -S parameter in the good old vmkping