Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Ping is a network diagnostic tool used primarily to test the connectivity between two nodes or devices. To ping a destination node, an Internet Control Message Protocol (ICMP) echo request packet is sent to that node. If a connection is available, the destination node responds with an echo reply. Ping calculates the round-trip time of the data packet's route from its source to the destination and back, and determines whether any packets were lost during the trip.
The network ping tool was created by Mike Muuss in 1983. It contains almost one thousand lines of code and has become the standard packaged tool for various network applications and operating systems.
The ping utility works by generating an ICMP data unit that is then encapsulated into IP datagrams and transmitted over the network. After receiving the echo request, the destination node copies its payload, destroys the original packet and generates an echo reply with the same payload it received.
The payload of the echo request packet often consists of American Standard Code for Information Interchange (ASCII) characters with variable adjustable lengths. Round-trip time is calculated by noting the local time of the source node clock when the IP datagram leaves the source node, then subtracting that time from the time at which the echo reply arrives.
Depending on the operating system, ping utility output varies. However, almost all ping outputs display the following:
The ping tool displays various error messages if a round trip is not completed successfully. They include the following: