For troubleshooting purposes, it may be necessary to test network connectivity between different components of your network.
This article provides you with the steps to perform a ping test on your network from Windows, Linux, and ESX/ESXi hosts.
VMware vCenter Server
VMware vSphere ESXi
Windows OS
Linux OS
C:\>ping server
Pinging server with 32 bytes of data:
Reply from server: bytes=32 time<1ms TTL=64<br>Reply from server: bytes=32 time<1ms TTL=64<br>Reply from server: bytes=32 time<1ms TTL=64<br>Reply from server: bytes=32 time<1ms TTL=64 <br>
Ping statistics for server:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\>
C:\>ping server
Pinging server with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for server:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\>
Continuous Ping: To ping continuously until manually stopped, use: # ping <server> -t Stop the test with Ctrl + C.
Specify Packet Size: To send larger or smaller packets, use: # ping <server> -l <size> Replace <size>
with the desired packet size in bytes (e.g., 64, 1500).
Do Not Fragment: To test for maximum transmission unit (MTU) issues: # ping <server> -f -l <size>
[root@server]$ ping server
PING server (#.#.#.#) 56(84) bytes of data.
64 bytes from server (#.#.#.#): icmp_seq=0 ttl=64 time=0.025 ms
64 bytes from server (#.#.#.#): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from server (#.#.#.#): icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from server (#.#.#.#): icmp_seq=3 ttl=64 time=0.028 ms
--- server ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3092ms
rtt min/avg/max/mdev = 0.025/0.028/0.032/0.005 ms, pipe 2
[root@server]$
[root@server]$ ping server
PING server (#.#.#.#) 56(84) bytes of data.
--- server ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3017ms
[root@server]$
Specify Packet Size: To send larger or smaller packets, use: # ping <server> -s <size> - Replace <size>
with the desired packet size in bytes (e.g., 64, 1500).
Do Not Fragment: To test for maximum transmission unit (MTU) issues: # ping -M do -s <size> <server>
Specify Count of Packets: To send a specific number of packets: # ping -c <count> <server>
Specify Timeout: Stop after a specified time in seconds: # ping -w <time> <server>
Set Interval Between Pings: To specify the interval (in seconds): # ping -i <interval> <server>
[root@server]$ ping server
PING server (#.#.#.#) 56(84) bytes of data.
64 bytes from server (#.#.#.#): icmp_seq=0 ttl=64 time=0.025 ms
64 bytes from server (#.#.#.#): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from server (#.#.#.#): icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from server (#.#.#.#): icmp_seq=3 ttl=64 time=0.028 ms
--- server ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3092ms
rtt min/avg/max/mdev = 0.025/0.028/0.032/0.005 ms, pipe 2
[root@server]$
[root@server]$ ping server
PING server (#.#.#.#) 56(84) bytes of data.
--- server ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3017ms
[root@server]$
Specify Count of Packets: # ping -c <count> <server>
Set Packet Size: # ping -s <size> <server>
Specify Timeout: # ping -W <time> <server>
Note: If you do not see a response when pinging by the hostname of the server, initiate a ping to the IP address. Initiating a ping to the IP address allows you to determine if the problem is a result of an issue with hostname resolution.
Additionally, an ESXi host 'Management' network ping test can be performed to another ESXi host, the default gateway, or to the vCenter Server IP through the below command:
#vmkping -I vmk0 <Destination IP> -d -s 1472
- The above command is an example, which utilizes the assigned ESXi vmkernel networking stack, along with specifying the MTU (seen above as 1472, if 1500 MTU is configured) to test if communication is occurring to the destination IP, over a 1500MTU configured network.
- More information regarding using the vmkernel network to test connectivity, can be found here - https://knowledge.broadcom.com/external/article/344313/testing-vmkernel-network-connectivity-wi.html
For MTU testing, incrementally adjust packet sizes with the do not fragment flag to determine the largest supported packet size.