1 / 14

Internet Control Message Protocol (ICMP)

Internet Control Message Protocol (ICMP). A short module on the Internet Control Message Protocol (ICMP). Overview. The IP (Internet Protocol) relies on several other protocols to perform necessary control and routing functions: Control functions (ICMP) Multicast signaling (IGMP)

vongj
Télécharger la présentation

Internet Control Message Protocol (ICMP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internet Control Message Protocol (ICMP) A short module on the Internet Control Message Protocol (ICMP).

  2. Overview • The IP (Internet Protocol) relies on several other protocols to perform necessary control and routing functions: • Control functions (ICMP) • Multicast signaling (IGMP) • Setting up routing tables (RIP, OSPF, BGP, PIM, …)

  3. Overview • The Internet Control Message Protocol (ICMP) is a helper protocol that supports IP with facility for • Error reporting • Simple queries • ICMP messages are encapsulated as IP datagrams:

  4. ICMP message format • 4 byte header: • Type (1 byte): type of ICMP message • Code (1 byte): subtype of ICMP message • Checksum (2 bytes): similar to IP header checksum. Checksum is calculated over entire ICMP message • If there is no additional data, there are 4 bytes set to zero.  each ICMP messages is at least 8 bytes long

  5. ICMP Query message • ICMP query: • Request sent by host to a router or host • Reply sent back to querying host

  6. Example of ICMP Queries Type/Code: Description 8/0 Echo Request 0/0 Echo Reply 13/0 Timestamp Request 14/0 Timestamp Reply 10/0 Router Solicitation 9/0 Router Advertisement The ping command uses Echo Request/ Echo Reply

  7. Example of a Query: Echo Request and 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 Hostor Router Host or router ICMP ECHO REQUEST ICMP ECHO REPLY

  8. A system (host or router) asks another system for the current time. Time is measured in milliseconds after midnight UTC (Universal Coordinated Time) of the current day The Sender (or Originate) Timestamp is the time the sender last touched the message before sending it, the Receive Timestamp is the time the echoer (receiver) first touched it on receipt, and the Transmit Timestamp is the time the echoer last touched the message on sending it. Sender sends a request, receiver responds with reply Example of a Query: ICMP Timestamp TimestampRequest Sender Receiver TimestampReply

  9. ICMP Error message • ICMP error messages report error conditions • Typically sent when a datagram is discarded • Error message is often passed from ICMP to the application program

  10. ICMP Error message • ICMP error messages include the complete IP header and the first 8 bytes of the payload (typically: UDP, TCP)

  11. Frequent ICMP Error message

  12. Some subtypes of the “Destination Unreachable”

  13. Example: ICMP Port Unreachable • RFC 792: If, in the destination host, the IP module cannot deliver the datagram because the indicated protocol module or process port is not active, the destination host may send a destination unreachable message to the source host. • Scenario: Request a serviceat a port 80 Client Server No process is waiting at port 80 Port Unreachable

  14. Traceroute – trace path of a datagram • How does traceroute use ICMP to figure out the path between two hosts? • Sends a datagram carrying a “zero payload” UDP packet to a fake (unknown) port number. • Sets the TTL value in IP header to 1. Results in an error, 1st router returns an ICMP with time exceeded error (TTL =0 and destination not yet reached). • Then it increments TTL to two, and repeats same procedure, except this time 2nd router returns error message. • And so on……. TTL continuously incremented. • When the datagram finally gets to the destination, the erroneous port number will generate an error message “port unreachable”. At this point traceroute is done.

More Related