ICMP
ICMP
Example
• Workstation 1 is sending a datagram to Workstation 6
• Fa0/0 on Router C goes down
• Router C then utilizes ICMP to send a message back to Workstation 1
indicating that the datagram could not be delivered.
• ICMP does not correct the encountered network problem.
• Router C knows only the source and destination IP addresses of the
datagram, not know about the exact path the datagram took to Router
C, therefore, Router C can only notify Workstation 1 of the failure
• ICMP reports on the status of the delivered packet only to the source
device.
Rick Graziani [email protected] 7
ICMP message delivery
Type Field
Type Name Type Name
---- ------------------------- ---- -------------------------
0 Echo Reply 17 Address Mask Request
1 Unassigned 18 Address Mask Reply
2 Unassigned 19 Reserved (for Security)
3 Destination Unreachable 20-29 Reserved (for Robustness Experiment)
4 Source Quench
30 Traceroute
5 Redirect
31 Datagram Conversion Error
6 Alternate Host Address 32 Mobile Host Redirect
7 Unassigned 33 IPv6 Where-Are-You
8 Echo 34 IPv6 I-Am-Here
9 Router Advertisement 35 Mobile Registration Request
10 Router Solicitation 36 Mobile Registration Reply
11 Time Exceeded 37 Domain Name Request
12 Parameter Problem 38 Domain Name Reply
13 Timestamp 39 SKIP
14 Timestamp Reply 40 Photuris
41-255 Reserved
15 Information Request
16 Information Reply
Examples of problems:
• Sending device may address the datagram to a non-existent IP
address
• Destination device that is disconnected from its network.
• Router’s connecting interface is down
• Router does not have the information necessary to find the destination
network.
Echo = Type 8
Echo Reply = Type 0
• IP Protocol Field = 1
• The echo request message is typically initiated using the ping
command .
Rick Graziani [email protected] 15
For more information on Ping
Here are two options for more information on Ping:
• See my PowerPoint presentation: ICMP – Understanding Ping and Trace
• Read the book: The Story About Ping
by Marjorie Flack, Kurt Wiese (See a Amazon.com customer review on next
slide – very funny!
+--------------------+-------+---------+---------+
| OS Version |"safe" | tcp_ttl | udp_ttl |
+--------------------+-------+---------+---------+
AIX n 60 30 Assigned Numbers (RFC
DEC Pathworks V5 n 30 30
1700, J. Reynolds, J.
FreeBSD 2.1R y 64 64
HP/UX 9.0x n 30 30 Postel, October 1994):
HP/UX 10.01 y 64 64
Irix 5.3 y 60 60
IP TIME TO LIVE
Irix 6.x y 60 60 PARAMETER
Linux y 64 64
MacOS/MacTCP 2.0.x y 60 60
The current
OS/2 TCP/IP 3.0 y 64 64 recommended default
OSF/1 V3.2A n 60 30 time to live (TTL)
Solaris 2.x y 255 255 for the Internet
SunOS 4.1.3/4.1.4 y 60 60 Protocol (IP) is 64.
Ultrix V4.1/V4.2A n 60 30
VMS/Multinet y 64 64
VMS/TCPware y 60 64
VMS/Wollongong 1.1.1.1 n 128 30 Safe: TCP and UDP
VMS/UCX (latest rel.) y 128 128 initial TTL values
MS WfW n 32 32
MS Windows 95 n 32 32
should be set to a
MS Windows NT 3.51 n 32 32 "safe" value of at
MS Windows NT 4.0 y 128 128 least 60 today.
Rick Graziani [email protected] 19
IP Parameter Problem
ICMP Redirect 2
Type = 5 Code = 0 to 3 1 2
4
ICMP Redirect
Type = 5 Code = 0 to 3
ICMP Timestamp
Type = 13 or 14
• All ICMP timestamp reply messages contain the originate, receive and
transmit timestamps.
• Using these three timestamps, the host can estimate transit time across
the network by subtracting the originate time from the transit time.
• It is only an estimate however, as true transit time can vary widely
based on traffic and congestion on the network.
• The host that originated the timestamp request can also estimate the
local time on the remote computer.
• While ICMP timestamp messages provide a simple way to estimate time
on a remote host and total network transit time, this is not the best way
to obtain this information.
• Instead, more robust protocols such as Network Time Protocol (NTP)
at the upper layers of the TCP/IP protocol stack perform clock
synchronization in a more reliable manner.
Rick Graziani [email protected] 26
Information requests and reply message
formats
ICMP Information Request/Reply
Type = 15 or 16
Replaced by
• The ICMP information requests and reply
messages were originally intended to
allow a host to determine its network
number.
• This particular ICMP message type is
considered obsolete.
• Other protocols such as BOOTP and
Dynamic Host Configuration Protocol
(DHCP) are now used to allow hosts to
obtain their network numbers.
• Congestion can also occur for various reasons including when traffic
from a high speed LAN reaches a slower WAN connection.
• Dropped packets occur when there is too much congestion on a
network.
• ICMP source-quench messages are used to reduce the amount of data
lost.
• The source-quench message asks senders to reduce the rate at which
they are transmitting packets.
• In most cases, congestion will subside after a short period of time, and
the source will slowly increase the transmission rate as long as no other
source-quench messages are received.
• Most Cisco routers do not send source-quench messages by
default, because the source-quench message may itself add to the
network congestion. (See TCP)
Rick Graziani [email protected] 31
ICMP source-
quench messages
ICMP Source Quench
Type = 4
Information from:
Marc Slemko
Path MTU Discovery and Filtering ICMP
http://alive.znep.com/~marcs/mtu/
and
Cisco Systems
Path Maximum Transfer Unit (MTU) Discovery
http://www.cisco.com/en/US/products/sw/iosswrel/
ios_abcs_ios_the_abcs_ip_version_60900aecd800c1126.html
Path MTU
Discovery
Problem:
• How path MTU discovery (PMTU-D) combined with filtering ICMP
messages can result in connectivity problems.
• Path MTU discovery allows a node to dynamically discover and adjust
to differences in the MTU size of every link along a given data path.
• In IPv4, the minimum link MTU size is 68 octets and the recommended
minimum is 576 octets, which is the minimum reassembly buffer size.
• So, any IPv4 packet must be at least 68 octets in length.
• (In IPv6, the minimum link MTU is 1280 octets, but the recommended MTU value for
IPv6 links is 1500 octets. The maximum packet size supported by the basic IPv6 header
is 64,000 octets. Larger packets called jumbograms could be handled using a hop-by-
hop extension header option.)
Rick Graziani [email protected] 34
Path MTU Discovery - Terms
• DF (Don't Fragment) bit: This is a bit in the IP header that can be set to indicate
that the packet should not be fragmented by routers.
– If the packet needs to be fragmented, an ICMP "can't fragment" error is
returned sent to the sender and the packet is dropped.
• ICMP Can't Fragment Error:
– This error is a type 3 (destination unreachable), code 4 (fragmentation
needed but don't-fragment bit set)
– Returned by a router when it receives a packet that is too large for it to
forward and the DF bit is set.
– The packet is dropped and the ICMP error is sent back to the origin host.
– Normally, this tells the origin host that it needs to reduce the size of its
packets if it wants to get through.
– Recent systems also include the MTU of the next hop in the ICMP message
so the source knows how big its packets can be.
– Note that this error is only sent if the DF bit is set; otherwise, packets are just
fragmented and passed through.
Rick Graziani [email protected] 37
Terms