LEARN – Testing multiple non-routable IPs using VMKping

LEARN – Testing multiple non-routable IPs using VMKping
October 22, 2021 No Comments Uncategorized neudorfer

An issue I’ve run into multiple times is duplicate IP addresses on VMKernals. This becomes a bigger issue when the IP address that is taken is from a Filer that also hosts other storage. When you have two devices fighting over traffic like that it can take down the device. To mitigate that issue we’ve included steps in our change control process to check every IP you plan on using on a VMKernel before you use it. This can get tedious if you have multiple new hosts you need to check IPs for. 

I’m sure this may have been obvious for any experienced Linux user but I had to go out and discover it for myself. You wrap a vmkping command, which is used to ping over a specified vmkernel (vmk3 in this example), in a for loop. This example will ping the IP range x.x.x.1 through x.x.x.255. You’ll need to change VMK3 to the name of your vmkernel and x.x.x will need to be changed to the first three octets of your network.

for ip in $(seq 1 255); do vmkping -c 1 -I vmk3 x.x.x.$ip; done

This will output. 

About The Author