Network Troubleshooting Basics: The Ping Command

This is pretty basic indeed, but I’m sure that there are plenty of people out there who could learn something from it …

This article is the first in a series delving into the basics of network troubleshooting. It covers what tools to use and how to use them. While this is a basic tutorial, there are some advanced tips and topics included. The focus will be on Windows based systems (with a tip or two for others).


Knowing the basics of network troubleshoot can help you find out where problems are. It could be your computer, your home router, your ISP (Internet Service Provided), the website itself, or something in between. First each tool will be looked at individually and then the process with be explained. The tools used will be the commands ping, ipconfig, and tracert. The process that will be covered is one of the most basic ones.

  • Step 1: Ping yourself with the loopback address.
  • Step 2: Ping the router (default gateway) and how to get that address (ipconfig).
  • Step 3: Ping or tracert outside the network (e.g. the Internet).

The Ping Command Basics

The ping command got its name from the sound sonar makes when it “sees” something. In sonar, you send out a signal and measure the time it takes to get there. The ping command does the same thing. This tells if a computer or device is out there or not, which is the purpose of the command.

To use the ping command, you type “ping” followed by an IP number or a website name. It will show you if a destination is reachable and how long it takes to get there. It will work in Windows from the Dos Box, Linux from the terminal, and Mac from the terminal (or the Network Utility).

Click on the “Start” button > “run” > and type in “cmd” & enter to bring up the command line.

Type in ping and hit enter (there is a space between the two g’s).

ping website

The Loop-Back Address

Step 1 in the process is to ping yourself. To do that, we use the loop-back address. This is a special IP number,, and is useful in checking your own computer. When you ping this IP number, you ping your computer to test if the system is working. It is an internal process. If this does not work, you know the problem is in your computer. In this case, you may simply need to reboot the machine, but it could be a more serious issue.

Type in ping and hit enter (there is a space between the “g” and the “1″).

ping loop-back

Exceptions to the Rule

When it comes to websites and servers, not all of them will let you ping them. For example, Microsoft’s website will not show up if you ping it, but Google will. These sites, while working, will give you a “Request timed out.” error message.

ping request timed out

How can a website show up on your browser and not on the ping command? The Internet works using a system of standard instructions called protocols, TCP in a website’s case. The ping command works with another protocol called ICMP. The main use for ICMP is to test connections and find out where a problem is. It is supposed to send back information to the sender letting them know if the message was received. If you turn off ICMP, then ping will not work. A firewall is usually used to do this.

In school, when we tried to ping classmates; this was a problem. With the firewall on, we could not ping each other until we turned it off. That is not something you should do at home, but it can explain why you cannot ping a computer on your home network. If you do decide to try out something that requires turning off your firewall (not recommended), unplug your router from the Internet and do not plug it back in until your firewall is running again.

Ping Command Options

The ping command will try to reach site four times by default. Personally, I think twice is enough. You can limit the number of times by using some switches. Switches are extra text you include with a command to tweak what it does.

  • In MS Windows, use ping -n 2 destination
  • In Linux, use ping -c 2 destination
  • On a Mac, use ping -c 2 destination

Some people think once or thrice is enough, so feel fee to swap that 2 for a 1 or a 3. There are more options too, but this is what I find useful. You can always type “ping” by itself to see all the options (in dos, ping /? works too). Tip: If you are using Linux, and the ping command just keeps going, use ctrl+z to stop it.


The first step is to ping yourself. The next step is to ping your router. To do that you need to know how to use the ipconfig command, which will be covered in the next article.

© Ryan D. Lang for gHacks Technology News | Latest Tech News, Software And Tutorials, 2011. |
Permalink |
Add to,

Post tags: , , ,

Link to Original Content

Tags: , , ,

Comments are closed.