Ping (data transfer)

from Wikipedia, the free encyclopedia

Ping is a diagnostic tool that allows you can check whether a particular host in an IP - network is reachable. In addition, most of today's implementations of this tool also specify the time span between sending a packet to this host and receiving a response packet that is immediately returned (=  packet cycle time , usually called round trip time or RTT ). The program is usually run as a console command. Ping was originally developed in late 1983 by Mike Muuss and first appeared in BSD 4.3 .


Ping sends an ICMP ( v6 ) "Echo Request" packet (ping, ICMP packet type 8 (0x08)) to the destination address of the host to be checked. The recipient must, if he supports the protocol, send back a response according to the protocol specification : ICMP "Echo-Reply" (pong, ICMP packet type 0 (0x00)). If the target computer cannot be reached, the responsible router replies : “Network unreachable” (network not accessible) or “Host unreachable” (remote station cannot be reached).

From a missing answer it cannot be concluded that the remote station could not be reached, as some hosts are configured in such a way that they ignore and discard ICMP packets; see: Security through obscurity , Firewall .

If the ping command is given a host name in FQDN notation instead of an IP address , the program lets the operating system resolve this. In the case of incorrect configurations ( hosts file, lmhosts file, WINS , DNS ) this fails after a waiting period ( timeout ) and results in an error message. If an IP address has been specified, a similar problem occurs in this situation, since the failure of the reverse resolution to determine the FQDN associated with the IP address must first be awaited. Depending on the implementation of ping, the reverse lookup can be switched off with an option or is deactivated by default.


Ping on the command line in Windows

Data packets are sent to the destination host . The program measures the time until the response from the host arrives. The time indicates how long a data packet needs to be sent to the host and back again ("response time average"). You can roughly see whether the routing to the remote station is working, its TCP / IP stack is working and what delay can be expected in a connection.

The TTL specification can be used to roughly estimate how many routers the ICMP packets have passed through (each router decrements the value by at least 1, whereby the initial value can be 64, 128 etc. depending on the implementation).

Round trip delay

The packet cycle time is referred to as round trip delay ( RTD ), round-trip-time ( RTT ) and in German often shortened as ping duration , ping time or simply ping . This measured latency includes both the distance-dependent electrical signal propagation time and the processing time in the routers acting as intermediate stations, as well as the processing time in the TCP / IP stacks of the sending and target computers. On connections with a high load, the times increase due to send queues in the respective routers.

The distance between any two points on the earth's surface is given by the associated orthodrome . If you divide the distance by the transmission speed and then multiply the result by two (because of the time calculation for the way there and back), you get the minimum possible RTT. Example: The distance between Berlin and Tokyo is 8941.2 km. If one assumes a transmission with the speed of light (in a vacuum approx. 300,000 km / s), the minimum possible packet cycle time of approx

A more realistic value for the speed would be around 150,000 km / s, if one takes into account the reduced speed of light in the matter ( glass fiber ) and delays at transfer stations, routers and switches. Assuming this more realistic speed and the direct line path, the result is a minimum ping time of around 120 ms.

In practice, however, the value is much higher. This results in transit times of around 200 to 300 ms between Berlin and Tokyo, as some connections from Europe to Asia are not routed directly but via the United States .

Only hosts with known response behavior can be sensibly used for runtime measurement, since many network devices ( routers , switches ) often only react slowly to ICMP requests, as they have not been optimized for this or attempt to rule out attack scenarios by delayed pings (see firewall ).

origin of the name

The name "ping" comes from military technology. Since the Second World War is sonar used submarines to detect. The sound signal emitted in the process sounds like a high-pitched knocking noise in a submarine, which is described as a "ping".

The ping program uses a series of Internet Control Message Protocol (ICMP) echo messages to check whether a remote host computer is active or inactive. Like many other contributions to the development of the Internet, it was made available as a so-called Request for Comment (RFC) to the Internet Engineering Task Force (IETF) (see RFC 4560 , RFC 2925 , RFC 1739 ). “Ping” is often represented as an abbreviation for “Packet Internet Groper”. However, the author of the program himself said: "From my point of view, PING is not an acronym for 'Packet InterNet Grouper', but an analogy to sonar."

Related programs

In the widespread Unix- like Linux system, there are also some programs that work in a similar way to ping:

  • bing (also measures the transmission rate)
  • fping(can ping several computers at the same time, see also broadcast )
  • hping (allows the manipulation of protocols, ports and flags)
  • arping(also reads the MAC address in the local network )
  • mtr (combines the functionality of "traceroute" and "ping" in one network diagnostic program)
  • httping (determines the response time for a URL)
  • ping6(previously used in Linux for IPv6, now reunited with ping)

In the Windows operating system there are troubleshooting options in the routed network :

See also

Web links

Individual evidence

  1. RFC 1208 - A Glossary of Networking Terms . 1991 p. 13 , entry on "ping: Packet internet groper"
  2. ^ Michael John Muuss ( Mike Muuss ): The Story of the PING Program . United States Army Research Laboratory. Archived from the original on September 8, 2010. Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. Retrieved on March 21, 2012: "From my point of view PING is not an acronym standing for Packet InterNet Grouper, it's a sonar analogy." @1@ 2Template: Webachiv / IABot /