170 likes | 184 Views
Explore the role of ICMP in IP, including control messages, error detection, and solutions to common networking problems. Learn about ICMP message types, transport, encapsulation, and how it aids in diagnosing network issues.
E N D
Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
IP Semantics • IP is best-effort • Datagrams can be • Lost • Delayed • Duplicated • Delivered out of order • Corrupted
Error Detection • IP does not • Introduce errors • Ignore all errors • Errors detected • Corrupted bits • Illegal addresses • Routing loops • Fragment loss
Problems and Solutions • Corrupted header bits • Header checksum • Illegal destination address • Routing tables • Routing loop • Time-To-Live (TTL) field • Fragment loss • Timeout
Internet Control Message Protocol (ICMP) • Separate protocol for • Errors • Information • Required part of IP • Sends error messages to original source
Example ICMP Messages • Source Quench • Sent by router • Triggered by datagram overrun • Requests sending host(s) to slow data
Example ICMP Messages (continued) • Time exceeded • Sent by router • TTL on datagram reached zero • Not a request for retransmission • Sent by host • Reassembly timeout (some fragments lost)
Example ICMP Messages (continued) • Destination unreachable • Specifies whether • Destination network unreachable • Destination host unreachable • Protocol port on destination unreachable
Example ICMP Messages (continued) • Redirect • Sent by router • Goes to host on local network • Host used incorrect initial router • Requests host to change routes
Example ICMP Messages (continued) • Echo request and reply • Not an error • Tests whether destination reachable • Request sent by ping program • Reply sent by ICMP on destination computer
ICMP Message Transport • Error messages go back to original source (may cross internet) • Messages carried in IP
Illustration of ICMP Message Encapsulation • Two levels of encapsulation • IP type field specifies ICMP
Avoiding an Infinite Loop • What happens if: • Datagram D causes an ICMP error message, I1 • Error message I1 causes another error, which generates ICMP message I2 • Message I2 generates another error, I3 • Error messages cascade • To avoid the problem • No error messages about ICMP error messages
Path MTU Discovery • IP datagram header contains a bit to specify no fragmentation allowed • ICMP sends an error message when fragmentation required but not permitted • Technique • Probe to find largest MTU that does not generate an error message • Note: MTU not generated if routes change
Summary • IP uses best-effort delivery semantics • IP includes mechanisms to detect errors • Header checksum • Time-to-live field
Summary (continued) • Internet Control Message Protocol • Has both error and informational messages • Closely integrated with IP • ICMP messages • Encapsulated in IP • Sent back to original source • Used by diagnostic programs like ping