Wednesday, July 3, 2013

ICMP

Internet Control Message Protocol

IP relies on several protocols to performs control and routing functions:
- Control functions (ICMP)
- Multicast Signalling (IGMP)
- Setup routing tables (RIP, OSPF, BGP, PIM...)

ICMP is a helper protocol, that supports IP with facilities for:
==Error Reporting
==Simple Queries

ICMP messages are encapsulated as IP datagrams.
----------------------------------------
|  IP Header  |  ICMP payload message  |
----------------------------------------


4-byte header:
*Type (1 byte).
*Code (1 byte).
*Checksum (2 bytes).
If there is no additional data, 4-bytes are set as zero.
So Each ICMP is at least 8 bytes long.


ICMP query:
Request sent by host to a router or host.
Reply sent back to querying host.

Type/Code: 8/0: Echo Request
Type/Code: 0/0: Echo Reply

The ping command uses Echo Request / Echo Reply.

Ping's are handled directly by the kernel.
Each Ping is translated into an ICMP Echo Request.
The Ping'ed host responds with an ICMP Echo Reply.


No comments:

Post a Comment