Head blueLogoText.gif NCF HelpWiki
Help | StartPage

Difference between revisions of "Ping"

From Support
Jump to navigation Jump to search
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
<code>ping</code> is a software utility used to test the reach-ability of hosts. It is available for virtually all operating systems, including most embedded network administration software.
<code>ping</code> is a software utility used to test the reach-ability of hosts. It is available for virtually all operating systems (Windows, MacOS, etc.), including most embedded network software.


Ping measures the round-trip time for messages sent from the originating host to a destination computer that are echoed back to the source. The name comes from active sonar terminology that sends a pulse of sound and listens for the echo to detect objects under water. The program reports errors, packet loss, and a summary of the results, typically with the minimum, maximum, the mean round-trip times.
Ping measures the round-trip time for messages sent from the originating host to a destination computer that are echoed back to the source. The name comes from active sonar terminology that sends a pulse of sound and listens for the echo to detect objects under water. The program reports errors, packet loss, and a summary of the results, typically with the minimum, maximum, the mean round-trip times.
Line 8: Line 8:
To run ping tests from a computer, you need to open a command prompt, or terminal, where you can run the tests.  Typically, this is a window with a black background and this allows you to type commands and see the results.
To run ping tests from a computer, you need to open a command prompt, or terminal, where you can run the tests.  Typically, this is a window with a black background and this allows you to type commands and see the results.


If using Windows, hold the windows key and press <code>r</code> to open the "run" window, then type <code>cmd</code> and press Enter to open a command prompt.
If using Windows, press the Windows key to open the start menu, then type the letters <code>cmd</code>, then press Enter to open a command prompt.


On Mac, click the Launchpad icon  in the Dock, type <code>terminal</code> in the search field, then click Terminal.
[[File:Windows_11_open_command_prompt.png|border]]


On Linux, open the launcher menu and type <code>terminal</code> to find a terminal program and open it.
[[File:Windows 11 command prompt.png|border]]


==== Run Ping Test ====
If using Mac, click the Launchpad icon in the Dock, type <code>terminal</code> in the search field, then click Terminal.
To run a ping test, type the word <code>ping</code> followed by a space, then an address to try pinging.  For example, enter <code>ping ncf.ca</code> to check if you can reach the NCF website.
 
If using Linux, open your launcher menu and type <code>terminal</code> to find a terminal program and open it.
 
==== Run a Ping Test ====
To run a ping test, type the word <code>ping</code> followed by a space, and then the address you want to try pinging.  For example, type <code>ping google.ca</code> to test if you can reach Google.  This should send 4 pings, and show how long each reply took to receive.  If your connection is working well, you should see 4 replies and each should have a time less than 30ms.
 
[[File:Windows 11 ping google.ca.png|border]]
 
==== Ping an IP ====
If you are unable to reach a domain like google.ca, try pinging the IP address 1.1.1.1 (CloudFlare).  If you can ping this IP but not domain names, this indicates a problem with resolving domain names, which may be fixed by using a different DNS server (for example, you can set your DNS server to 1.1.1.1 to use CloudFlare's).
 
[[File:Windows11-ping-1.1.png|border]]
 
==== Ping Gateway ====
The connection between your computer and router/modem can be tested by pinging the gateway.  You can find the IP of your gateway in your connection info or by running the <code>ipconfig</code> command.  For example, this might be 192.168.1.1 in which case you would ping it by running <code>ping 192.168.1.1</code>.  The pings to your gateway should show replies with less than 1ms of latency, otherwise there is a problem with the connection to your router, which could be caused by a weak WiFi signal, for example.
 
[[File:Windows11 ping gateway.png|border]]
 
==== Continuous Ping ====
The <code>ping</code> command typically runs 4 ping tests at a time.  Adding <code>-t</code> to the command will instead run the ping test continuously, which can be useful for tracking down intermittent connection problems.
 
This test can be left running and will not use a significant amount of bandwidth or resources on the computer.  Then, when you have a connection problem, you can check if these pings are still showing the regular replies or if it shows the interruption. If there is a sudden increase in latency, for example, this is likely caused by buffer-bloat which occurs when a device on the network is uploading a large amount of data.  You can try turning off devices or individual apps, and observing the effect on the continuous ping, to track down the offender.
 
Here is an example of a continuous ping to CloudFlare (1.1) showing latency spikes going above 100 ms which was caused by performing a large upload.  Latency over 100ms will cause noticeable delays in voice calls and lag in online gaming.
 
[[File:Windows-11-continuous-ping.png|border]]
 
To end the continuous ping test, hold <code>Ctrl</code> and press <code>c</code>, or you can simply close the window.
 
==== Ping Mobile App ====
Ping tests can also be run from a smartphone or tablet.  Install a free ping app from your app store to easily run ping tests from your phone:
 
[https://play.google.com/store/apps/details?id=com.lipinic.ping Ping for Android]
 
[https://apps.apple.com/us/app/ping-network-utility/id576773404 Ping for iPhone/iPad (Apple)]
 
==== Ping from Router ====
Most modems and routers offer a built-in tool to run ping tests.  From the router's web interface, you can look for a ping tool/utility and use this to run tests directly from your router.

Latest revision as of 15:33, 12 December 2023

ping is a software utility used to test the reach-ability of hosts. It is available for virtually all operating systems (Windows, MacOS, etc.), including most embedded network software.

Ping measures the round-trip time for messages sent from the originating host to a destination computer that are echoed back to the source. The name comes from active sonar terminology that sends a pulse of sound and listens for the echo to detect objects under water. The program reports errors, packet loss, and a summary of the results, typically with the minimum, maximum, the mean round-trip times.

Ping Test Instructions

Open Command Prompt

To run ping tests from a computer, you need to open a command prompt, or terminal, where you can run the tests. Typically, this is a window with a black background and this allows you to type commands and see the results.

If using Windows, press the Windows key to open the start menu, then type the letters cmd, then press Enter to open a command prompt.

Windows 11 open command prompt.png

Windows 11 command prompt.png

If using Mac, click the Launchpad icon in the Dock, type terminal in the search field, then click Terminal.

If using Linux, open your launcher menu and type terminal to find a terminal program and open it.

Run a Ping Test

To run a ping test, type the word ping followed by a space, and then the address you want to try pinging. For example, type ping google.ca to test if you can reach Google. This should send 4 pings, and show how long each reply took to receive. If your connection is working well, you should see 4 replies and each should have a time less than 30ms.

Windows 11 ping google.ca.png

Ping an IP

If you are unable to reach a domain like google.ca, try pinging the IP address 1.1.1.1 (CloudFlare). If you can ping this IP but not domain names, this indicates a problem with resolving domain names, which may be fixed by using a different DNS server (for example, you can set your DNS server to 1.1.1.1 to use CloudFlare's).

Windows11-ping-1.1.png

Ping Gateway

The connection between your computer and router/modem can be tested by pinging the gateway. You can find the IP of your gateway in your connection info or by running the ipconfig command. For example, this might be 192.168.1.1 in which case you would ping it by running ping 192.168.1.1. The pings to your gateway should show replies with less than 1ms of latency, otherwise there is a problem with the connection to your router, which could be caused by a weak WiFi signal, for example.

Windows11 ping gateway.png

Continuous Ping

The ping command typically runs 4 ping tests at a time. Adding -t to the command will instead run the ping test continuously, which can be useful for tracking down intermittent connection problems.

This test can be left running and will not use a significant amount of bandwidth or resources on the computer. Then, when you have a connection problem, you can check if these pings are still showing the regular replies or if it shows the interruption. If there is a sudden increase in latency, for example, this is likely caused by buffer-bloat which occurs when a device on the network is uploading a large amount of data. You can try turning off devices or individual apps, and observing the effect on the continuous ping, to track down the offender.

Here is an example of a continuous ping to CloudFlare (1.1) showing latency spikes going above 100 ms which was caused by performing a large upload. Latency over 100ms will cause noticeable delays in voice calls and lag in online gaming.

Windows-11-continuous-ping.png

To end the continuous ping test, hold Ctrl and press c, or you can simply close the window.

Ping Mobile App

Ping tests can also be run from a smartphone or tablet. Install a free ping app from your app store to easily run ping tests from your phone:

Ping for Android

Ping for iPhone/iPad (Apple)

Ping from Router

Most modems and routers offer a built-in tool to run ping tests. From the router's web interface, you can look for a ping tool/utility and use this to run tests directly from your router.