Pinterest Stumbleupon Whatsapp
Ads by Google

Ping is a command used to measure the latency between two devices on a network. The ping command is available on every operating systems, and many online games display a visible ping you can use to understand latency.

Ping is just a measure of the latency we feel in everything we do online, whether it’s clicking a link, posting a status update, sending a message, playing a game, uploading a file, streaming an online video, or anything else. If you’re using a website and it takes a long time to load a new page every time you click a link, you’re probably experiencing a high ping to that site. If it’s fast, you probably have a low ping.

What Ping Is Used For

Ping isn’t just a measure of “performance”. Specifically, it’s a measure of the latency between your computer and a remote device. A ping tells you the time it takes for a single packet to leave your computer, reach a remote server, and then return to you.

Have you ever noticed that, when you click a link on a web page, the new web page doesn’t load instantly? Instead, there’s a small delay — this is latency. Your computer has to request the new page and have it sent back to you, and it takes a small amount of time for every packet to travel between your computer and the remote computer. Ping lets you measure this latency.

This is very perceptible in online games. For example, if you’re playing a game with a 20 ms ping, you should have very low latency. Actions you take appear to take place in the game near instantly. If you have a higher ping like 200 ms, actions you take will be noticeably delayed and you won’t be able to keep up with other people playing the game.

This is why ping is displayed prominently in many multiplayer games. It helps you understand how good your connection is and what kind of experience you should expect on the server. A lower ping is always better — it means lower latency, which is faster communication between you and the remote server. This applies to everything you do online — whether you’re playing an online game How To Reduce Lag In Online Gaming How To Reduce Lag In Online Gaming There was always some amount of lag in the game, especially when there were lots of players logged in. That's an experience you can have only so often before you realize that it's either time... Read More  or just browsing the web.

Ads by Google

Ping may sometimes just be displayed as “latency”, but it’s basically the same thing. Games often display ping with a visual color to help you understand how good your ping is at a glance — green is good, yellow is borderline, and red is bad.

diablo 3 latency meter ping

How A Ping Works

Here’s how a ping works, in a simplified way:

  • Your computer sends a small package of data — known as a packet in networking terms — to a remote computer.
  • The remote computer receives the packet, which requests it reply.
  • The remote computer sends a packet back to you.

This is a single ping. Ping allows you to measure the round-trip time for a packet between your computer and a remote computer. For example, below we used the ping command in a Windows Command Prompt The 8 Useful DOS Commands That You Should Memorize The 8 Useful DOS Commands That You Should Memorize Windows 7 still features a command prompt window. so there's still a place for DOS commands. So for those of you that like the idea of typing in a few commands to avoid the hassle of... Read More to ping google.com. This command sends four packets, or four individual pings. For the first three pings, the time is 10 ms. For the last ping, the time is 12 ms. This means that, for the first three pings, it took ten milliseconds for a packet to reach Google and be sent back to us. For the last ping, it took twelve milliseconds. Why did it take longer? Well, it could be many things — Google’s server performing more slowly, an Internet router between us and Google’s servers could be a bit more busy, our Wi-Fi reception may have been a bit worse, or many other things. Some fluctuation is normal.

example ping

A Ping Is An ICMP Echo Request

When you send a ping, your computer sends an ICMP echo request packet. ICMP stands for “Internet Control Message Protocol”, and is a protocol that’s generally used between network devices so they can communicate with each other. The packet requests an “echo” — in other words, a reply. The remote server, when it receives the ping, will generally respond with a message of its own. When you run a ping command and see several pings in a row, each line is a single packet and its reply.

However, not every computer or server is set up to reply to ICMP echo request packets. Computer that are set up not to respond to pings won’t respond at all, so you’ll simply see “Request timed out” message as the server fails to respond to your pings in the allotted time. The ICMP protocol could be abused for DDoS attacks What Is a DDoS Attack? [MakeUseOf Explains] What Is a DDoS Attack? [MakeUseOf Explains] The term DDoS whistles past whenever cyber-activism rears up its head en-masse. These kind of attacks make international headlines because of multiple reasons. The issues that jumpstart those DDoS attacks are often controversial or highly... Read More .

example ping with no response

Spotting Packet Loss

Ping can also help you spot packet loss. For example, let’s say you ran the ping command and you saw a mix of replies and “Request timed out” lines. This would indicate some ping packets either weren’t being received by the remote computer, or that their replies weren’t reaching you. The packets are getting lost somewhere along the way.

You’d know that packet loss was occurring somewhere between you and the server — either on the remote computer’s network, a router somewhere in between, your ISP, or your home network. If you’re experiencing trouble while browsing the Internet or playing an online game — especially if you sometimes have to click links twice to get them to load — the ping command can help you see whether that’s packet loss or not. You can also run the ping command against several different remote servers to get a better idea of where the packet loss is occurring.

Ping also displays the severity of packet loss. For example, below our first packet reached the server and made it back to us, but our three others didn’t. Ping displays this as 75% packet loss — 3 out of the 4 packets were lost.

ping packet loss

Is A Zero Ping Possible?

The lower the ping, the better. A zero ping would be ideal and would mean that our computer was communicating instantly with a remote server.

Due to the laws of physics, even a small piece of data — known as a packet — takes some time to travel. Even if your packet is travelling entirely over fiber-optic cables, it’s still limited by the speed of light. It’s also limited by the routers sitting along those fiber-optic cables, which have to receive the packet and forward it along different connections.

If you try pinging your local computer — with the ping localhost command — you’re asking your computer to contact itself and reply to itself. In this case, you’ll often see a 0 ms ping. This simply means that your computer can communicate with itself instantly. Of course, it really isn’t instant because the software takes a small amount of time to perform these operations. However, it’s so low that we can round it down to 0 ms and say we have a 0 ping to our own computer.

0ms ping to localhost

However, once you start adding in lengths of cable, routers, and distances, you won’t get a 0 ms ping. For example, you could try pinging your own home router. Here we pinged our home router, which we’re connected to wirelessly Wireless Feng Shui: How to Optimize Your House For Best Wi-Fi Reception Wireless Feng Shui: How to Optimize Your House For Best Wi-Fi Reception Setting up a Wi-Fi network should be an easy prospect, shouldn't it? I mean, a house is a closed-in box, and you'd think when you place a device that transmits wireless signals in all directions... Read More . It’s just a few rooms away, but we see an average ping of 3 ms and a minimum ping of 1 ms. It takes some time just to communicate with a device sitting in the other room. Even if we weren’t connected wirelessly, just communicating with our routers would often bring our ping around 0 ms, and it will take also take a packet some time to reach your ISP’s network once it leaves your router and heads towards the Internet.

ping home router

In other words, you can’t really get to a 0 ms ping. This is a limit of the laws of physics. We can’t transmit information instantly — except maybe with quantum entanglement. If we found a way to use quantum entanglement to transmit information across the Internet, we could get to 0 ms ping — but that’s the only option here. Don’t hold your breath for this breakthrough!

In the future, we can absolutely reduce latency on the Internet and deal with it better. For example, web browsers like Chrome, Firefox, and Internet Explorer Surprise: Internet Explorer 11 Has Matured Into A Modern Browser Surprise: Internet Explorer 11 Has Matured Into A Modern Browser Remember Internet Explorer 6? Well, Internet Explorer isn't horrible anymore. Whether you like IE or not, you can't deny that it has improved dramatically and is now worthy of taking its place alongside other modern... Read More are already “pre-fetching” pages you might want to see next to eliminate that perceptible latency when you click a link. However, a 0 ms ping — instant information transmission — will likely remain elusive.

Image Credit: sleepy kitty on Flickr

  1. Entity 303
    January 10, 2016 at 7:38 am

    I DIED WHEN PING (-10) WAS USED!! I JUST SAID OH MY GOD!!

  2. Macca Ford Morgan
    September 19, 2015 at 2:51 pm

    my brother brought this to my attention. now if i join a server (COD, BF4 ect) and i have a ping to server of 100ms, and then my brother joins same server with ping of 100ms, does that mean the ping between my actions and his actions are 200ms appart in the server? so really if everyone in the server had a ping of 100ms then really we are playing with 200ms ping? lol

  3. Zeb
    May 8, 2015 at 4:26 am

    I was playing on Team Fortress 2 and there was a server hosted in Phoenix, Arizona. I live in Colorado Springs, Colorado. I was receiving a 0 ms ping. How???

  4. alex
    April 20, 2015 at 11:16 am

    maybe you wil laugh but I got ping with minus(-)2 ms. :). I used an old edimax switch that had some problems when it was connected in network.

  5. Victor O
    September 16, 2014 at 7:29 pm

    "Action at a Distance" is a phenomenon where two particles can affect each other instantaneously, though we don't know how to harness it, it's definitely possible for instantaneous communication between continents and maybe even galaxies!

  6. xhark
    September 4, 2014 at 6:01 pm

    Why not try a Zero Ping Looping with
    ping localhost -t

    :)

  7. rezme
    September 4, 2014 at 1:46 am

    And you should put a way to optimize that ping :P maybe some software or tool?

  8. Krasen I
    September 3, 2014 at 8:48 pm

    try 192.168.1.1 for your router this is mostly the default location

  9. Monkeybeard
    September 3, 2014 at 4:28 pm

    well Rocco, that's the same as pinging your localhost. 127.0.0.1 is the local loopback address so you would be pinging yourself, that's why you see 0ms.

  10. Rocco R
    September 3, 2014 at 2:28 pm

    I get a zero ping from 127.0.0.1 every time, so I guess it IS possible!

Leave a Reply

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