The ping command sends packets of data to a specific IP address on a network, then lets the user know how long it took to transmit data and receive a response. It’s a convenient tool that can be used to quickly test various points of the network. This article will show you how to use the Ping command.
How Does Ping command work?
Ping originates from a term that is used in sonar technology, which sends out pulses of sound, then listens for the echo to return. On a computer network, a ping tool is in-built in most OS’s, it works more or less the same. You issue the command with a specific URL/IP address. The computer sends several packets of information out to that device, then it waits for a response. When the response is received, the ping tool will show you how long each packet took for the trip. OR. It will tell you there was no reply.
Does it sound simple? Yes, it is. It is simple and be used to good effect. You have the ability to test whether your computer can reach another device, for example, your router on your local network, or a device on the Internet. This can help you determine if a problem is on your local network, or somewhere beyond. The time taken by the packets to return can help in identifying a slow connection, or if you’re experiencing packet loss.
It pretty much doesn’t matter what OS is being used. Open a terminal/Command Prompt window, then use ping on macOS/Linux, or any version of Windows.
How can you Use Ping?
For this example, we will be using the Windows Command Prompt. However, you can use the ping command in Windows PowerShell, or the Terminal app on macOS or any Linux distro. Once you arrive at using the actual command, it works the same everywhere.
- In Windows, press Windows + R.
- In the Run window, enter “cmd” into the search box, then press the Enter key.
- At the prompt, type “ping” along with the URL/IP address you want to ping, then press the Enter key.
That response will show the URL you pinged; the IP address associated as well as the size of the packets being sent on the first line. The following four lines show the replies from each packet, including the time, which is indicated in milliseconds, it took for the response as well as the time-to-live (TTL) of the packet, which is the amount of time that must pass before the packet is dumped.
Towards the bottom, you will see a summary, it shows how many packets were sent and received, along with the minimum, maximum, and average response time. When the ping tool does not receive a response from the devices you pinged, it will let you know that.
That’s how to use ping at the most basic. By all means, like most commands, some advanced switches can be used to make it behave a tad bit differently. For example, you have the ability to keep pinging a destination until the command is stopped. You can specify the number of times you want it to ping. You can set how often it should ping, among many more. However, unless you’re doing particular types of troubleshooting; you won’t have to worry much about the advanced switches.
If you’re curious about them and want to take a sneak peek, type in “ping /?” at the Command Prompt, this will display a list.
What all can be done with Ping?
Now that we helped you understand how to use the command, we have listed down some interesting things you can do with Ping:
Ping a URL/IP address to check if you can reach an internet destination. If you receive a successful response, you understand that all the networking devices between you and the destination are working. This includes the network adapter in your computer, the router, along whatever devices exist on the internet between your router and the destination. If you’re interested in exploring the routes further, use the networking tool named tracert to do that.
You can Ping a URL to resolve its IP address. If you want to know the IP address of a particular URL, you can just ping the URL. The ping tool will show you at the top the IP address it’s working with.
You can Ping your router to know if you can reach it. If you cannot successfully ping an internet location, try pinging your router. A successful response will let you know that your local network is working fine. And that the problem reaching the internet location is out of your control.
You can Ping your loopback address (127.0.0.1). If you aren’t successful in pinging your router, even though, your router appears to be turned on and working, you can ping a loopback address. That address is always 127.0.0.1, pinging it successfully will let you know that the network adapter on your computer as well as the networking software in your OS is working as it’s supposed to.
Note: You might not get a ping response from other computers on your local network due to the built-in firewalls on those devices preventing them from responding to ping requests. If you want to be able to ping their devices, you have to turn off the setting to allow pings through the firewall.
Few people tend to work inside-out by pinging the loopback address first, then their router or a local device, then an internet address.
What we are talking about in this article is mostly regarding using ping to perform troubleshooting on a home or even on a small business network. If we were to talk about larger networks, there’s a lot more complexity to be taken into consideration.
If you liked this article (or if it helped at all), leave a comment below or share it with friends, so they can also know How can you Use the Ping Command to Test Your Network?
[…] also have the ability to perform an Undo action from a menu command in an app, for example, Edit > Undo in apps that have a traditional menu bar at the […]
[…] you want to enable the Administrator account, then using the command prompt is the quickest as well as the easiest […]