How To Use The Ping Command

Ping Command Overview

pc toolkit iconThe Ping command is an extremely useful command line utility that can help you determine whether or not a particular network resource is responding on a network.

Examples of network resources include desktop & laptop computers, printers, Xbox & Playstation 3 game systems, Cisco IP phones, Tandberg video conference units, projectors, websites of course, and even some household home appliances.

By using the Ping command utility you can easily confirm that your computer can communicate with other network resources. If pinging a resource is unsuccessful this could be an indication of cable or network card issues, problems with a hub, switch, router, etc.

On top of this the Ping command tool is a great way to verify that you can correctly communicate with a resource via its DNS name. If you cannot ping something by its DNS name but you can by its IP address, this could indicate a problem with DNS on a server, router, local workstation, etc.

DNS Preview

DNS is the piece of network pie that pretty much catalogs what device name is paired with what IP address.

Without DNS you would for example have to access Google by typing its equivalent IP address like

To learn more about DNS visit us again for we have an article on the way.

As you see, Ping is a tool of the trade for any Information Technology individual. We hope you enjoy our how to guide and video introduction.

How to access and use the ping command:

  • Click the start button and then run
  • Type CMD in the run box and then hit enter on your keyboard.  In Windows Vista type CMD in the search box and hit enter.
  • Once you are in the command prompt type Ping followed by the network resources DNS name or IP Address just like the examples below.

Ping Command Usage Examples:


Allows you to ping a computer or other network resource via an IP address.  The x’s represent IP address numbers.  For example is a common IP address used by Linksys routers.


Allows you to ping a network resource via its DNS name instead of an IP address.  If you cannot ping a resource by its DNS name try its IP address instead for this could indicate a problem with DNS if you can successfully ping it via its IP number but not its DNS name.  If that is the case check DNS settings.

ping localhost

Pings your local computer.  This is useful if you want to verify that your computer is able to send information out and receive information in return.  Take note that pinging your local host computer does not send information over a network; however it can verify that your network card is being seen.

Successful ping using DNS name or IP Address:

Result of output using Google as an example:  In the below example our test computer successfully pinged  This also verified that DNS is functional because we used its DNS name.  Try the same ping command below using and it will also work. 


Pinging [] with 32 bytes of data:
Reply from bytes=32 time=16ms TTL=247
Reply from bytes=32 time=17ms TTL=247
Reply from bytes=32 time=17ms TTL=247
Reply from bytes=32 time=17ms TTL=247

Ping statistics for
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 16ms, Maximum = 17ms, Average = 16ms

Unsuccessful ping using DNS name:

In this example there is a DNS error for settings are incorrect.  We were not able to ping Google via its DNS name.  We specifically messed up DNS for this example but in the real world if you have a problem with incorrect DNS settings you will see the same.  As you see ping is a very useful way to troubleshoot DNS too.

Ping request could not find host Please check the name and try again.

Ping Command Options/Switches:


ping     [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name


    -t                  Ping the specified host until stopped.
                        To see statistics and continue - type Control-Break;
                        To stop - type Control-C.
    -a                 Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size           Send buffer size.
    -f                  Set Don't Fragment flag in packet (IPv4-only).
    -i TTL            Time To Live.
    -v TOS          Type Of Service (IPv4-only).
    -r count         Record route for count hops (IPv4-only).
    -s count        Timestamp for count hops (IPv4-only).
    -j host-list     Loose source route along host-list (IPv4-only).
    -k host-list    Strict source route along host-list (IPv4-only).
    -w timeout    Timeout in milliseconds to wait for each reply.
    -R                  Use routing header to test reverse route also (IPv6-only).
    -S srcaddr     Source address to use.
    -4                  Force using IPv4.
    -6                  Force using IPv6.

See also:

Return from Ping Command to Home Page

Contact us