A ping, according to the dictionary, is a sharp, high-pitched, and somewhat musical tone. You might associate it with the sound you hear when you tap a spoon against a crystal glass. In the IT world, it has a very different meaning.
In this article, we will explain the basic concept of Ping, how the Ping utility works, and how it is utilized in the context of networking and network monitoring.
A ping is a Command Prompt command that can be used to test a connection between one computer and another. Think of it in terms of sonar on a submarine. You’ve probably seen in the movies when the “ping” in the background as an audible signal is sent out to check a sub’s surroundings. When the ping strikes a nearby object, it will echo back. Operators can determine an object’s distance by the length of time it takes to return the echo.
A ping is used to verify connectivity at an IP-level to a second TCP/IP device. It does this by transmitting Internet Control Message Protocol (ICMP) Echo Request messages and waits for a return message. Unless modified, the ping command will send 4 requests by default in Windows. How many responses get returned and how long it takes for the round-trip provide important information, such as:
The ping is initiated several times to test consistency in the connection. Here's what a successful ping request would return when connecting to a router.
If you’re ever run a speed test on your computer or network, you’ve used the ping command whether you knew it or not. You’re bouncing a message off a remote server and testing the amount of time it takes to return.
Pings are useful for a variety of reasons, including troubleshooting connectivity, devices, and networks.
Ping is used to troubleshoot connectivity. Most commonly, it’s used to verify the connection between two machines. You might use ping to test a network printer or copier connection to determine whether a device is offline or to verify you can connect to a router. If you’re having trouble with an application hosted over a network on a server, one of the first things you want to do is check the connection using a series of ping commands to help you narrow down the problem. If a ping comes back with fast response times, your connection is good so the problem likely lies with the server or application.
You can also ping websites to see if they are operating and whether there’s a problem with the connection.
Almost any network-connected device will respond to a ping which makes it incredibly valuable to check networking connections. Ping can be used to test routers or servers for throughput and speed. You can also ping across a range of addresses to find each attached device in a particular range. You can test computer names and addresses of computers. When you can ping an IP address, but not a computer name, there’s likely a name resolution issue.
If a ping comes back showing a successful connection but has long response times, you’re likely facing a routing, congestion, or networking issue.
A ping command can be run manually or automated as a scheduled task for monitor network reliability. When a ping fails, there’s a problem.
If the ping command does not get a response from the host, you will see either nothing returned or get a timeout notification. Since it's sending 4 requests, you'll likely see four time out notices.
The Ping command allows you to add modifiers or parameters (also called switches) to customize the command for troubleshooting. Here is a list of the commands and the proper syntax in which to use them for Windows, although you will find slight variations for Unix.
The order in which you use these switches is important. Here’s is the proper syntax to use:
ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [-w timeout] [-R] [-S srcaddr] [-p] [-4] [-6] target [/?]
Get our latest blog posts delivered in a weekly email.