Ping

Packet Internet Groper, commonly abbreviated as PING, is a diagnostic tool that tests connectivity between two nodes or devices across a network. PING verifies whether or not a network data packet is capable of being distributed to an address without having errors. It also determines the network accessibility of a specific IP address and is used in order to determine and ensure that a host computer which a user is trying to reach is really operating. Primarily, PING is used to troubleshoot internet connections.[1] In a nutshell, PING is commonly used to check the errors that the network has and it also simply means "to get the attention of" or "to check for the presence of".

Functionality

PING offers two primary objectives which are to check if the host is available and to measure how long the response will take. PING command is one of the most commonly used of the various command line interfaces. PING consists of a single packet which presents an echo request. If the host is available, it responds with a single packet. The time measurement for PING is quantified in milliseconds, this refers to the time for the packet to reach the host and for the response to go back to the sender.[2]

Moreover, PING uses Internet Control Message Protocol (ICMP). ICMP compensates for gaps in IP protocol by reporting an error. This is necessary for the system because IP protocol does not have a method of error reporting. This reports errors and expects higher layers of the OSI architecture model to handle and correct the errors. This PING program works much like a sonar echo-location that sends small packets of information containing ICMP ECHO_REQUEST to a specified computer and then sends an ECHO_REPLY in return.

Below are the steps of what usually happens when a user pings a machine.

  1. An ICMP echo-request message will be sent to the destination by the source.
  2. The program of PING will set a sequence identifier to get incremented with each of the echo-request messages.
  3. PING inserts the sending time in the data section of the message.
  4. It sends an ICMP echo-reply message back to the source if the host is alive and responding.
  5. The time of the arrival of the response message will be noted through PING, it uses the sending time in the message part and calculates the round-trip time.
  6. It increments the sequence identifier and sends a new echo-request message. This goes on for the number of PING requests set by the user or the program will be terminated.

A round-trip will be calculated by taking note of the local time of the source node clock when the IP datagram will leave the source node, and then it will be subtracted from the time at which the echo reply arrives.[3] The PING tool will display various error messages when a round-trip will be not completed successfully such as the following:

Unknown host

This determines if the IP address or hostnames that do not exist in the network or that the destination hostname cannot be resolved.

Destination host unreachable

This determines if the destination node is down or is not operating on the network. This may occur because of the non-existence of a local or remote route for the destination host.

TTL expired in transit

This indicates the maximum amount of time that an IP packet can live over the network before it will be discarded if it does not reach its destination.

Request time out

This determines when the PING command timed out because there was no reply from the host. This also determines that no echo reply messages were received because of network traffic, failure of address resolution protocol (ARP) request packet filtering or a router error.

Internet Network Diagnostic Tests

PING command can be used to perform several useful internet network diagnostic tests like the following:

Domain IP address

PING can be used to probe either a domain name or an IP address. It displays a corresponding IP address in the response.

Time and distance

PING command can be used to determine how long it takes to bounce a packet off of another site that tells the user the internet distance in network terms.

Access

PING can be used to check if the user can reach another computer device. If a user cannot PING at all but possible to PING other sites, it is an indication that the internet network is working but the site is down. However, if a user cannot really PING any site, then it indicates that the entire network connection is down because of a bad connection.

The following are considered as a good ping response time:

  • < 30 ms – excellent ping and ideal for online gaming.
  • 30 to 50 ms – average ping and still good for online gaming.
  • 50 to 100 ms – somewhat slow ping time and this affects online gaming.
  • 100 to 500 ms – slow ping and only has minimal effect on web browsing but creates a noticeable lag in online gaming.
  • 500 ms – pings of a half second or more will add a noticeable delay to all requests.

The PING utility output varies depending on the operating system. However, almost all PING outputs display the following:

  • Destination IP address
  • ICMP sequence number
  • Time to live (TTL)
  • Round-trip time
  • Payload size
  • The number of packets lost during transmission.

Most ping programs send multiple pings and provide an average of the pings at the end.[4]

History

In the year 1983, Mike Muuss created the PING tool. It has around one thousand lines of code and has become the standard packaged tool for several network applications and operating systems.[5] This tool was inspired by a remark by David Mills on using ICMP echo packets for IP network diagnosis and measurements. Mike Muus coined this tool name from the sound that the sonar makes because its methodology is similar to the echolocation of sonar.

Common Issues

There are several issues that concern many users. If the destination host is unreachable, the user must modify the local route table or switch the node on. If the host is unknown, the user must verify the name and availability of the domain name system (DNS) servers. If the TTL expired in transit, the user must increase TTL value by using the PING switch. If the request times out, the user must increase the waiting time by using the PING. Furthermore, the security risk is also a concern, to solve this, there are several systems that allow disabling the reply despite the fact that there is a mandate to always send a reply.


  1. https://www.webopedia.com/TERM/P/PING.html ↩︎

  2. https://techterms.com/definition/ping ↩︎

  3. https://www.techopedia.com/definition/2452/ping ↩︎

  4. https://techterms.com/definition/ping ↩︎

  5. https://www.techopedia.com/definition/2452/ping ↩︎