0% found this document useful (0 votes)
10 views33 pages

CCNA2 Mod08

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views33 pages

CCNA2 Mod08

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved.

1
ICMP Error & Control Messages
CCNA 2 v3.0: Module 8; 8.1-8.2

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 2
Internet Control Message Protocol

• ICMP is tightly integrated in the TCP/IP


protocol suite.
 It reports on IP deliver problems.
 It is automatically installed with IP at the
network layer.
• ICMP messages are encapsulated in a IP
packet so it can use the information
contained in an IP header.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 3
IP Packet Header

Right click on graphic to play.


ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 4
Select ICMP Request For Comments

• ICMP was originally defined in RFC 792


 See RFCs 950, 1122, 1256, 1393, 1812, and
2521 for additional information.
 For a quick link to all RFCs, go to http://
www.ietf.org/rfc and type in the RFC number.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 5
What ICMP can and cannot do
• ICMP does not know the path a packet took on
its way to the destination.
 It cannot report error or control messages to other
routers along the path to the destination.
 ICMP can only report to the source or the destination.
 Failed ICMP message delivery is not reported.

Right click on graphic to play.


ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 6
Conditions Necessary for Delivery Success
• Before a host can successfully deliver packets to a destination,
the following conditions must be meet.
 The source and destination are configured with the TCP/IP
stack, an IP address, subnet mask, and default gateway (DG).
 Routers along the path are configured with the TCP/IP stack
and a routing process.
 The path must also be converged.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 7
The ICMP Packet
• ICMP messages are contained within the IP
packet that original caused .
 Common fields to all ICMP messages are “Type” and
“Code”.
 Most messages also include a “Checksum”.
 If the ICMP Packet is an error message, it should
include up to 576 bytes of the original packet’s data

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 8
ICMP Message Types

• Below is a table of the more popular ICMP


messages types.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 9
Most Common ICMP Messages

• ICMP Query Messages: • ICMP Error Messages:


 Echo (Ping)  Destination Unreachable
 Information  Redirect
 Timestamp  Source Quench
 Address Mask  Time Exceeded
 Router Discovery  Parameter Problem

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 10
Ping Uses Two ICMP Messages
• You are already familiar with two ICMP message types.
 The ping command both on PCs and routers uses two ICMP
messages: Echo Requests (Type 8) and Replies (Type 0)

Right click on graphic to play.


ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 11
Echo Request and Reply
• Below is the ICMP header for echo messages.
These fields are in most other ICMP types.
 Type 8 (request); Type 0 (reply)
 Code is set to 0.
 The checksum field checks the integrity of the header.
 Identifier and Sequence number used to match replies
with requests.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 12
Information Request and Reply

• Originally intended to support a disk-less


workstation’s need to obtain an IP
address.
 Obsoleted by better methods such as BOOTP,
RARP and DHCP.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 13
Timestamp Request and Reply
• Provides time information for
synchronizing a connection between the
source and destination.
 Although still used, it has been largely
replaced by the Application Layer protocol,
Network Time Protocol (RFC 1305).

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 14
Address Mask Request and Reply
• Used by hosts to discover their subnet mask.
 If the default gateway is known, then the host sends the
request to that IP address.
 If unknown, host sends the request as a broadcast
(255.255.255.255).
• The router will respond with the appropriate subnet mask for
the network segment on which the host resides.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 15
Router Advertisement

• Used by routers to inform a host of its default


gateway(s).
• Router Advertisements and Router Solicitations
together are know as the ICMP Router Discovery
Protocol (IRDP).
 When first booting, hosts need a default gateway.
 If some other protocol (e.g. DHCP) has not taken care
of this need, the host may also listen for router
advertisements from local routers.
 ICMP Header format on next slide.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 16
Router Advertisement

• Below is the ICMP header format for the Router


Advertisement control message.
 Routers must advertise at least one router address
and preference level.
 Additional router addresses/preferences can be added.
 Higher values in preference field indicate more
preferable.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 17
Router Solicitation
• Avoids having to configure a host statically with a list of
default gateways on multicast links.
 Host sends solicitations to multicast address 224.0.0.2.
 If no advertisement response is received, the host can
broadcast the solicitation for up to a predefined number of
times. Then it must stop to avoid network congestion.
• Routers are configured to reply to router solicitation
messages by sending router advertisements.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 18
Destination Unreachable Error
• This message is generated by a router to inform
the source host that the destination address is
unreachable.
 Like most ICMP error messages, this one includes
IP header information and the first 8 bytes of the
original packet. Below is the ICMP header format.
 All 16 bits of the Code field have been specified and are
describe in the next slide.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 19
Destination Unreachable Codes

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 20
Redirect

• This message type is


best explained with a
graphic.
 Host A’s default
gateway is R1.
 Best route to Host B
is via R2.
 R1 sends a redirect
to Host A.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 21
Redirect Message Format
• Below is the message format and codes
for Redirect messages.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 22
Source Quench
• When a router or destination host detects
excessive congestion on a link, it may send back
an optional Source Quench message.
 The source then slows down the speed of data
transfer.
 For example, sending data out on to a slower WAN
link, as shown in the graphic.

Right click on graphic to play.


ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 23
Source Quench Message Format

• Below is the ICMP header format for a Source


Quench message.
 Looks the same as the Destination Unreachable
message except for the Type field.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 24
Time Exceeded
• Remember: The IP header has a TTL field that is
decremented at each hop.
 If the value reaches zero, the detecting router drops
the packet and sends a Time Exceeded ICMP message
to the source (Example: RIP’s Hop Count Limit)

Right click on graphic to play.


ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 25
Time Exceeded Message Format
• Below is the ICMP header format for the Time
Exceed message.
 Two Codes:
 0; TTL reached zero
 1; Fragment reassembly timeout

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 26
Parameter Problem
• A Parameter Problem is caused by data in the
header that cannot be processed further,
causing the packet to be dropped.
 An invalid IP header (Code 0) or a required missing
option (Code 1) would cause a parameter problem.
 Neither the network nor the destination host is the
cause of the problem.
 Checksum errors in the header are NOT reported. The
packet is simply dropped.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 27
Traceroute

• Although traceroute is covered in Module


9, students should know that traceroute
replies are actually an ICMP type.
 The last four slides of this presentation
explain the operation of traceroute.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 28
Traceroute is an ICMP Message Type

• Traceroute uses the TTL field in the IP header to


trace each hop to the destination.
 The first hop is traced by sending 3 UDP packets with
the TTL value set to 1.
 The first hop router will decrement the value to zero,
drop the packets, and send back three ICMP traceroute
messages to the source.
 Now the source knows the IP address to the first hop
and the time each packet took to complete the round-
trip.
 The source then proceeds to send 3 more UDP
packets with the TTL value set to 2.
 Each subsequent round of three packets will increase
the TTL value until the destination is reached.
ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 29
Traceroute Request in IP Header Option
• The UDP packets sent are identified as traceroute packets
from the option field in the IP header.
 RFC 1393 defines the following information to be included
in the IP header in the Options field.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 30
Traceroute Reply Message Format

• Each hop that drops the UDP packet


knows the packet was a traceroute
because of the Option field.
 It then must send back RFC 1393’s defined
ICMP traceroute reply.

ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 31
Traceroute Output to the Source

• Below is an example of trace output on a


router’s terminal window.

Right click on graphic to play.


ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 32
ICMP Error & Control Messages © 2003, Cisco Systems, Inc. All rights reserved. 33

You might also like