Presentation is loading. Please wait.

Presentation is loading. Please wait.

Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute.

Similar presentations


Presentation on theme: "Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute."— Presentation transcript:

1 Internet Control Message Protocol (ICMP)

2 Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute

3 ICMP and IP

4 Why ICMP? l IP provides an unreliable, connectionless datagram delivery service. l Datagram travels from gateway to gateway until it reaches the destination host’s network, where it would be sent directly. l Question is: What happens if a gateway cannot route or deliver a datagram or if the gateway detects an unusual condition like network congestion?

5 Why ICMP? (cont.) l What mechanisms are there in TCP/IP suite for a gateway to inform the sender about an error in the IP Datagram deliver? l How do gateways use the mechanism to report delivery problems and how do hosts use it to test whether or not destinations are reachable?

6 Why ICMP? (cont.) l In a connectionless system each gateway operates autonomously, routing or delivering datagrams without any coordination from the sender. l When the system works well there is nothing to worry. l Murphy’s Law: If things can go wrong, they will.

7 Why ICMP? (cont.) l The designers separated such a mechanism from IP to simplify the main-stream IP. l The special-purpose mechanism --- Internet Control Message Protocol (ICMP) --- is considered a required part of IP and must be included in every IP implementation. l How do these ICMP messages travel?  of course using IP services

8 Why ICMP? (cont.) l The destination of an ICMP message is not an application program or user, but the IP software on that machine. l The ICMP allows gateways to send error or control messages to other gateways or hosts; ICMP provides communication between the IP software on one machine and the IP software on another.

9 Error Reporting vs. Error Correction l 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. l 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 ICMP Message Format l 8-bit integer message TYPE that identifies the message l 8-bit CODE field that provides further information about the message type l 16-bit CHECKSUM field (additive checksum covering the ICMP part of the message one’s complement sum of all 16-bit words in the header beginning with checksum of zero)

11 ICMP Message Encapsulation ICMP DATA DATAGRAM DATA AREA FRAME DATA AREA HEADER Physical layer

12 Message Types 0Echo Reply 3Destination Unreachable 4Source Quench 5Redirect (change a route) 8Echo Request 11Time Exceeded for a Datagram 12Parameter Problem on a Datagram

13 Message Types (cont.) 13Timestamp Request 14Timestamp Reply 15Information Request (obsolete) 16Information Reply (obsolete) 17Address Mask Request 18Address Mask Reply

14 ICMP Echo Request/Echo Reply l Testing Destination Reachability and Status  A debugging aid for network managers: echo request and echo reply (ping command) l Echo Request and Reply Message Format  TYPE8 for request  TYPE0 for reply

15 ICMP Formats (cont.) l Reports of Unreachable Destinations Unreachability of what? Code ValueMeaning ========================= 0network unreachable 1host unreachable 2protocol unreachable 3port unreachable

16 ICMP Formats (cont.) 4fragmentation needed and DF set 5source route failed 6destination network unknown 7destination host unknown 8source host isolated 9communication with destination network administratively prohibited 10communication with destination host administratively prohibited

17 Congestion and Datagram Flow Control l Usually, congested gateways send one source quench message for every datagram that they discard. l A source quench message is a request for the source to reduce its current rate of datagram transmission. l No reversal of ICMP source quench request. A host lowers the rate at which it sends on the receipt of a source quench messages; it then gradually increases the rate as long as no further source quench are received.

18 ICMP Source Quench Format Type (4) Code (0) Checksum Unused, must be zero Internet Header + First 64 bits of datagram...  Sent each time a datagram is discarded

19 ICMP Redirect Message Type (5) Code (0-3) Checksum Gateway Internet Address Internet Header + First 64 bits of datagram...

20 ICMP Redirect Message If Host A sends a packet destined to net3 to R2 Then 1.R2 relays the packet to R1 2.R2 sends ICMP redirect message to Host A 3.A should update its Routing Table with the entry (Network ID:net3; Next Hop: R1) net1net2net3 R1 R2 Host A

21 ICMP Time Exceeded message l sent whenever a datagram is discarded because TTL reached zero, using Type 11- Code 0 l sent when time set to collect fragments belonging to a particular packet expires, using Type 11 - Code 1

22 Clock Synchronization and Transit Time Estimation l A machine can obtain time from another machine, using timestamp request message. l Time stamp is a 32-bit quantity representing m-seconds elapsed since midnight. The receiving machine responds with timestamp reply message, which contains originate, receive, and transmit timestamps, with proper request-reply message association.

23 Obtaining a Subnet Mask A host can send an address mask request message to a gateway and receive address mask reply message. Such a message can be sent directly or broadcast, using type 17 for request 18 for reply, and code 0

24 Utilities that Use ICMP l PING: sends ICMP Echo Requests and monitors ICMP Echo Replies l TraceRoute: Sends a sequence of ICMP Echo Requests with increasing TTL values starting from 1 and monitors the ICMP Time Exceeded Messages (reported by routers along the path to destination) or ICMP Echo Reply from destination


Download ppt "Internet Control Message Protocol (ICMP). Objective l IP and ICMP l Why need ICMP? l ICMP Message Format l ICMP fields l Examples: »Ping »Traceroute."

Similar presentations


Ads by Google