How Ping Works ?

Summary:
++++++++++
At this point, you should have a fairly complete understanding of the cycle of processing associated with ping.
Let me recapitulate the essential elements:
• As the ping program initializes, it opens a raw ICMP socket so that it can employ IP directly, circumvent-
ing
TCP and UDP
.
• Ping formats an ICMP type 8 message, an Echo Request, and sends it (using the “sendto” function) to
the designated target address. The system provides the IP header and the data link layer envelope.
¶s ICMP messages are received,
ping has the opportunity to examine each pack
et to pick out those
items that are of interest.
• The usual behavior is to siphon off ICMP type 0 messages, Echo Replies, which have an identification
field v
alue that matches the program PID.

Author: swamy2064

M. Pavan Kumar Swamy, Completed Advanced course in Embedded Systems From Vector Institute[Hyderabad], From ELURU.

Leave a comment