CyberArmy University | Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

[Library Index]

[View category: Networking] [Discuss Article]

What is ping?

Article is yet to be rated
Author:      d00m
Submitted:      20-Mar-2002 08:15:49
Imported From:      zZine (original author: d00m)


Purpose of PING:

PING is an application that makes use of the Internet Control Message Protocol (ICMP) protocol, and allows the user to test the reachability of another host.
Explanation: Given a host A and a host B. The host B is reachable from host A, if (IP) packets send by host A arrive at host B and can/are being processed by host B.

How PING works


The PING application uses ICMP messages to test the reachability, such ICMP messages are encapsulated in IP packets. The PING application uses two ICMP messages
1)the ICMP echo request message
2)the ICMP echo reply message

The source host sents an ICMP echo request to a router that router sents an ICMP echo request to another router until the ICMP echo request reaches the destination host. The destination host will sent an ICMP echo reply to a router, that router will sent an ICMP echo reply to another router until it reaches the source host. And that's how you get your ping reply ;)

When a PING message is received by the receiving host, it sends back an echo reply message in which the identifier, sequence number and optional data field are left unchanged.
The identifier field in the ICMP echo reply message is used to allow identification of the PING process running at the sending host.
By the sequence number field the sending host can keep track of for which ICMP echo request messages a reply massage has been received.

PING messages and Round Trip Time (RTT)


The optional data field is used to store the time at which the ICMP echo request message has been send. On receipt of the associated reply message the sending host can determine the time that was needed for the packet to travel through the Internet to the target host and back again: i.e. the round trip time (RTT).

For example: on IRC just type: "/ping nick" without the quotes and then you'll receive a message like this: "[nick PING reply]: 2sec". This means that it will take 2 seconds for the packet to travel through the Internet to the target host (nick) and back again.

This is it (a short one ,I know but i hope a useful one)
Enjoy !
d00m

This article was originally published by CyberArmy.net in the CyberArmy Library.

You must be logged in to vote on an article

About Us | Privacy Policy | Mission Statement | Help