Warning: mkdir() [
function.mkdir]: Permission denied in
/home/webs/affiliatelib2/CacheManager.php on line
12
Warning: mkdir() [
function.mkdir]: No such file or directory in
/home/webs/affiliatelib2/CacheManager.php on line
12
Warning: fopen(/home/templatecore2cache//*cluesnet.com/f9/f93180336fe1e437cc677a0bf624d6366833d81b.tc2cache) [
function.fopen]: failed to open stream: No such file or directory in
/home/webs/affiliatelib2/CacheManager.php on line
130
Warning: fwrite(): supplied argument is not a valid stream resource in
/home/webs/affiliatelib2/CacheManager.php on line
131
Warning: fclose(): supplied argument is not a valid stream resource in
/home/webs/affiliatelib2/CacheManager.php on line
132
ping is a computer network tool used to test whether a particular node (networking) is reachable across an Internet protocol suite network. It works by sending Internet Control Message Protocol “ICMP Echo Request” packets to the target host and listening for ICMP “echo response” replies. ping estimates the round-trip time, generally in
milliseconds, and records any packet loss, and prints a statistical summary when finished.
The word ping is also frequently used as a verb or noun, where it can refer directly to the round-trip time, the act of running a ping program or measuring the round-trip time.
History
Mike Muuss wrote the program in December, 1983, as a tool to troubleshoot odd behavior on an IP network. He named it after the pulses of sound made by a
sonar, since its operation is analogous to active sonar in submarines, in which an operator issues a pulse of energy (a network packet) at the target, which then bounces from the target and is received by the operator. Later
David L. Mills provided a
backronym, "
Packet
Inter
Net
Grouper (Groper)" (sometimes also defined as "
Packet
Inter-
Network
Groper).
The usefulness of ping in assisting the "diagnosis" of Internet connectivity issues was impaired from late in
2003, when a number of
Internet Service Providers filtered out ICMP Type 8 (
ICMP Echo Request) messages at their network boundaries. This was partly due to the increasing use of ping for target reconnaissance, for example by Computer worm such as
Welchia that flood the Internet with ping requests in order to locate new
Computers to infect. Not only did the availability of ping responses leak information to an attacker, it added to the overall load on networks, causing problems for routers across the Internet.
Although RFC 1122 prescribes that any host must accept an echo-request and issue an echo-reply in return, one finds that this standard is frequently not followed on the public Internet. Notably,
Windows XP SP1 will not respond to an echo request on the public Internet in the default configuration.
Proponents of not honoring echo requests say that this practice increases network security. However, attackers can and will send network packets to a machine, regardless of whether it responds to a ping. Those who insist that the standard be followed say that not honoring ping interferes with network diagnostics.
ICMP packet
{| class="wikitable" style="margin: 0 auto; text-align: center;"|-----! bgcolor="#FFCC99" | Bit 0 - 7! bgcolor="#FFCC99" | Bit 8 - 15! bgcolor="#FFCC99" | Bit 16 - 23! bgcolor="#FFCC99" | Bit 24 - 31|-----| bgcolor="#6666FF" | Version/IHL| bgcolor="#6666FF" | Type of service| bgcolor="#6666FF" colspan="2" | Length|-----| bgcolor="#6666FF" colspan="2" | Identification| bgcolor="#6666FF" colspan="2" |
flags et
offset|-----| bgcolor="#6666FF" | Time To Live(TTL)| bgcolor="#6666FF" | Protocol| bgcolor="#6666FF" colspan="2" | CRC|-----| bgcolor="#6666FF" colspan="4" | Source IP address|-----| bgcolor="#6666FF" colspan="4" | Destination IP address|-----| bgcolor="#FFAAAA" | Type of message| bgcolor="#FFAAAA" | Code| bgcolor="#FFAAAA" colspan="2" | CRC|-----| bgcolor="#FFAAAA" colspan="4" | Quench|-----| bgcolor="#FFCCCC" colspan="4" | Data (
optional)|}
Composition of a ping packet
- Header (in blue), with Protocol set to 1 and Type of Service set to 0.
- Type of ICMP message (8 bits)
- CRC (8 bits)
- CRC (16 bits), calculated with the ICMP part of the packet (the header is not used)
- Data load for the different kind of answers (Can be a arbitrary length, left to implementation detail. However must be less than the maximum MTU of the network)
Sample pinging
Sample with Linux
The following is a sample output of pinging en.wikipedia.org under
Linux with the iputils version of ping:
user@box ping en.wikipedia.org
PING rr.pmtpa.wikimedia.org (66.230.200.100) 56(84) bytes of data.
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=1 ttl=52 time=87.7 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=2 ttl=52 time=95.6 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=3 ttl=52 time=85.4 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=4 ttl=52 time=95.8 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=5 ttl=52 time=87.0 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=6 ttl=52 time=97.6 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=7 ttl=52 time=87.3 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=8 ttl=52 time=97.5 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=9 ttl=52 time=78.1 ms
64 bytes from rr.pmtpa.wikimedia.org (66.230.200.100): icmp_seq=10 ttl=52 time=79.5 ms
--- rr.pmtpa.wikimedia.babunlaut ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 8998ms
rtt min/avg/max/mdev = 78.162/89.213/97.695/6.836 ms
This output shows that en.wikipedia.org is a Domain Name System CNAME record for rr.pmtpa.wikimedia.org which then resolves to 66.230.200.100.
The output then shows the results of making 10 pings to 66.230.200.100 with the results summarized at the end. (To stop the program in Linux or Windows, press Ctrl+C.)
- shortest Round-trip delay time was 78.162 milliseconds
- average round trip time was 89.213 milliseconds
- maximum round trip time was 97.695 milliseconds
- Absolute deviation of the round-trip time was 6.836 milliseconds
Sample with Windows Vista
The following is a sample output of pinging en.wikipedia.org under Windows Vista with the command line:
localhost ping en.wikipedia.com
Pinging rr.pmtpa.wikimedia.org
66.230.200.100 with 32 bytes of data:
Reply from 66.230.200.100: bytes=32 time=57ms TTL=44
Reply from 66.230.200.100: bytes=32 time=59ms TTL=44
Reply from 66.230.200.100: bytes=32 time=59ms TTL=44
Reply from 66.230.200.100: bytes=32 time=54ms TTL=44
Ping statistics for 66.230.200.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 54ms, Maximum = 59ms, Average = 57ms
Sample of a successful ping to en.wikipedia.org
The following is a screenshot of a normal ping to Wikipedia.
Sample of an unsuccessful ping to en.wikipedia.org
The following is an image of an ICMP timeout on a Windows XP system. In this case, the result is caused by a network Access Control List that is denying all incoming ICMP traffic.
Message format
Echo request
The
echo request is an
Internet Control Message Protocol message whose data is expected to be received back in an
echo reply. The host must respond to all echo requests with an echo reply containing the exact data received in the request message.
{| class="wikitable"! 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07! 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15! 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23! 24 || 25 || 26 || 27 || 28 || 29 || 30 || 31|-|colspan="8" align="center"| Type = 8|colspan="8" align="center"| Code = 0|colspan="16" align="center"| Header Checksum|-|colspan="16" align="center"| Identifier|colspan="16" align="center"| Sequence Number|-|colspan="32" align="center"| Data :::|}
- Type must be set to 8.
- Code must be set to 0.
- The Identifier and Sequence Number can be used by the client to match the reply with the request that caused the reply.
- The data received by the Echo Request must be entirely included in the Echo Reply.
Echo reply
The
echo reply is an ICMP message generated in response to an echo request, and is mandatory for all hosts and routers.
{| class="wikitable"! 00 || 01 || 02 || 03 || 04 || 05 || 06 || 07! 08 || 09 || 10 || 11 || 12 || 13 || 14 || 15! 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23! 24 || 25 || 26 || 27 || 28 || 29 || 30 || 31|-|colspan="8" align="center"| Type = 0|colspan="8" align="center"| Code = 0|colspan="16" align="center"| Header Checksum|-|colspan="16" align="center"| Identifier|colspan="16" align="center"| Sequence Number|-|colspan="32" align="center"| Data :::|}
- Type and code must be set to 0.
- The identifier and sequence number can be used by the client to determine which echo requests are associated with the echo replies.
- The data received in the echo request must be entirely included in the echo reply.
In Gaming
In multiplayer games like
Unreal Tournament,
Quake etc. each player has an assigned statistic called 'ping'. It actually refers to the Lag of the connection between the player seeing the ping and the player for whom a specific ping value is displayed. The game carries out a ping process repeatedly, each ping separated by a specific amount of time and the time taken to complete that ping is what is displayed as the ping for the player.
See also
External links
- The Story of the PING Program by its author, Mike Muuss
-
- An overview of ping from Linux Journal Magazine
- Ping Wiki - Links to hundreds of web-based ping pages, sorted by Autonomous System Number.
- ICMP (Ping) Sequence Diagram (PDF) — Sequence diagram describes ping, trace route and other ICMP operations.
- Pingit Slightly more useful than standard ping, Free, Commandline, win32, Ping utility.
- HPing Command-line oriented TCP/IP packet assembler/analyzer
- How to ping screencast
- How to enable ICMP echo requests in Windows XP