Ping what is it
Ping what is it
What is ping, and why is it important?
I’ve seen the term used in many online games but I’m not sure what it means.
What does ‘ping’ mean? Is it better to have high or low ping?
6 Answers 6
Ping is the amount of milliseconds it takes a packet of information to reach the server from you and back. Basically it’s a measurement of connection speed, and it influences lag quite a lot.
Ping is the measure of latency (lag) from your computer to the server and back to your computer. A ping is sent to a server (which contains a packet of information 32 bits long, those are a combination of 32 0’s and 1’s) and then the server sends that back.
The time taken for the information to get from your computer, to the server and back to your computer is the amount of latency that you have. Lower ping is better than higher ping because it means that you will send information and receive the server’s response back quicker. If you have a high ping (>500ms) it means that it is taking over half a second to get to the server and back. This means you will notice that there are jitters and jumps and a term called «rubber banding» during online gameplay.
A high ping (or latency) can therefore influence the outcome of an online game.
It’s worth noting that there are many things that can influence your ping and that is:
Distance from server. For example, if you live in the US and you try to connect to a server in the EU then the ping will be higher than if you tried to connect to a US server close to you (this is taking into account that both the EU/US is evenly matched in terms of speed, etc).
Your internet connection. For example, if you have a 56k modem the ping will take longer to come back to you than if you have a decent broadband connection.
The amount of hops. This is, the route and servers the ping has to take to reach the destination and back. The further away from you in the World it is the more hops you have to go through.
Some other things to consider when looking at ping:
How many of the pings actually made it to the target site? If the pings don’t reliably arrive, there might be packet loss due to an unreliable internet connection between your computer and the destination. This unreliability could be at any point in the internet connection, so the next step is to do a traceroute and see where the problems occur.
What is the average and standard deviation of the pings? If the ping is a low 20ms, but has wildly variable results of over 100ms, that can be much worse than a constant 80ms ping to the target site.
Ping is a measure of how is your connection to the server (in a multiplayer online game).
Obviously a low value is better and you should prefer that server, a high ping may even get you kicked (it wouldn’t be possible to play anyway as you’d see things that already happened for everybody else, making it hard to, for example, hit an enemy that’s no longer where you see him).
In multiplayer online video games, ping refers to the network latency between a player’s computer (client), and either the game server or another client (i.e. peer). This could be reported quantitatively as an average time in milliseconds, or qualitatively as low ping or high ping. The latter usage is common among players of first-person shooter and real-time strategy games. Having a low ping is always desirable because lower latency provides smoother gameplay by allowing faster updates of game data.
Ping is often conflated with lag. One may «lag out» due to unacceptably high ping. Servers will often disconnect a client if the ping is too high and it poses a detriment to others’ gameplay. Similarly, client software will often mandate disconnection if the ping is too high. A high ping does not cause lag; rather, a high ping value is the result of lag. Rather than using the traditional ICMP echo request and reply packets to determine ping times, game programmers often instead build their own latency detection into existing game packets (usually based on the UDP protocol).
Some factors that might affect ping include: network protocol engineering, Internet connection speed, the quality of a user’s Internet service provider and the configuration of firewalls. Ping is also affected by geographical location. For instance, if someone is in India, playing on a server located in the United States, the distance between the two is greater than it would be for players located within the US, and therefore it takes longer for data to be transmitted. However, the amount of packet-switching and network hardware in between the two computers is often more significant. For instance, wireless network interface cards must modulate digital signals into radio signals, which is often more costly than the time it takes an electrical signal to traverse a typical span of cable.
Ping what is it
Ping is a command-line utility, available on virtually any operating system with network connectivity, that acts as a test to see if a networked device is reachable.
The ping command sends a request over the network to a specific device. A successful ping results in a response from the computer that was pinged back to the originating computer.
What does Ping stand for?
According to the author, the name Ping comes from sonar terminology. In sonar, a ping is an audible sound wave sent out to find an object. If the sound hits the object, the sound waves will reflect, or echo, back to the source. The distance and location of the object can be determined by measuring the time and direction of the returning sound wave.
Similarly, the ping command sends out an echo request. If it finds the target system, the remote host sends back an echo reply. The distance (number of hops) to the remote system can be determined from the reply, as well as the conditions in-between (packet loss and time to respond). While the author of the ping utility said the name of the program was simply based on the sound of sonar, others sometimes say that Ping is an acronym for Packet InterNet Groper.
How does Ping work?
The Ping utility uses the echo request, and echo reply messages within the Internet Control Message Protocol (ICMP), an integral part of any IP network. When a ping command is issued, an echo request packet is sent to the address specified. When the remote host receives the echo request, it responds with an echo reply packet.
By default, the ping command sends several echo requests, typically four or five. The result of each echo request is displayed, showing whether the request received a successful response, how many bytes were received in response, the Time to Live (TTL), and how long the response took to receive, along with statistics about packet loss and round trip times.
Ping message format
The echo request («ping») is structured as follows:
Byte 0 | Byte 1 | Byte 2 | Byte 3 |
Type (8 = IPv4, ICMP; 128 = IPv6, ICMP6) | Code | Header Checksum | |
Identifier | Sequence Number | ||
Payload |
The echo reply must include the exact payload received in the request:
Byte 0 | Byte 1 | Byte 2 | Byte 3 |
Type (0 = IPv4, ICMP; 129 = IPv6, ICMP6) | Code | Header Checksum | |
Identifier | Sequence Number | ||
Payload |
The Ping utility
The ping utility has been incorporated into virtually every operating system with network support. While echo request and echo reply are ICMP messages, the exact implementation of the Ping utility varies slightly among manufacturers.
In its simplest form, the ping utility can be run with nothing more than the ping command and a destination. The remote host can be specified either by name or address.
The following is the output of a simple ping to the target host paessler.com:
However, the ping utility also provides several customizable options.
Ping switches and variables
There are numerous switches available for the ping command that allow the default settings to be customized for more specific purposes. Unfortunately, there is no consistency across platforms for the different switches. For example, Windows uses a -n (number) to set how many pings to send, while most Unix systems use a -c (count).
Number (or count) – sets the number of echo requests, or pings, to be sent. By default, this number is four on most Windows systems, and five on most Unix systems. Setting a higher number allows the ping to continue to run either as a way of gathering more data, for example, to see if the reply time varies, or as a way of ensuring that a system continues to be responsive.
Timeout – changes the timeout before the utility waits for a reply from the destination. On Windows systems, the default value is 4,000 milliseconds, or 4 seconds.
Size – changes the size of the ping packet. The default value on Windows is 32 bytes, many Unix/Linux systems default to 64 bytes.
TTL – sets a different TTL.
Until stopped – keeps running the ping until stopped by the user (-t in Windows)
What Is “Ping”, and What Does Its Output Tell Me?
Ping is one of the oldest and most basic network
In concept, the tool is very, very simple: it sends out an “Are you there?” kind of request, and expects to hear back a “Yes, here I am!” kind of response.
Very basic, very simple, and yet very powerful as a first line of network troubleshooting.
The ping command line
The ping command runs in a Windows Command shell
For example, if you open a command window and type in “ping askleo.com”, you’ll see something like this:
Ping results
What’s your name?
There’s one usage that is not intuitive, but is something I use all the time. As you’ve seen above, ping can be used to translate a domain name quickly into its corresponding IP address (i.e. “askleo.com” into “50.28.23.175”). But it can also do the reverse:
When I add the “-a” switch to ping and give it an IP address, ping does what’s called a “reverse DNS lookup” and displays the domain name that is assigned to that IP address. This is very handy at times, since many IP addresses are also assigned fairly descriptive domain names.
Connectivity test
Aside from a quick tool for DNS and reverse-DNS look-ups, ping is most commonly used simply to verify basic connectivity between two machines. The ping service is typically one of the first and simplest services to be loaded onto a server, and runs independently of any other. Often, websites may be inaccessible because of a software problem, but the server on which they are hosted still responds to a ping. That helps determine that there isn’t a connectivity problem, but rather a problem on the server itself.
It’s also worth noting that some servers actively disable responding to ping requests, for assorted security-related reasons. For example, even though the server is most definitely up and running, you typically cannot ping “microsoft.com”, which times out; but on the other hand, you can ping “google.com”. In fact, pinging a site like “google.com” or “yahoo.com” is often a quick way to ensure that your own internet connection is, in fact, working.
A note about IPv6
The examples above all use the currently common IPv4 IP addresses: four numbers between 0 and 255 separated by periods. IPv6 is very slowly becoming more common. Pinging an IPv6 address will look different.
An IPv6 IP address is a series of hexadecimal numbers (digits 0-9, and a-f) separated by colons. Otherwise the functionality and results of a ping are the same.
Do this
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
Ping (What Is It, What Does It Mean, and How Does It Work) [MiniTool Wiki]
What Is Ping
Ping, a computer network administrator software utility, is often used to check the reachability of a host. The reachability includes two aspects. One is the availability, while the other is the response time. To obtain more information about ping, keep reading this post of MiniTool.
A ping request can be executed through a ping command that is standard in most command-line interfaces. What does ping mean? It is a utility that sends out the signal to another computer across a network and then receives the response from the computer that was pinged back to the original computer.
There are several network programs that offer the ping feature, which allow you to ping a server by typing the IP address or domain name. How to perform a ping request via ping command?
Simply put, you just need to type ping followed by a space and the IP address or domain name of the target host. If the IP address is 192.168.1.163, you should type ping 192.168.1.163 in the prompted command window.
Ping can be used in almost all operating systems that have the capability like built-in network administration software. How ping works? What is high/low/good ping? For more information, move to the next section of the post.
How Does Ping Work
The ping utility utilizes the echo request and echo replay messages within the Internet Control Message Protocol (ICMP). Though echo request and echo reply are ICMP messages, the exact implementation of the ping utility varies on different manufacturers.
Once the ping command is sent out, an echo request packet will be sent to the appointed address. When the remote host receives the echo request, it responds with an echo reply packet. If you don’t customize settings, the ping command sends several echo requests, usually four or five.
The result of each echo request is displayed, which shows you whether the request receives a successful response, how many bytes are received in response, the Time to Live (TTL), how long to receive the response, and the statistics related to packet loss and round-trip times.
What Is a Good Ping
It is reported that high ping is annoying and confusing. Many people are seeking methods to lower ping. Here comes the question. What is high ping? In fact, a ping of 150ms or more is regarded as high ping, while below 20ms is viewed as low ping.
What is a good ping? Well, the ping level can be categorized according to the ping response time.
If you don’t know what ping you possess, perform a ping check now.
Bottom Line
What is ping? How ping works? The ping definition and working principle have been illustrated in this post. After reading the article, you will have a comprehensive understanding of ping. Here comes the end of the post.
What is Ping command and how to use it?
What is Ping command?
Ping is a very universal command between all the operating systems. You can use it to test if you can reach your target and how much time it will take to do it. Ping sends Internet Control Message Protocol (ICMP) packets to the destination. Then it waits for the echo reply. It can show statistic for this request, errors and packet loss.
When you use this command, you will send few echo requests, usually 4. Then you will receive a result for each of them, that indicates if they were successful, how much data was received, the time it took for the response and TTL (Time to live).
How does it work?
Imagine the Ping command as an echo locater. When you use it on your computer, it sends a specific small packet with the ICMP ECHO_REQUEST to its destination (it could be a server, another computer on the network or a router). The recipient must bounce back the message, and send ECHO_REPLY as an answer.
Your computer will always have 127.0.0.1 IP address. If you try to ping it, you will always get fast result. The command will verify that the TCP/IP on your device is working fine.
You can use ping localhost and get the same result since it is the same.
If you get 4x Request timed out, then it is not working ok.
How to use Ping command?
You have the ping utility on whatever operating system you have.
On Windows, open the Command Prompt and on macOS and different Linux distros, open the Terminal.
There are small differences in the syntax of the ping command on the OSes. You can see them down below.
We will try to use it with www.google.com. Write the following:
The first part that you will see, who are you pinging, its IP address, and the packet’s size – 32 bytes.
After that, you will get 4 results. Ping sends 4 echo messages unless you specify a different number. Those 4 answers will have response times in ms – milliseconds and TTL value showing the time to live of the packet.
You will also get a few stats – completion rate that shows how many packets managed to arrive and a minimum, maximum, and average time.
Ping switches and variables
There are a lot of small differences when you use ping on Windows and Linux or macOS. For example, the option in Windows is “–n” and in Linux and macOS is “–c”. The best thing you can do is to check the syntax first. You can see all the available variables, switches, and options with a short command.
Ping command syntax for Windows
To get to the list of all possible options for the ping command on Windows, you can write in the Command Prompt:
It will give you a result with a full list of options that can make your troubleshooting easier.
Midifier/Option | What does it do? |
-t | Constant ping without stopping |
-a | Resolve an IP address to its hostname |
-n | Setting the number of echo messages. The default value is 4 |
-l | Use to send the size of the buffer |
-f | Stopping the fragmentation of the flag (IPv4-only) |
-i | Change the TTL value |
-v | Not functioning any more |
-r | Use it to see the number of hops and get a record (IPv4-only) |
-s | A timestamp for each hop (IPv4-only) |
-j | Loose source route along host-list (IPv4-only) |
-k | Strict source route along host-list (IPv4-only) |
-w | Setting the time that your device can wait for an answer |
-R | Check the reverse route (IPv6-only) |
-S | Source address to use |
-c | Routing compartment identifier |
-p | Ping a Hyper-V Network Virtualization provider address |
-4 | Use IPv4 only |
-6 | Use IPv6 only |
Ping command syntax for Linux and macOS
To get to the ping syntax on Linux or a computer with macOS, you need to type this in the Terminal:
Midifier/Option | What does it do? |
a | Makes a sound when it arrives at the target device |
b | This lets ping a broadcast IP address. |
B | Stops the ping from changing the source IP address. |
c (count) | Set the number of pings. |
d | SO-DEBUG on the used socket |
f | Floods the network with many ping packets a second. |
i (interval) | Interval, in seconds, between successful transmissions. |
I (interface address) | Defines the source IP address to a particular interface IP address. |
1 (preload) | Numbers of echoes sent without waiting for the replies. |
n | In the output, it shows hostname instead of IP addresses |
q | A quiet output. One-line ping and summary |
T (ttl) | T – time to live value (TTL) |
v | Verbose output |
V | Check the version of the ping command with it |
w (deadline) | Time for the exit, no matter the number of messages sent and received. |
W (timeout) | Waiting for response time (seconds) |
Troubleshooting
More examples of Ping command (Windows, Linux and macOS)
Here we have a few more use cases of ping command for Windows, Linux and macOS users:
*You can change the IP addresses of the examples or the hostnames and use them with yours. Also feel free to modify the command for your needs.
Interval – ping –i 5 8.8.8.8 (Linux)
This will make it wait 5 seconds before sending the following packet.
Custom number of pings – ping –n 8 google.com (Windows) ; ping google.com –c 8 (Linux and macOS)
You can decide how many echo messages to send.
Check version – ping –V (Linux)
You will see the version of the ping you have.
Flood – ping –f 127.0.0.1 (Linux)
This will flood the network with many pings.
Only Statistic – ping google.com –q (Linux and macOS)
It will show you just the statistic, not each individual ping time.
Change packet size – ping –s 100 google.com (Linux)
It will change the size of the packets. The original is 32 bytes (Windows) and 56 (Linux and macOS), and in this example we have set it to 100.
Timeout – ping –w 20 google.com (Linux)
If you use this example, the ping will exit in 20 seconds. It will terminate regardless of the number of packets send or received.
Constant ping – ping –t google.com (Windows) ; ping google.com (Linux and macOS)
It will run without stopping. Endless loop. On Linux and macOS, it runs forever by default. You can stop it with Ctrl+C.
Extra tip
Did you know that you can use the ping command online, straight from your browser? This can come in handy if you only have a mobile phone around.
Just google it, and you will see more than a few sites. If you decide to use it in this way, please make sure that the site you visit is safe, and it is not going to harm your device or personal data in any way.
Conclusion:
The ping is not the most sophisticated tool, but it is incredibly handy thanks to the fact it works on any device. Using it, you can quickly diagnose different part of the network and find the problem. You can also check our previous article and find more useful tools in our article Тools – DNS trace, Ping, Traceroute, Nslookup, Reverse lookup.
Hi, I’m Martin Pramatarov. I have two degrees, a Technician of Computer Networks and an MBA (Master of Business Administration). My passion is storytelling, but I can’t hide my nerdish side too. I never forgot my interest in the Hi-tech world. I have 10 years and thousands of articles written about DNS, cloud services, hosting, domain names, cryptocurrencies, hardware, software, AI, and everything in between. I have seen the Digital revolution, the Big migration to the cloud, and I am eager to write about all the exciting new tech trends in the following years. AI and Big Data are here already, and they will completely change the world!
I hope you enjoy my articles and the excellent services of ClouDNS!