Testing network connectivity with the ping command on a Mac
search cancel

Testing network connectivity with the ping command on a Mac

book

Article ID: 343512

calendar_today

Updated On:

Products

VMware Desktop Hypervisor

Issue/Introduction

For troubleshooting purposes, it may be necessary to test network connectivity between different components of your network or between the Mac and the virtual machine. This article provides you with the steps to perform a preliminary test on your network from your Mac.

Environment

VMware Fusion Pro 10.x
VMware Fusion Pro 11.x
VMware Fusion 8.x
VMware Fusion 10.x
VMware Fusion 11.x
VMware Fusion Pro 8.x
VMware Fusion Pro 12.x

Resolution

The command ping is used to test whether your computer can communicate with another device (computer/server/printer) connected to your network or the internet.
 
To initiate a ping test in Mac OS X:
 
  1. Open Terminal by navigating to /Applications/Utilities.
  2. In the Terminal window type ping <server> , where <server> is the hostname or IP address of the server that you want to ping. The command should look like this:
     
    ping www.vmware.com

    or

    ping 192.168.x.x
     
  3. Press Enter.

    A successful ping response is similar to the following:
    [root@server]$ ping myservername
    PING myservername (10.0.0.1) 56(84) bytes of data.
    64 bytes from myservername (10.0.0.1): icmp_seq=0 ttl=64 time=0.025 ms
    64 bytes from myservername (10.0.0.1): icmp_seq=1 ttl=64 time=0.029 ms
    64 bytes from myservername (10.0.0.1): icmp_seq=2 ttl=64 time=0.032 ms
    64 bytes from myservername (10.0.0.1): 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]$
     
    The successful response has a few notable elements:
    • repeating lines showing that bytes were sent, and the time the trip took (in milliseconds (ms)).
    • Statistics that the packets transmitted were also received, with minimal to no packet loss

    NOTE: The default ping count in Mac OS X is not set. However, if you want to change its default count to set number, use the command below.

    ping -c [count]<space>[IP address or Hostname]


    An unsuccessful ping response is similar to the following:
    [root@server]$ ping myservername
    PING myservername (10.0.0.1) 56(84) bytes of data.
    --- server ping statistics ---
    4 packets transmitted, 0 received, 100% packet loss, time 3017ms
    [root@server]$
     
    The unsuccessful response is determined by the following::
    • no response from the remote server, after sending the command
    • Statistics that no packets were transmitted were received, with complete packet loss
  4. To stop the ping, after seeing enough results, press Ctrl + C.
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 instead allows you to determine if the problem is a result of an issue with hostname resolution.


Additional Information

For more information on ping, hostname resolution, and network connectivity, see Operating system networking references and tutorials (1010144).