Icon Fame Journal.

Juicy entertainment chatter with tabloid flavor.

updates

How to use the ping command to test your network

By Daniel Kim

Brady Gavin has been immersed in technology for 15 years and has written over 150 detailed tutorials and explainers. He’s covered everything from Windows 10 registry hacks to Chrome browser tips. Brady has a diploma in Computer Science from Camosun College in Victoria, BC. Read more.

How to use the ping command to test your network

The ping command sends packets of data to a specific IP address on a network, and then lets you know how long it took to transmit that data and get a response. It’s a handy tool that you can use to quickly test various points of your network. Here’s how to use it.

How Does Ping Work?

Ping comes from a term used in sonar technology that sends out pulses of sound, and then listens for the echo to return. On a computer network, a ping tool is built into most operating systems that works in much the same way. You issue the ping command along with a specific URL or IP address. Your computer sends several packets of information out to that device, and then waits for a response. When it gets the response, the ping tool shows you how long each packet took to make the round trip—or tells you there was no reply.

It sounds simple, and it is. But you can use it to good effect. You can test whether your computer can reach another device—like your router—on your local network, or whether it can reach a device on the Internet. This can help you determine if a network problem is somewhere on your local network, or somewhere beyond. The time it takes packets to return to you can help you identify a slow connection, or if you’re experiencing packet loss.

And it pretty much doesn’t matter what operating system you’re using. Pull up a terminal or Command Prompt window, and you can use ping on macOS, Linux, or any version of Windows.

How to Use Ping

We’re going to use the Windows Command Prompt in our example here. But you can also use the ping command in Windows PowerShell, or in the Terminal app on macOS or any Linux distro. Once you get to using the actual command, it works the same everywhere.

In Windows, hit Windows+R. In the Run window, type “cmd” into the search box, and then hit Enter.

How to use the ping command to test your network

At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter. In the image below, we’re pinging and getting a normal response.

How to use the ping command to test your network

That response shows the URL you’re pinging, the IP address associated with that URL, and the size of the packets being sent on the first line. The next four lines show the replies from each individual packet, including the time (in milliseconds) it took for the response and the time-to-live (TTL) of the packet, which is the amount of time that must pass before the packet is discarded.

At the bottom, you’ll see a summary that shows how many packets were sent and received, as well as the minimum, maximum, and average response time.

And in the next image, we’re pinging the router on our local network using its IP address. We’re also getting a normal response from it.

How to use the ping command to test your network

When the ping tool does not get a response from whatever devices you’re pinging, it lets you know that, too.

How to use the ping command to test your network

And that’s how to use ping at its most basic. Of course, like most commands, there are some advanced switches you can use to make it behave a bit differently. For example, you can have it keep pinging a destination until you stop the command, specify the number of times you want it to ping, set how often it should ping, and more. But unless you’re doing some very specific types of troubleshooting, you won’t need to worry much about those advanced switches.

If you’re curious about them, though, just type “ping /?” at the Command Prompt to see a list.

How to use the ping command to test your network

So, What Can You Do With Ping?

Now that you know how to use the command, here are some interesting things you can do with it:

  • Ping a URL (like ) or IP address to see if you can reach an internet destination. If you get a successful response, you know that all the networking devices between you and that destination are working, including the network adapter in your computer, your router, and whatever devices exist on the internet between your router and the destination. And if you’re interested in exploring those routes further, you can use another networking tool named tracert to do just that.
  • Ping a URL to resolve its IP address. If you want know the IP address for a particular URL, you can ping the URL. The ping tool shows you right at the top the IP address it’s working with.
  • Ping your router to see if you can reach it. If you can’t successfully ping an internet location, you can then try pinging your router. A successful response lets you know that your local network is working okay, and that the problem reaching the internet location is somewhere out of your control.
  • Ping your loopback address (127.0.0.1). If you can’t successfully ping your router, but your router appears to be turned on and working, you can try pinging what’s known as a loopback address. That address is always 127.0.0.1, and pinging it successfully lets you know that the network adapter on your computer (and the networking software in your OS) is working properly.

Note: You may not get a ping response from other computers on your local network because the built-in firewalls on those devices prevent them from responding to ping requests. If you want to be able to ping those devices, you’ll need to turn off that setting to allow pings through the firewall.

The list above uses a kind of outside-in approach, where you ping the furthest destination first, and then work your way in to the more local devices. Some people like to work inside-out by pinging the loopback address first, then their router (or another local device), and then an internet address.

And of course, what we’re talking about in this article is mostly about using ping to perform troubleshooting on a home or small business network. On larger networks, there’s a lot more complexity to worry about. Plus, if you’re tasked with troubleshooting larger networks, you probably already know how to use ping and many other networking tools.

CPU Graphics Card HDD SSD Display Fans & Cooling Mainboard Laptop Memory Reviews

作者 frank

How to use the ping command to test your network

The ping command sends packets of data to a specific IP address on a network, and then lets you know how long it took to transmit that data and get a response. It’s a handy tool that you can use to quickly test various points of your network. Here’s how to use it.

How Does Ping Work?

Ping comes from a term used in sonar technology that sends out pulses of sound, and then listens for the echo to return. On a computer network, a ping tool is built into most operating systems that works in much the same way. You issue the ping command along with a specific URL or IP address. Your computer sends several packets of information out to that device, and then waits for a response. When it gets the response, the ping tool shows you how long each packet took to make the round trip—or tells you there was no reply.

It sounds simple, and it is. But you can use it to good effect. You can test whether your computer can reach another device—like your router—on your local network, or whether it can reach a device on the Internet. This can help you determine if a network problem is somewhere on your local network, or somewhere beyond. The time it takes packets to return to you can help you identify a slow connection, or if you’re experiencing packet loss.

And it pretty much doesn’t matter what operating system you’re using. Pull up a terminal or Command Prompt window, and you can use ping on macOS, Linux, or any version of Windows.

How to Use Ping

We’re going to use the Windows Command Prompt in our example here. But you can also use the ping command in Windows PowerShell, or in the Terminal app on macOS or any Linux distro. Once you get to using the actual command, it works the same everywhere.

In Windows, hit Windows R. In the Run window, type “cmd” into the search box, and then hit Enter.

How to use the ping command to test your network

At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter. In the image below, we’re pinging and getting a normal response.

How to use the ping command to test your network

That response shows the URL you’re pinging, the IP address associated with that URL, and the size of the packets being sent on the first line. The next four lines show the replies from each individual packet, including the time (in milliseconds) it took for the response and the time-to-live (TTL) of the packet, which is the amount of time that must pass before the packet is discarded.

At the bottom, you’ll see a summary that shows how many packets were sent and received, as well as the minimum, maximum, and average response time.

And in the next image, we’re pinging the router on our local network using its IP address. We’re also getting a normal response from it.

How to use the ping command to test your network

When the ping tool does not get a response from whatever devices you’re pinging, it lets you know that, too.

How to use the ping command to test your network

And that’s how to use ping at its most basic. Of course, like most commands, there are some advanced switches you can use to make it behave a bit differently. For example, you can have it keep pinging a destination until you stop the command, specify the number of times you want it to ping, set how often it should ping, and more. But unless you’re doing some very specific types of troubleshooting, you won’t need to worry much about those advanced switches.

If you’re curious about them, though, just type “ping /?” at the Command Prompt to see a list.

How to use the ping command to test your network

So, What Can You Do With Ping?

Now that you know how to use the command, here are some interesting things you can do with it:

  • Ping a URL (like ) or IP address to see if you can reach an internet destination. If you get a successful response, you know that all the networking devices between you and that destination are working, including the network adapter in your computer, your router, and whatever devices exist on the internet between your router and the destination. And if you’re interested in exploring those routes further, you can use another networking tool named tracert to do just that.
  • Ping a URL to resolve its IP address. If you want know the IP address for a particular URL, you can ping the URL. The ping tool shows you right at the top the IP address it’s working with.
  • Ping your router to see if you can reach it. If you can’t successfully ping an internet location, you can then try pinging your router. A successful response lets you know that your local network is working okay, and that the problem reaching the internet location is somewhere out of your control.
  • Ping your loopback address (127.0.0.1). If you can’t successfully ping your router, but your router appears to be turned on and working, you can try pinging what’s known as a loopback address. That address is always 127.0.0.1, and pinging it successfully lets you know that the network adapter on your computer (and the networking software in your OS) is working properly.

Note: You may not get a ping response from other computers on your local network because the built-in firewalls on those devices prevent them from responding to ping requests. If you want to be able to ping those devices, you’ll need to turn off that setting to allow pings through the firewall.

The list above uses a kind of outside-in approach, where you ping the furthest destination first, and then work your way in to the more local devices. Some people like to work inside-out by pinging the loopback address first, then their router (or another local device), and then an internet address.

And of course, what we’re talking about in this article is mostly about using ping to perform troubleshooting on a home or small business network. On larger networks, there’s a lot more complexity to worry about. Plus, if you’re tasked with troubleshooting larger networks, you probably already know how to use ping and many other networking tools.

Document relates to: All Laplink Products

SUMMARY

I want to connect using the TCP/IP protocol. This might be over the Laplink Ethernet Cable or a Local Area Network (LAN). How can I test the TCP/IP protocol?

SOLUTION

The PING command sends a test packet of data to a designated IP address.

Open up a DOS command prompt:

  1. From the Windows Start menu, click Run . (In Windows Vista and newer, simply type the command in step 2 into the search field and hit enter instead of clicking Run.)
  2. Type CMD and click OK .
  3. Do this step on both computers.

Identify the IP address on the target computer: See Technical Document 204: How to Determine the IP Address on a Computer for more information.

Testing the network connection using PING:

  1. In the command prompt of the source computer, type the following:

    PING IP Address of the target computer

    Then press Enter . For example, PING 10.0.0.2

Understanding the results:

Each PING test makes 4 tries, and gives back a response for each attempt. If the response looks like this, the test is successful.
How to use the ping command to test your network

If the response looks like either of these examples, the test failed.
How to use the ping command to test your network

How to use the ping command to test your network

Resolving the problem:
There are several things that can cause a PING test to fail, such as:

  • Pinging the incorrect IP address. Verify that you are pinging the correct IP address of the host computer.
  • Firewall software may be blocking PING requests, and you will need to disable the firewall. Typically, if a firewall is blocking PING requests, it will very likely block Laplink connections as well. To configure a firewall for Laplink connections, please see Technical Document 633: Overview for Configuring a Firewall or Router to Allow LapLink Connections.
  • The network may be incorrectly configured. This can be due to a number of different factors including incorrect IP address and/or subnet mask. Subnet masks determine the valid range of IP addresses for a network. Both machines should have IP addresses that fall within the range determined by the subnet mask. If the machines are on the same subnet then they must have the same subnet mask. For more information, contact your network administrator.
  • Hardware failure, i.e. a bad ethernet adapter, cable, router, hub, etc.

This Article can be found by searching for:

Keywords: Cable: Laplink Ethernet Cable, Connections: LAN, Connections: Network, Network: TCP/IP, Configuration: Network, How To: Windows

Testing your internet connection speed using a third party platform is something we have covered before. Though, we didn’t get a proper look at how to test the condition of your network. In this tutorial, we are going to be guiding you through the ping command, and how to use it to test your network.

What is Ping and where do I use it?

Outside the computer science terminology, ping actually comes from the solar technology space, as a term used to describe the process of sending out pulses of sound, and then listening for the echo to return.

In a similar fashion, ping here describes the process of the computer sending several packages of information to a specific device, via an IP address or a URL, and then waiting for a response.

When we receive the response, the command shows in further detail how long it took for the package to come back, or not, in the event that the package was lost.

By testing if your computer can actually reach other devices in your local network or on the internet, one can also determine if the network problem he or she is experiencing, is taking place on the local network or someplace outside that – i.e. the provider’s servers.

How do I use ping to check my network?

The process is very simple. It is worth noting that the ping command has universal compatibility, in the sense that you can use it in Windows (Command Prompt, Powershell), Mac (Terminal app) and any Linux distribution.

  1. Press Windows+R
  2. In the pop-up box, type in ‘cmd’ and hit ok
  3. In the command box, type in ‘ping’ followed by a URL or an IP address
  4. Wait a few seconds for the results to come back; time depends on your internet speed

How to use the ping command to test your networkHow to use the ping command to test your networkHow to use the ping command to test your networkHow to use the ping command to test your network

If you want to develop a more comprehensive understanding of ping’s functionalities, feel free to type in ‘ping/?’ in the command box. That way, you can see all the extra options that come with ping.

For instance, you can use ‘ping -n count’ to specify a number of echo requests that you wish to send.

If you encounter any problems while trying out the above or have a recommendation to make, feel free to shoot a comment down below.

The ping command sends packets of data to a specific IP address on a network, and then lets you know how long it took to transmit that data and get a response. It’s a handy tool that you can use to quickly test various points of your network. Here’s how to use it.

How Does Ping Work?

Ping comes from a term used in sonar technology that sends out pulses of sound, and then listens for the echo to return. On a computer network, a ping tool is built into most operating systems that works in much the same way. You issue the ping command along with a specific URL or IP address. Your computer sends several packets of information out to that device, and then waits for a response. When it gets the response, the ping tool shows you how long each packet took to make the round trip—or tells you there was no reply.

It sounds simple, and it is. But you can use it to good effect. You can test whether your computer can reach another device—like your router—on your local network, or whether it can reach a device on the Internet. This can help you determine if a network problem is somewhere on your local network, or somewhere beyond. The time it takes packets to return to you can help you identify a slow connection, or if you’re experiencing packet loss.

And it pretty much doesn’t matter what operating system you’re using. Pull up a terminal or Command Prompt window, and you can use ping on macOS, Linux, or any version of Windows.

How to Use Ping

We’re going to use the Windows Command Prompt in our example here. But you can also use the ping command in Windows PowerShell, or in the Terminal app on macOS or any Linux distro. Once you get to using the actual command, it works the same everywhere.

In Windows, hit Windows+R. In the Run window, type “cmd” into the search box, and then hit Enter.

At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter. In the image below, we’re pinging and getting a normal response.

That response shows the URL you’re pinging, the IP address associated with that URL, and the size of the packets being sent on the first line. The next four lines show the replies from each individual packet, including the time (in milliseconds) it took for the response and the time-to-live (TTL) of the packet, which is the amount of time that must pass before the packet is discarded.

At the bottom, you’ll see a summary that shows how many packets were sent and received, as well as the minimum, maximum, and average response time.

And in the next image, we’re pinging the router on our local network using its IP address. We’re also getting a normal response from it.

When the ping tool does not get a response from whatever devices you’re pinging, it lets you know that, too.

And that’s how to use ping at its most basic. Of course, like most commands, there are some advanced switches you can use to make it behave a bit differently. For example, you can have it keep pinging a destination until you stop the command, specify the number of times you want it to ping, set how often it should ping, and more. But unless you’re doing some very specific types of troubleshooting, you won’t need to worry much about those advanced switches.

If you’re curious about them, though, just type “ping /?” at the Command Prompt to see a list.

So, What Can You Do With Ping?

Now that you know how to use the command, here are some interesting things you can do with it:

  • Ping a URL (like ) or IP address to see if you can reach an internet destination. If you get a successful response, you know that all the networking devices between you and that destination are working, including the network adapter in your computer, your router, and whatever devices exist on the internet between your router and the destination. And if you’re interested in exploring those routes further, you can use another networking tool named tracert to do just that.
  • Ping a URL to resolve its IP address. If you want know the IP address for a particular URL, you can ping the URL. The ping tool shows you right at the top the IP address it’s working with.
  • Ping your router to see if you can reach it. If you can’t successfully ping an internet location, you can then try pinging your router. A successful response lets you know that your local network is working okay, and that the problem reaching the internet location is somewhere out of your control.
  • Ping your loopback address (127.0.0.1). If you can’t successfully ping your router, but your router appears to be turned on and working, you can try pinging what’s known as a loopback address. That address is always 127.0.0.1, and pinging it successfully lets you know that the network adapter on your computer (and the networking software in your OS) is working properly.

Note: You may not get a ping response from other computers on your local network because the built-in firewalls on those devices prevent them from responding to ping requests. If you want to be able to ping those devices, you’ll need to turn off that setting to allow pings through the firewall.

The list above uses a kind of outside-in approach, where you ping the furthest destination first, and then work your way in to the more local devices. Some people like to work inside-out by pinging the loopback address first, then their router (or another local device), and then an internet address.

And of course, what we’re talking about in this article is mostly about using ping to perform troubleshooting on a home or small business network. On larger networks, there’s a lot more complexity to worry about. Plus, if you’re tasked with troubleshooting larger networks, you probably already know how to use ping and many other networking tools.

The ping command is one of the most often used networking utilities for troubleshooting network problems.

You can use the ping command to test the availability of a networking device (usually a computer) on a network.

When you ping a device you send that device a short message, which it then sends back (the echo).

If you receive a reply then the device is working OK , if you don’t then:

  • The device is faulty, disconnected, switched off, incorrectly configured
  • Your network or the device you are working on is not working properly.

Note: In this tutorial we will use the ping command on Windows but it works the same on Linux

Ping Command Prompt

To use the ping command you go to the command line.

On Windows (XP,7) – Start Menu>Run and enter cmd to open a command prompt.

On Windows 10 type cmd into the search box and select the cmd prompt from the displayed programs.

You can use the ping cmd with an IP address or the computer/host name.

To ping an IP address go to a cmd prompt and enter:

Ping IP Address e.g. ping 192.169.0.1 or to ping a computer name:

ping computer name e.g. ping Computer1

The screen shot below shows how to use the command with an IP address.

I have shown both a failed ping (192.168.0.1), and a successful ping (192.168.1.1)

How to use the ping command to test your network

Note: a failed ping results in a request timed out response, and a success results in the reply from message with the round trip delay in milliseconds.

The screen shot below shows how to use the ping command with the computer name.

How to use the ping command to test your network

Although this is easier to use a computer name than the IP address, it is only good if it works..

If it fails it is not conclusive as there is an extra stage called name resolution involved, and that could be at fault.

Here is a quick video that takes you through the process.

Using Ping To Troubleshoot Home Network Problems

The most common use of the ping command is to troubleshoot and locate network connectivity problems.

The general idea is to ping each network interface between your machine and the destination machine.

When a ping fails it indicates a problem with that network segment.

To illustrate I have drawn a simple home network with a workstation and server separated by a router (home router/hub).

How to use the ping command to test your network

If the problem was that the workstation (WS1) cannot connect to the server, then the general procedure would be: On WS1

  1. Ping loop back address 127.0.0.1 — tests own protocol stack.
  2. Ping IP2
  3. Ping IP3
  4. Ping IP4

If all pings work except the IP4 ping then we know that there is a problem on the network between the router and server.

The Ping Command- Advanced Options

The ping command has various options (switches) which you can see by typing

ping /? at the command prompt

How to use the ping command to test your network

So for a continuous ping we type

ping IP address or name -t

ping google.com -t

Here is the result
How to use the ping command to test your network

IPv6 Addresses

If you have IPv6 configured on your system then you can also ping ipv6 addresses

on Windows networks you need to use ping -6 at the cmd prompt

example — ping -6 hostname or IP address

and on Linux systems use ping6

example — ping6 -c 4 -I eth0 hostname or IP address

ping6 -c 4 IP address%eth0

Note: not using the Interface option may result in an Invalid Argument error

The screen shot below shows an IP4 and IP6 ping on linux

How to use the ping command to test your network

Common Questions and Answers

Q- What is the localhost?

A- On all operating systems localhost is the name given to your local machine and is resolved to the IP address 127.0.0.1.

Q- What is the Address 127.0.0.1?

A- This is known as the loopback address and is a special address assigned to your network interface.

Summary

The ping command is a networking utility available on all Operating systems that is used for troubleshooting on IP networks.

Related Articles and Resources

How to use the ping command to test your network

Feb 18, 2017 · 4 min read

How to use the ping command to test your network

The ping command is a Command Prompt command used to test the ability of the source computer to reach a specified destination computer. The ping command is usually used as a simple way verify that a computer can communicate over the network with another computer or network device.

The ping command operates by sending Internet Control Message Protocol (ICMP) Echo Request messages to the destination computer and waiting for a response.How many of those responses are returned, and how long it takes for them to return, are the two major pieces of information that the ping command provides.

How to use the ping command to test your network

Tip: See How To Read Command Syntax if you’re not sure how to interpret the ping command syntax above.

  • t = Using this option will ping the target until you force it to stop using Ctrl-C.
  • -a = This ping command option will resolve, if possible, the hostname of an IP address target.
  • -n count = This option sets the number of ICMP Echo Request messages to send. If you execute the ping command without this option, four requests will be sent.
  • -l size = Use this option to set the size, in bytes, of the echo request packet from 32 to 65,527. The ping command will send a 32 byte echo request if you don’t use the -loption.
  • -f = Use this ping command option to prevent ICMP Echo Requests from being fragmented by routers between you and the target. The -f option is most often used to troubleshoot Path Maximum Transmission Unit (PMTU) issues.
  • -i TTL = This option sets the Time to Live (TTL) value, the maximum of which is 255.
  • -v TOS = This option allows you to set a Type of Service (TOS) value. Beginning in Windows 7, this option no longer functions but still exists for compatibility reasons.

How to use the ping command to test your network

  • r count = Use this ping command option to specify the number of hops between the your computer and the target computer or device that you’d like to be recorded and displayed. The maximum value for count is 9 so use the tracert command instead if you’re interested in viewing all hops between two devices.
  • -s count = Use this option to report the time, in Internet Timestamp format, that each echo request is received and echo reply is sent. The maximum value for count is 4 meaning that only the first four hops can be time stamped.
  • -w timeout = Specifying a timeout value when executing the ping command adjusts the amount of time, in milliseconds, that ping waits for each reply. If you don’t use the -w option, the default timeout value is used which is 4000, or 4 seconds.

How to use the ping command to test your network

  • -R = This option tells the ping command to trace the round trip path.
  • -S srcaddr = Use this option to specify the source address.
  • -p = Use this switch to ping a Hyper-V Network Virtualization provider address.
  • -4 = This forces the ping command to use IPv4 only but is only necessary if target is a hostname and not an IP address.
  • -6 = This forces the ping command to use IPv6 only but as with the -4 option, is only necessary when pinging a hostname.
  • target = This is the destination you wish to ping, either an IP address or a hostname. /? = Use the help switch with the ping command to show detailed help about the command’s several options.

How to use the ping command to test your network

Note: The -f, -v, -r, -s, -j, and -k options work when pinging IPv4 addresses only. The -R and -S options only work with IPv6.

Other less commonly used switches for the ping command exist including [ -j host-list], [ -k host-list], and [ -c compartment]. Execute ping /? from the Command Prompt for more information on these two options.

Tip: Save all that ping command output to a file using a redirection operator. See How To Redirect Command Output to a File for instructions or see my Command Prompt Tricks list for more tips.

How to Use the Ping Command to Test Your Network

How to use the ping command to test your network

The ping command sends packets of data to a specific IP address on a network, and then lets you know how long it took to transmit that data and get a response. It’s a handy tool that you can use to quickly test various points of your network. Here’s how to use it.

How Does Ping Work?

Ping comes from a term used in sonar technology that sends out pulses of sound, and then listens for the echo to return. On a computer network, a ping tool is built into most operating systems that works in much the same way. You issue the ping command along with a specific URL or IP address. Your computer sends several packets of information out to that device, and then waits for a response. When it gets the response, the ping tool shows you how long each packet took to make the round trip—or tells you there was no reply.

It sounds simple, and it is. But you can use it to good effect. You can test whether your computer can reach another device—like your router—on your local network, or whether it can reach a device on the Internet. This can help you determine if a network problem is somewhere on your local network, or somewhere beyond. The time it takes packets to return to you can help you identify a slow connection, or if you’re experiencing packet loss.

And it pretty much doesn’t matter what operating system you’re using. Pull up a terminal or Command Prompt window, and you can use ping on macOS, Linux, or any version of Windows.

How to Use Ping

We’re going to use the Windows Command Prompt in our example here. But you can also use the ping command in Windows PowerShell, or in the Terminal app on macOS or any Linux distro. Once you get to using the actual command, it works the same everywhere.

How to Use Ping

We’re going to use the Windows Command Prompt in our example here. But you can also use the ping command in Windows PowerShell, or in the Terminal app on macOS or any Linux distro. Once you get to using the actual command, it works the same everywhere.

In Windows, hit Windows+R. In the Run window, type “cmd” into the search box, and then hit Enter.

How to use the ping command to test your network

At the prompt, type “ping” along with the URL or IP address you want to ping, and then hit Enter. In the image below, we’re pinging and getting a normal response.

How to use the ping command to test your network

That response shows the URL you’re pinging, the IP address associated with that URL, and the size of the packets being sent on the first line. The next four lines show the replies from each individual packet, including the time (in milliseconds) it took for the response and the time-to-live (TTL) of the packet, which is the amount of time that must pass before the packet is discarded.

At the bottom, you’ll see a summary that shows how many packets were sent and received, as well as the minimum, maximum, and average response time.

And in the next image, we’re pinging the router on our local network using its IP address. We’re also getting a normal response from it.

How to use the ping command to test your network

When the ping tool does not get a response from whatever devices you’re pinging, it lets you know that, too.

How to use the ping command to test your network

And that’s how to use ping at its most basic. Of course, like most commands, there are some advanced switches you can use to make it behave a bit differently. For example, you can have it keep pinging a destination until you stop the command, specify the number of times you want it to ping, set how often it should ping, and more. But unless you’re doing some very specific types of troubleshooting, you won’t need to worry much about those advanced switches.

If you’re curious about them, though, just type “ping /?” at the Command Prompt to see a list.

How to use the ping command to test your network

So, What Can You Do With Ping?

Now that you know how to use the command, here are some interesting things you can do with it:

  • Ping a URL (like ) or IP address to see if you can reach an internet destination. If you get a successful response, you know that all the networking devices between you and that destination are working, including the network adapter in your computer, your router, and whatever devices exist on the internet between your router and the destination. And if you’re interested in exploring those routes further, you can use another networking tool named tracert to do just that.
  • Ping a URL to resolve its IP address. If you want know the IP address for a particular URL, you can ping the URL. The ping tool shows you right at the top the IP address it’s working with.
  • Ping your router to see if you can reach it. If you can’t successfully ping an internet location, you can then try pinging your router. A successful response lets you know that your local network is working okay, and that the problem reaching the internet location is somewhere out of your control.
  • Ping your loopback address (127.0.0.1). If you can’t successfully ping your router, but your router appears to be turned on and working, you can try pinging what’s known as a loopback address. That address is always 127.0.0.1, and pinging it successfully lets you know that the network adapter on your computer (and the networking software in your OS) is working properly.

Note: You may not get a ping response from other computers on your local network because the built-in firewalls on those devices prevent them from responding to ping requests. If you want to be able to ping those devices, you’ll need to turn off that setting to allow pings through the firewall.

The list above uses a kind of outside-in approach, where you ping the furthest destination first, and then work your way in to the more local devices. Some people like to work inside-out by pinging the loopback address first, then their router (or another local device), and then an internet address.

And of course, what we’re talking about in this article is mostly about using ping to perform troubleshooting on a home or small business network. On larger networks, there’s a lot more complexity to worry about. Plus, if you’re tasked with troubleshooting larger networks, you probably already know how to use ping and many other networking tools.

Looking for a quick way to test your network speed? Well, you can always use a service like speedtest. Their results are accurate.

However, most advanced users prefer Ping command.

Why use ping? Well, it’s quick, platform independent, works even on a slow internet connection, and it can reveal some useful information if you know how to use it right.

What is ping command?

Ping (stands for Packet Internet groper) is a popular command line tool to check network related issue. Every OS has this inbuilt. And basically, it tells you how long does it take for a “data packet” to travel from your computer to a server and back to your computer. More time it takes, slower is your connection.

How does it work?

Think of it like a sonar. When you ping any server, you send the echo request ( ICMP ) to the target. And based on the time it took and the amount of the data that came back, you can test the reliability and speed of your connection.

Here is how you use Ping

1. Open command prompt.

If you are new to command prompt then first check out my post on different ways to open a command prompt. To open the terminal on mac type in the terminal in the spotlight, while Linux user can use the shortcut ctrl + alt+ T.

2. Once you see the cmd or terminal window, try the following command.

a. ping localhost

This will display your computer’s name and whether your system is able to receive and send information. You will notice the time it took for sending and receiving data packets is less than 1ms. This is because we are communicating to the same device.

This is rarely useful but something you should know.

b. ping google.com

This one extremely useful and usually used. If this command fails i.e. there is no response from the server. Then it means either the website is down or your internet.

Now, why ping google? Well, you can ping other websites as well, but since it’s extremely rare that Google’s servers are down or slow, pinging them is the preferred way to test internet connectivity.

Detail Analysis

174.194.36.32 – IP-address of Google.com (ping is also helpful to quickly find IP address of any website)

Lost 0% – It means the ping was successful and your internet is up. No packet was lost.

Avg time = 109 mili sec– if the avg time is less than 100, the connection is Ok and over 1000 is very slow. Though, this is a bit of generalization. It can give you a good idea but it’s defiantly not a holy grail.

Destination unreachable – It probably means that there is no route b/w your computer and destination website. Problem with your network device or internet is down from your ISP

Request timed out – Means no response was received for the given packet. Possibly a slow internet connection.

For more ping option type ping and hit enter

Ping option

If you want to ping the target continuously use the time (-t) parameter. To escape the loop use ctrl +c for both Mac and Windows.

Example ping google.com –t

If you want to send more or less than 4 requests, use -n followed by no of the count.

Example ping google.com –n 10

Windows sent four packets by default while MAC sent unlimited packets. To stop them in between use CTRL +C. Very useful.

If you want to send a packet data other than 32 bytes (default) use –l followed by numbers of bytes.

Example ping google.com –l 64

It not necessary that every host reply to your ping request. Sometimes pinging website like MSN and Microsoft return an error. Even though your internet connection is good.

Update 1

Apparently, I was having some problem with my WiFi router and ‘ping command’ was helpful. How? Well, it can tell you if the internet is down from your ISP or due to malfunctioning of your router. For instance

#1 If the internet is down from your ISP, then you will able to ping your router but to any website.

#2 If there is a problem with your router, then you will neither be able to ping any website or your router.

Update 2

You can quickly check your internet connectivity on your Android using PingTool. This app not only lets you ping a website but also do a port scan, whois look and has WiFi scanner. Much better than the speedtest Android app.

If you use the ping command a lot on Windows. Then instead of running it through cmd, use the run box instead of by typing cmd /c ping google.com. Here /c will close the cmd once you are done, but if you want to keep it open, use /o parameter.

Now, the advantage of launching it from the run box is, that it’s much quicker. Also, run box remembers history, so next time you want to run the command, press Win+R to open the run box, use the up/down to bring the ping command and then hit enter.