Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 K. Salah Module 5.3: Internet Control Message Protocol Why need ICMP? IP and ICMP ICMP Message Format ICMP Error Reporting messages ICMP Query messages.

Similar presentations


Presentation on theme: "1 K. Salah Module 5.3: Internet Control Message Protocol Why need ICMP? IP and ICMP ICMP Message Format ICMP Error Reporting messages ICMP Query messages."— Presentation transcript:

1 1 K. Salah Module 5.3: Internet Control Message Protocol Why need ICMP? IP and ICMP ICMP Message Format ICMP Error Reporting messages ICMP Query messages ICMPv6

2 2 K. Salah ICMP IP provides an unreliable, connectionless datagram delivery service. Datagram travels from gateway to gateway until it reaches the destination host’s network, where it would be sent directly. Question is: What happens if a gateway cannot route or deliver a datagram or if the gateway detects an unusual condition like network congestion? What mechanisms are there in TCP/IP suite for a gateway to inform the sender about an error in the IP Datagram deliver? How do gateways use the mechanism to report delivery problems and how do hosts use it to test whether or not destinations are reachable? In a connectionless system each gateway operates autonomously, routing or delivering datagrams without any coordination from the sender. Failures to communication lines and processors, or the expiry of time-to-live counter, or the congestion of intermediate gateways could disrupt the whole operation. The IP itself contains nothing to help sender test connectivity or learn about such failures. So we use ICMP.

3 3 K. Salah Encapsulation of ICMP message

4 4 K. Salah Format of ICMP message 16-bit CHECKSUM field (additive checksum covering the ICMP message (header + options (if any) + data) of the message one’s complement sum of all 16-bit words, with checksum originally being zero)

5 5 K. Salah Message Types 0Echo Reply 3Destination Unreachable 4Source Quench 5Redirect (change a route) 8Echo Request 9Router Advertisement 10Router solicitation 11Time Exceeded for a Datagram 12Parameter Problem on a Datagram 13Timestamp Request 14Timestamp Reply 15Information Request (obsolete) 16Information Reply (obsolete) 17Address Mask Request 18Address Mask Reply

6 6 K. Salah

7 7 Error Reporting Messages

8 8 K. Salah Data field for error messages

9 9 K. Salah Error Reporting vs. Error Correction ICMP only reports error conditions to the original source; the source must relate errors to individual application programs and take action to correct the problem. ICMP reports problems to the original source even if they are due to misbehaving intermediate gateways. This is due to the format of the IP header that has information about the source and destination and not the record of path.

10 10 K. Salah Destination Unreachable Code 0 – 15: 0 network unreachable, 1host unreachable, 2 protocol unreachable, 3 port unreachable, 4 fragmentation needed and DF set, 5 source route failed, 6 destination network unknown, 7 destination host unknown, 8 source host isolated, 9 communication with destination network administratively prohibited, 10 communication with destination host administratively prohibited.

11 11 K. Salah Source-Quench There is no flow-control mechanism in IP A source-quench message informs the source that a datagram has been discarded due to congestion in a router or the destination host. The source must slow down the sending of datagrams until the congestion is relieved. One source-quench message should be sent for each datagram that is discarded due to congestion.

12 12 K. Salah Time-Exceeded Code 0: Time to live, Code 1: Fragmentation Whenever a router receives a datagram whose time-to-live field has the value of zero, it discards the datagram and sends a time-exceeded message to the original source. When the final destination does not receive all of the fragments in a set time, it discards the received fragments and sends a time-exceeded message to the original source. Traceroute program. How it works? MTU Path Discovery? How it works?

13 13 K. Salah Parameter-Problem Code 0: Main header problem, Code 1: Problem in the option field –Bad header field or option field.

14 14 K. Salah Redirection If R2 was newly added, R1 forwards B message to R2 and tells host A to redirect future B messages to R2. Code field specifies redirect packet for host, for network, for host and TOS, and for network and TOS.

15 15 K. Salah Query Messages

16 16 K. Salah Echo-Request and Echo-Reply Ping program uses these to check if a host is alive. Note that Identifier and Sequence Number fields are used to match Request and replies.

17 17 K. Salah Timestamp-Request and Timestamp-Reply Timestamp is 32 bit field in ms. Original timestamp is filled by sender. Receive timestamp is filled by Receiver. Transmit timestamp is filled by receiver just before sending the Reply. Sending time = value of receive timestamp – value of original timestamp Receiving time = time the packet returned – value of transmit timestamp Round-trip time = sending time + receiving time

18 18 K. Salah Mask Request and Mask Reply This is used to obtain the network subnet mask. The Request can be sent directly to a router, or broadcast to on the network. This is used by diskless hosts and alternative to BOOTP and DHCP protocol

19 19 K. Salah Router Solicitation ICMP router discovery consists of Router Solicitation and Router Discovery Discovery is initiated by the host and only pertaining to discovering local routers on directly connected network. Router Solicitation has a multicast address of 224.0.0.2 Router Advertisement is sent in reply to Solicitation message, and also is sent periodically (as a multicast) every 10 minutes. Router Advertisement message can be sent by all routers or by one designated router.

20 20 K. Salah Router Advertisement List of IP addresses of routers that are available with a preference indicating for the host the priority of being used as a default router. Lifetime filed indicates the age of such information.

21 21 K. Salah ICMPv6 Type of MessageV4V6 Destination unreachableYes Yes Source quenchYesNo Packet too bigNoYes Time exceededYesYes Parameter problemYesYes RedirectionYes Yes Type of MessageV4V6 Echo request and replyYesYes Timestamp request and replyYesNo Address mask request and replyYesNo Router solicitation YesYes Neighbor solicitation ARP Yes Group membershipIGMPYes


Download ppt "1 K. Salah Module 5.3: Internet Control Message Protocol Why need ICMP? IP and ICMP ICMP Message Format ICMP Error Reporting messages ICMP Query messages."

Similar presentations


Ads by Google