How to Ping a Computer or a Web Site

1
Ping a IP Address that Responds

Command Prompt - Ping - Responsive IP Address
Command Prompt - Ping - Responsive IP Address. Bradley Mitchell / About.com

Ping is a standard application found on most laptop and desktop computers. Apps that support ping can also be installed on smartphones and other mobile devices. Additionally, Web sites that support Internet speed test services often include ping as one of their features.

A ping utility sends test messages from the local client to a remote target over the TCP/IP network connection. The target can be a Web site, a computer, or any other device with an IP address. Besides determining whether the remote computer is currently online, ping also provides indicators of the general speed or reliability of network connections.

The examples on these pages illustrate the use of ping in Microsoft Windows; the same steps can be applied when using other ping applications.

Running Ping

Microsoft Windows, Mac OS X, and Linux provide command line ping programs that can be run from the operating system shell. Computers can be pinged by either IP address or by name.

To ping a computer by IP address,

  • open a shell prompt (in Microsoft Windows, the Command Prompt or MS-DOS Prompt on Start Menu)
  • type "ping" followed by a space and the IP address
  • press the Enter (or Return) key

Interpreting the Results of Ping

The graphic below illustrates a typical ping session when a device at the target IP address responds with no network errors:

  • Reply from: By default, Microsoft Windows ping sends a series of four messages to the address. The program outputs a confirmation line for each response message received from the target computer.
  • Bytes: Each ping request is 32 bytes in size by default
  • Time: Ping reports the amount of time (in milliseconds) between the sending of requests and receipt of responses
  • TTL (Time-to-Live): A value between 1 and 128, TTL can be used to count how many different networks the ping messages passed through before reaching the target computer. A value of 128 indicates the device is on the local network, with 0 other networks in between.

Running Ping Continuously

On some computers (particularly those running Linux), the standard ping program does not stop running after four request attempts but instead runs until the user ends it. That is useful for those wanting to monitor the status of a network connection over longer periods of time. In Microsoft Windows, type "ping -t" instead of "ping" at the command line to launch the program in this continuously running mode (and use the Control-C key sequence to stop it).

2
Ping a IP Address that Does Not Respond

Command Prompt - Ping - Unresponsive IP Address
Command Prompt - Ping - Unresponsive IP Address. Bradley Mitchell / About.com

In some cases, ping requests fail. This happens for any of several reasons:

  • the IP address specified by the ping program is invalid
  • the host system (device being used to send pings) is not connected to an IP network (i.e., does not have a working IP address)
  • no network device is connected to the target IP address
  • network congestion or errors in between the host and target are preventing messages from passing through (in one or both directions)

The graphic below illustrates a typical ping session when the program does not receive any responses from the target IP address. Each "Reply from" line takes several seconds to appear on the screen as the program waits and eventually times out. The IP address referenced in each reply line of the output is the address of the pinging (host) computer.

Intermittent Ping Responses

Though uncommon, it is possible for ping to report a response rate other than 0% (fully unresponsive) or 100% (fully responsive). This most often occurs when the target system is shutting down (as in the example shown) or starting up:

C:\> ping bwmitche-home1

Pinging bwmitche-home1 [192.168.0.8] with 32 bytes of data:

Reply from 192.168.0.8: bytes=32 time=

3
Ping a Web Site or Computer by Name

Command Prompt - Ping - Web Site
Command Prompt - Ping - Web Site. Bradley Mitchell / About.com

Pinging a Responsive Web Site

Ping programs allow specifying a computer name instead of an IP address. Users normally prefer pinging by name when targeting a Web site.

The below graphic illustrates the results of pinging Google's Web site (www.google.com) from a Windows command prompt. Ping reports the target IP address and response time in milliseconds. Note that large Web sites like Google utilize many Web server computers worldwide: Many different possible IP addresses (all of them valid) can be reported back when pinging these Web sites.

Pinging an Unresponsive Web Site

Many Web sites (including Lifewire.com) block ping requests as a network security precaution. The result of pinging these Web sites varies but generally, includes a "Destination net unreachable" error message and no useful information. IP addresses reported by pinging sites that block ping tend to be those of DNS servers and not the Web sites themselves.

C:\>ping www.lifewire.com

Pinging www.about.akadns.net [208.185.127.40] with 32 bytes of data:
Reply from 74.201.95.50: Destination net unreachable.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 208.185.127.40:
    Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),