0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Unused |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| As much of invoking packet |
+ as possible without the ICMPv6 packet +
| exceeding the minimum IPv6 MTU [IPv6] |
IPv6 Fields:
Destination Address
Copied from the Source Address field of the invoking
packet.
ICMPv6 Fields:
Type 3
Code 0 - Hop limit exceeded in transit
1 - Fragment reassembly time exceeded
Unused This field is unused for all code values.
It must be initialized to zero by the originator
and ignored by the receiver.
Description
If a router receives a packet with a Hop Limit of zero, or if a
router decrements a packet’s Hop Limit to zero, it MUST discard the
packet and originate an ICMPv6 Time Exceeded message with Code 0 to
the source of the packet. This indicates either a routing loop or
too small an initial Hop Limit value.
An ICMPv6 Time Exceeded message with Code 1 is used to report
fragment reassembly timeout, as specified in [IPv6, Section 4.5].
Upper Layer Notification
An incoming Time Exceeded message MUST be passed to the upper-layer
process if the relevant process can be identified (see Section 2.4,
(d)).
3.4. Parameter Problem Message
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Pointer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| As much of invoking packet |
+ as possible without the ICMPv6 packet +
| exceeding the minimum IPv6 MTU [IPv6] |
IPv6 Fields:
Destination Address
Copied from the Source Address field of the invoking
packet.
ICMPv6 Fields:
Type 4
Code 0 - Erroneous header field encountered
1 - Unrecognized Next Header type encountered
2 - Unrecognized IPv6 option encountered
Pointer Identifies the octet offset within the
invoking packet where the error was detected.
The pointer will point beyond the end of the ICMPv6
packet if the field in error is beyond what can fit
in the maximum size of an ICMPv6 error message.
Description
If an IPv6 node processing a packet finds a problem with a field in
the IPv6 header or extension headers such that it cannot complete
processing the packet, it MUST discard the packet and SHOULD
originate an ICMPv6 Parameter Problem message to the packet’s source,
indicating the type and location of the problem.
Codes 1 and 2 are more informative subsets of Code 0.
The pointer identifies the octet of the original packet’s header
where the error was detected. For example, an ICMPv6 message with a
Type field of 4, Code field of 1, and Pointer field of 40 would
indicate that the IPv6 extension header following the IPv6 header of
the original packet holds an unrecognized Next Header field value.
Upper Layer Notification
A node receiving this ICMPv6 message MUST notify the upper-layer
process if the relevant process can be identified (see Section 2.4,
(d)).
4. ICMPv6 Informational Messages
4.1. Echo Request Message
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identifier | Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data ...
+-+-+-+-+-
IPv6 Fields:
Destination Address
Any legal IPv6 address.
ICMPv6 Fields:
Type 128
Code 0
Identifier An identifier to aid in matching Echo Replies
to this Echo Request. May be zero.
Sequence Number
A sequence number to aid in matching Echo Replies
to this Echo Request. May be zero.
Data Zero or more octets of arbitrary data.
Description
Every node MUST implement an ICMPv6 Echo responder function that
receives Echo Requests and originates corresponding Echo Replies. A
node SHOULD also implement an application-layer interface for
originating Echo Requests and receiving Echo Replies, for diagnostic
purposes.
Upper Layer Notification
Echo Request messages MAY be passed to processes receiving ICMP
messages.
4.2. Echo Reply Message
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identifier | Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Data ...
+-+-+-+-+-
IPv6 Fields:
Destination Address
Copied from the Source Address field of the invoking
Echo Request packet.
ICMPv6 Fields:
Type 129
Code 0
Identifier The identifier from the invoking Echo Request message.
Sequence Number
The sequence number from the invoking Echo Request
message.
Data The data from the invoking Echo Request message.
Description
Every node MUST implement an ICMPv6 Echo responder function that
receives Echo Requests and originates corresponding Echo Replies. A
node SHOULD also implement an application-layer interface for
originating Echo Requests and receiving Echo Replies, for diagnostic
purposes.
The source address of an Echo Reply sent in response to a unicast
Echo Request message MUST be the same as the destination address of
that Echo Request message.
An Echo Reply SHOULD be sent in response to an Echo Request message
sent to an IPv6 multicast or anycast address. In this case, the
source address of the reply MUST be a unicast address belonging to
the interface on which the Echo Request message was received.
The data received in the ICMPv6 Echo Request message MUST be returned
entirely and unmodified in the ICMPv6 Echo Reply message.
Upper Layer Notification
Echo Reply messages MUST be passed to the process that originated an
Echo Request message. An Echo Reply message MAY be passed to
processes that did not originate the Echo Request message.
Note that there is no limitation on the amount of data that can be
put in Echo Request and Echo Reply Messages.
5. Security Considerations
5.1. Authentication and Confidentiality of ICMP Messages
ICMP protocol packet exchanges can be authenticated using the IP
Authentication Header [IPv6-AUTH] or IP Encapsulating Security
Payload Header [IPv6-ESP]. Confidentiality for the ICMP protocol
packet exchanges can be achieved using the IP Encapsulating Security
Payload Header [IPv6-ESP].
[SEC-ARCH] describes the IPsec handling of ICMP traffic in detail.
5.2. ICMP Attacks
ICMP messages may be subject to various attacks. A complete
discussion can be found in the IP Security Architecture [IPv6-SA]. A
brief discussion of these attacks and their prevention follows:
1. ICMP messages may be subject to actions intended to cause the
receiver to believe the message came from a different source from
that of the message originator. The protection against this
attack can be achieved by applying the IPv6 Authentication
mechanism [IPv6-AUTH] to the ICMP message.
2. ICMP messages may be subject to actions intended to cause the
message or the reply to it to go to a destination different from
that of the message originator’s intention. The protection
against this attack can be achieved by using the Authentication
Header [IPv6-AUTH] or the Encapsulating Security Payload Header
[IPv6-ESP]. The Authentication Header provides the protection
against change for the source and the destination address of the
IP packet. The Encapsulating Security Payload Header does not
provide this protection, but the ICMP checksum calculation
includes the source and the destination addresses, and the
Encapsulating Security Payload Header protects the checksum.
Therefore, the combination of ICMP checksum and the Encapsulating
Security Payload Header provides protection against this attack.
The protection provided by the Encapsulating Security Payload
Header will not be as strong as the protection provided by the
Authentication Header.
3. ICMP messages may be subject to changes in the message fields, or
payload. The authentication [IPv6-AUTH] or encryption [IPv6-ESP]
of the ICMP message protects against such actions.
4. ICMP messages may be used to attempt denial-of-service attacks by
sending back to back erroneous IP packets. An implementation that
correctly followed Section 2.4, paragraph (f), of this
specification, would be protected by the ICMP error rate limiting
mechanism.
5. The exception number 2 of rule e.3 in Section 2.4 gives a
malicious node the opportunity to cause a denial-of-service attack
to a multicast source. A malicious node can send a multicast
packet with an unknown destination option marked as mandatory,
with the IPv6 source address of a valid multicast source. A large
number of destination nodes will send an ICMP Parameter Problem
Message to the multicast source, causing a denial-of-service
attack. The way multicast traffic is forwarded by the multicast
routers requires that the malicious node be part of the correct
multicast path, i.e., near to the multicast source. This attack
can only be avoided by securing the multicast traffic. The
multicast source should be careful while sending multicast traffic
with the destination options marked as mandatory, because they can
cause a denial-of-service attack to themselves if the destination
option is unknown to a large number of destinations.
6. As the ICMP messages are passed to the upper-layer processes, it
is possible to perform attacks on the upper layer protocols (e.g.,
TCP) with ICMP [TCP-attack]. It is recommended that the upper
layers perform some form of validation of ICMP messages (using the
information contained in the payload of the ICMP message) before
acting upon them. The actual validation checks are specific to
the upper layers and are out of the scope of this specification.
Protecting the upper layer with IPsec mitigates these attacks.
ICMP error messages signal network error conditions that were
encountered while processing an internet datagram. Depending on
the particular scenario, the error conditions being reported might
or might not get solved in the near term. Therefore, reaction to
ICMP error messages may depend not only on the error type and code
but also on other factors, such as the time at which the error
messages are received, previous knowledge of the network error
conditions being reported, and knowledge of the network scenario
in which the receiving host is operating.
6. IANA Considerations
6.1. Procedure for New ICMPV6 Type and Code Value Assignments
The IPv6 ICMP header defined in this document contains the following
fields that carry values assigned from IANA-managed name spaces: Type
and Code. Code field values are defined relative to a specific Type
value.
Values for the IPv6 ICMP Type fields are allocated using the
following procedure:
1. The IANA should allocate and permanently register new ICMPv6 type
codes from IETF RFC publication. This is for all RFC types,
including standards track, informational, and experimental status,
that originate from the IETF and have been approved by the IESG
for publication.
2. IETF working groups with working group consensus and area director
approval can request reclaimable ICMPV6 type code assignments from
the IANA. The IANA will tag the values as "reclaimable in
future".
The "reclaimable in the future" tag will be removed when an RFC is
published that documents the protocol as defined in 1. This will
make the assignment permanent and update the reference on the IANA
web pages.
At the point where the ICMPv6 type values are 85% assigned, the
IETF will review the assignments tagged "reclaimable in the
future" and inform the IANA which ones should be reclaimed and
reassigned.
3. Requests for new ICMPv6 type value assignments from outside the
IETF are only made through the publication of an IETF document,
per 1 above. Note also that documents published as "RFC Editor
contributions" [RFC-3978] are not considered IETF documents.
The assignment of new Code values for the Type values defined in this
document require standards action or IESG approval. The policy for
assigning Code values for new IPv6 ICMP Types not defined in this
document should be defined in the document defining the new Type
values.
6.2. Assignments for This Document
The following has updated assignments located at:
http://www.iana.org/assignments/icmpv6-parameters
The IANA has reassigned ICMPv6 type 1 "Destination Unreachable" code
2, which was unassigned in [RFC-2463], to:
2 - Beyond scope of source address
The IANA has assigned the following two new codes values for ICMPv6
type 1 "Destination Unreachable":
5 - Source address failed ingress/egress policy
6 - Reject route to destination
The IANA has assigned the following new type values:
100 Private experimentation
101 Private experimentation
127 Reserved for expansion of ICMPv6 error messages
200 Private experimentation
201 Private experimentation
255 Reserved for expansion of ICMPv6 informational messages
7. References
7.1. Normative References
[IPv6] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 2460, December 1998.
[IPv6-DISC] Narten, T., Nordmark, E., and W. Simpson, "Neighbor
Discovery for IP Version 6 (IPv6)", RFC 2461, December
1998.
[RFC-792] Postel, J., "Internet Control Message Protocol", STD 5,
RFC 792, September 1981.
[RFC-2463] Conta, A. and S. Deering, "Internet Control Message
Protocol (ICMPv6) for the Internet Protocol Version 6
(IPv6) Specification", RFC 2463, December 1998.
[RFC-1122] Braden, R., "Requirements for Internet Hosts -
Communication Layers", STD 3, RFC 1122, October 1989.
[RFC-2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC-3978] Bradner, S., "IETF Rights in Contributions", BCP 78, RFC
3978, March 2005.
7.2. Informative References
[RFC-2780] Bradner, S. and V. Paxson, "IANA Allocation Guidelines
For Values In the Internet Protocol and Related
Headers", BCP 37, RFC 2780, March 2000.
[IPv6-ADDR] Hinden, R. and S. Deering, "Intpernet Protocol Version 6
(IPv6) Addressing Architecture", RFC 3513, April 2003.
[PMTU] McCann, J., Deering, S., and J. Mogul, "Path MTU
Discovery for IP version 6", RFC 1981, August 1996.
[IPv6-SA] Kent, S. and R. Atkinson, "Security Architecture for the
Internet Protocol", RFC 2401, November 1998.
[IPv6-AUTH] Kent, S., "IP Authentication Header", RFC 4302, December
2005.
[IPv6-ESP] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC
4203, December 2005.
[SEC-ARCH] Kent, S. and K. Seo, "Security Architecture for the
Internet Protocol", RFC 4301, December 2005.
[TCP-attack] Gont, F., "ICMP attacks against TCP", Work in Progress.
8. Acknowledgements
The document is derived from previous ICMP documents of the SIPP and
IPng working group.
The IPng working group, and particularly Robert Elz, Jim Bound, Bill
Simpson, Thomas Narten, Charlie Lynn, Bill Fink, Scott Bradner,
Dimitri Haskin, Bob Hinden, Jun-ichiro Itojun Hagino, Tatuya Jinmei,
Brian Zill, Pekka Savola, Fred Templin, and Elwyn Davies (in
chronological order) provided extensive review information and
feedback.
Bob Hinden was the document editor for this document.
Appendix A - Changes since RFC 2463
The following changes were made from RFC 2463:
- Edited the Abstract to make it a little more elaborate.
- Corrected typos in Section 2.4, where references to sub-bullet e.2
were supposed to be references to e.3.
- Removed the Timer-based and the Bandwidth-based methods from the
example rate-limiting mechanism for ICMP error messages. Added
Token-bucket based method.
- Added specification that all ICMP error messages shall have exactly
32 bits of type-specific data, so that receivers can reliably find
the embedded invoking packet even when they don’t recognize the
ICMP message Type.
- In the description of Destination Unreachable messages, Code 3,
added rule prohibiting forwarding of packets back onto point-to-
point links from which they were received, if their destination
addresses belong to the link itself ("anti-ping-ponging" rule).
- Added description of Time Exceeded Code 1 (fragment reassembly
timeout).
- Added "beyond scope of source address", "source address failed
ingress/egress policy", and "reject route to destination" messages
to the family of "unreachable destination" type ICMP error messages
(Section 3.1).
- Reserved some ICMP type values for experimentation.
- Added a NOTE in Section 2.4 that specifies ICMP message processing
rules precedence.
- Added ICMP REDIRECT to the list in Section 2.4, (e) of cases in
which ICMP error messages are not to be generated.
- Made minor editorial changes in Section 2.3 on checksum
calculation, and in Section 5.2.
- Clarified in Section 4.2, regarding the Echo Reply Message; the
source address of an Echo Reply to an anycast Echo Request should
be a unicast address, as in the case of multicast.
- Revised the Security Considerations section. Added the use of the
Encapsulating Security Payload Header for authentication. Changed
the requirement of an option of "not allowing unauthenticated ICMP
messages" to MAY from SHOULD.
- Added a new attack in the list of possible ICMP attacks in Section
5.2.
- Separated References into Normative and Informative.
- Added reference to RFC 2780 "IANA Allocation Guidelines For Values
In the Internet Protocol and Related Headers". Also added a note
that this document updates RFC 2780.
- Added a procedure for new ICMPv6 Type and Code value assignments in
the IANA Considerations section.
- Replaced word "send" with "originate" to make it clear that ICMP
packets being forwarded are out of scope of this specification.
- Changed the ESP and AH references to the updated ESP and AH
documents.
- Added reference to the updated IPsec Security Architecture
document.
- Added a SHOULD requirement for allowing the sending of ICMP
destination unreachable messages to be disabled.
- Simplified the source address selection of the ICMPv6 packet.
- Reorganized the General Message Format (Section 2.1).
- Removed the general packet format from Section 2.1. It refers to
Sections 3 and 4 for packet formats now.
- Added text about attacks to the transport protocols that could
potentially be caused by ICMP.
Authors’ Addresses
Alex Conta
Transwitch Corporation
3 Enterprise Drive
Shelton, CT 06484
USA
EMail: aconta@txc.com
Stephen Deering
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706