How to Use the Ping Command to Troubleshoot Network Issues

A quick little test you can perform

The ping command is one of the most helpfulnetwork diagnostictools at your disposal. It’s useful for finding problems both on your local network and on the wider internet. Let’s look at what the ping command does and how to use it.

What Does It Mean to Ping Something?

To “ping” something on a network means that you send an internet packet to a destination computer or other network device, asking for a response. That device then sends a packet back to you.

When the packet comes back (if it makes it back, that is) you can learn all sorts of interesting things about the network between yourself and the destination.

Most commonly, we simply want to know how long the reply takes. So when someone mentions the “ping” of (for example) a website, it’s usually expressed in milliseconds, with a lower number being better in general.

What Is an Internet Packet?

To better understand ping, you need to know a little about the packet you’re sending to the target computer or network device as a “ping.”

Packets are the fundamental units of themodern internet. When you send someone data, like a photo, it gets broken up into tiny pieces. Each packet is marked with a source and destination address and then sent off into the internet. These packets pass through many other computers, such as web servers and internet routers. Packets keep getting passed along until they reach the target system.

What You Can Use Ping For

The ping command has two primary uses:

Even if your ping reaches its destination and you get a reply, the ping response will tell you how long a packet took to return and how many packets have been lost. You can use the ping command to diagnose if the connection is too slow or unreliable.

What sorts of things can you ping?

How to Use Ping on Windows

Using ping is easy. You run it from the Command Prompt orPowerShell, but we’re using the Command Prompt in this example:

We’ve used Google.com as an example below.

Once initiated, ping will send four packets of data.

A message for any packets that says “request timed out” implies that your computer did not receive a reply from the target. If some packets are lost, some of the routing paths between your computer and the target have an issue.

There are quite a few command switches you can use with the ping command. Switches are extra options to customize how the ping command functions. If you want to see a complete list of options, all you have to do is typeping /helpat the Command Prompt and pressEnter. You’ll see the whole list as well as the syntax and usage.

Below is a list of a few command switches that are of use to most users:

How to Use Ping on macOS

For Mac users, you have to user Terminal. Previous versions of macOS included Network Utility, which was a graphical utility that you could use to run network commands like ping.

However, the latest versions have deprecated that utility in favor of Terminal. It’s not as intuitive to use, but it’s still fairly straight-forward. First, open Terminal by opening Spotlight (Command+Spacebar) and typing interminal.

To start a ping, just type the command as was shown in Windows:pingfollowed by the IP address or URL of the website, i.e.ping www.google.com.

The main difference you’ll notice between using ping on Windows and Mac is that on macOS it just keeps going until you manually stop it. To stop pinging the device or URL, pressCtrl+C. That will bring you back to the main prompt.

To see a list of all of the parameters you can use for ping on macOS, you can typeman pingand get the help pages. There are a lot of switches, so take your time playing around with the different options.

To get out of the man page, you have to simply press theqkey on your keyboard. This will quit the man page and take you back to the prompt.

The ping command is very versatile and is often the fastest way to figure out where the problem is on a network. We strongly recommend that you check outThe Best Windows Command Line Network Commandsfor essential network diagnostic commands.

Sydney Butler is a social scientist and technology fanatic who tries to understand how people and technology coexist. He has two decades of experience as a freelance computer technician and more than a decade as a technologies researcher and instructor. Sydney has been a professional technology writer for more than five years and covers topics such as VR, Gaming, Cyber security and Transhumanism.Read Sydney’s Full Bio

Leave a Reply

Your email address will not be published.Required fields are marked*

Comment*

Name*

Email*

Website

Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.

HomeAbout UsEditorial StandardsContact UsTerms of Use

Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved