Transcript Chapter 9
Internet Protocol:
Error and Control Messages
Chapter 9
Internet Control Message
Protocol
• IP fails to deliver datagrams when:
– the destination machine is temporarily or permanently
disconnected from the network
– the TTL reaches zero
– intermediate routers are so congested that they can’t
process incoming data
• The sender does not know if failure to deliver is
the result of a local or a remote problem
• IP does not provide for the sender to test for
connectivity or reachability
Internet Control Message
Protocol
• ICMP is a special-purpose message mechanism
which:
– allows routers to report errors and provide information
about unexpected circumstances
– is required by IP and included in all IP implementations
• ICMP messages travel across the internet in the
data portion of IP datagrams
• The messages are bound for IP, but may be passed
to a higher-level protocol or application
Error Reporting vs.
Error Correcting
• When a router encounters an error, it can report it
to the original source
• The source can then respond and take corrective
action
• Why are intermediate routers not notified of the
error?
ICMP Message Delivery
• ICMP messages require two levels of
encapsulation as shown in Figure 9.1
ICMP hdr
IP hdr
Frame hdr
ICMP data
Datagram data area
Frame data area
ICMP Message Delivery
• ICMP messages are routed like other datagrams
and may themselves be lost or discarded
– In an already congested network, the error message
may cause additional congestion
– If a datagram carrying an ICMP message causes an
error, another ICMP message is not created. Why?
• Even though encapsulated, ICMP is not
considered a higher level protocol than IP
– The messages may need to travel over several physical
networks to get back to the original source…and?
ICMP Message Format
• All ICMP messages begin with the same 3 fields:
– Type field - 8 bits
– Code field - 8 bits providing more information about
the type
– Checksum field - 16 bits
• ICMP messages also contain the header and the
first 64 data bits of the datagram causing the
problem
– Good information in those first 64 bits about protocols
and application programs
ICMP Message Types
Type Field Message Type
0
3
4
5
8
9
10
11
Echo Reply
Destination Unreachable
Source Quench
Redirect (change a route)
Echo Request
Router Advertisement
Router Solicitation
Time Exceeded for a Datagram
ICMP Message Types
Type Field Message Type
12
13
14
15
16
17
18
Parameter Problem on a Datagram
Timestamp Request
Timestamp Reply
Information Request (not used)
Information Reply (not used)
Address Mask Request
Address Mask Reply
Summary
• Normal communication across an internet
involves sending messages from an application on
one host to an application on another host
• ICMP allows for communication from (usually) a
router to a host
• Types of messages:
–
–
–
–
source quench for slowing down rate of transmission
redirection for requesting a change in a routing table
echo request/reply for checking destination reachability
solicitation and advertisement for defaults in routing
For Next Time
• Exam
• Read Chapter 10 for the next class period