background image
228 Chapter 5: Network Protocols
*
More likely to be on the CCNA exam.
Each ICMP message contains a Type field and a Code field, as shown in Figure 5-12. The Type
field implies the message types from Table 5-5. The Code field implies a subtype; serial
subtypes will be shown in the following examples.
Figure 5-12
ICMP Header Formats
Destination Unreachable ICMP Message
The five separate unreachable functions (codes) are accomplished using this single ICMP
unreachable message. All five code types pertain directly to some IP, TCP, or UDP feature and
are better described by using Figure 5-13 as an example network.
Assume that Fred is trying to connect to the Web server, which uses TCP as the transport layer
protocol. Three of the ICMP unreachable codes would possibly be used by Routers A and B.
The other two codes would be used by the Web server. These ICMP codes would be sent to Fred
as a result of the packet originally sent by Fred.
A code meaning "Network Unreachable" would be used by Router A if Router A did not have
a route to 10.1.2.0/24. The message would be sent by Router A to Fred, in response to Fred's
packet destined to 10.1.2.14.
*Redirect
The router sending this message has received some packet for
which another router would have had a better route; the message
tells the sender to use the better router.
*Echo
This is used by the ping command to verify connectivity.
Parameter Problem
This is used to identify a parameter that is incorrect.
Timestamp
This is used to measure roundtrip time to particular hosts.
Address Mask Request/Reply
This is used to inquire about and learn the correct subnet mask to
be used.
Router Advertisement and
Selection
This is used to allow hosts to dynamically learn the IP addresses
of the routers attached to the subnet.
Table 5-5
ICMP Message Types (Continued)
Message
Purpose
Variable ­
Depends on Type
and Code
Checksum
ICMP
Code
Type
IP
ch05.fm Page 228 Monday, March 20, 2000 5:06 PM