Chapter 23 Internet Control Message Protocol • used to report information and errors • IP uses ICMP when it sends an error message • ICMP uses IP to transport messages
ICMP Error Messages (fig 23.1) • Source Quench • used by router when it has discarded datagram due to unavailable buffer memory. • sent to source computer requesting it to slow down rate of data transmission. • Time Exceeded • whenever the TIME TO LIVE field in a datagram is decremented to 0, the router discards the datagram and sends a time exceeded message • eg. Traceroute sends datagrams to a destination host with TIME TO LIVE field set to 1,2,3… so that routers along the path will send time exceeded message back, allowing source to know of path or routes taken by datagram.
ICMP Error Messages (cont.) • Destination Unreachable • sent by router to source host whenever router determines that a datagram cannot be delivered to its final destination. A “host unreachable” or “network unreachable” message is sent. • Redirect message • sent by router to source host whenever router determines that a host has incorrectly sent a datagram that should be sent to a different router. • Fragmentation required message • sent by a router to a source host if the router needs to fragment a datagram but the DO NOT FRAGMENT bit had been set in the datagram header. Such a datagram is discarded by the router.
ICMP Informational Messages • Echo Request message • sent to a computer by setting the PROTOCOL TYPE field in a IP header to 1, corresponding to ICMP • Used by Ping to test for reachability. • Echo Reply message • Sent by ICMP software on destination computer in response to echo request. • address mask request & reply message • can be broadcasted by host during bootup, asking for router to send an address mask reply that contains the correct 32-bit subnet mask for the network.
Encapsulation • ICMP messages are encapsulated in a IP datagram • IP datagram in turn is encapsulated in a frame.
Path MTU • the smallest MTU along a path from a source to a destination. • can be found by sending increasing larger datagrams with DO NOT FRAGMENT bit set in the FLAGS field in the IP datagram header. • Eventually a ICMP fragmentation required message will be sent by a router to the source computer.