RFC 4443 - Internet Control Message Protocol (ICMPv6) for th

时间:2006-11-02 来源: 作者: 点击:
NetworkWorkingGroupA.Conta RequestforComments:4443Transwitch Obsoletes:2463 S.Deering Updates:2780 CiscoSystems Category:StandardsTrackM.Gupta,Ed. TroposNetworks March2006 InternetControlMessageProtocol(ICMPv6) fortheInternetProtocolVersion6(IPv6)Spe
  Network Working Group                                           A. Conta
Request for Comments: 4443                                    Transwitch
Obsoletes: 2463                                                      S. Deering
Updates: 2780                                                     Cisco Systems
Category: Standards Track                                  M. Gupta, Ed.
                                                                     Tropos Networks
                                                                             March 2006

               Internet Control Message Protocol (ICMPv6)
        for the Internet Protocol Version 6 (IPv6) Specification

Status of This Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2006).

Abstract

   This document describes the format of a set of control messages used
   in ICMPv6 (Internet Control Message Protocol).  ICMPv6 is the
   Internet Control Message Protocol for Internet Protocol version 6
   (IPv6).

Table of Contents

   1. Introduction ....................................................2
   2. ICMPv6 (ICMP for IPv6) ..........................................3
      2.1. Message General Format .....................................3
      2.2. Message Source Address Determination .......................5
      2.3. Message Checksum Calculation ...............................5
      2.4. Message Processing Rules ...................................5
   3. ICMPv6 Error Messages ...........................................8
      3.1. Destination Unreachable Message ............................8
      3.2. Packet Too Big Message ....................................10
      3.3. Time Exceeded Message .....................................11
      3.4. Parameter Problem Message .................................12
   4. ICMPv6 Informational Messages ..................................13
      4.1. Echo Request Message ......................................13
      4.2. Echo Reply Message ........................................14
   5. Security Considerations ........................................15
      5.1. Authentication and Confidentiality of ICMP Messages .......15
      5.2. ICMP Attacks ..............................................16
   6. IANA Considerations ............................................17
      6.1. Procedure for New ICMPV6 Type and Code Value Assignments ..17
      6.2. Assignments for This Document .............................18
   7. References .....................................................19
      7.1. Normative References ......................................19
      7.2. Informative References ....................................19
   8. Acknowledgements ...............................................20
   Appendix A - Changes since RFC 2463................................21

1. Introduction

   The Internet Protocol version 6 (IPv6) uses the Internet Control
   Message Protocol (ICMP) as defined for IPv4 [RFC-792], with a number
   of changes.  The resulting protocol is called ICMPv6 and has an IPv6
   Next Header value of 58.

   This document describes the format of a set of control messages used
   in ICMPv6.  It does not describe the procedures for using these
   messages to achieve functions like Path MTU discovery; these
   procedures are described in other documents (e.g., [PMTU]).  Other
   documents may also introduce additional ICMPv6 message types, such as
   Neighbor Discovery messages [IPv6-DISC], subject to the general rules
   for ICMPv6 messages given in Section 2 of this document.

   Terminology defined in the IPv6 specification [IPv6] and the IPv6
   Routing and Addressing specification [IPv6-ADDR] applies to this
   document as well.

   This document obsoletes RFC 2463 [RFC-2463] and updates RFC 2780
   [RFC-2780].

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC-2119].

2. ICMPv6 (ICMP for IPv6)

   ICMPv6 is used by IPv6 nodes to report errors encountered in
   processing packets, and to perform other internet-layer functions,
   such as diagnostics (ICMPv6 "ping").  ICMPv6 is an integral part of
   IPv6, and the base protocol (all the messages and behavior required
   by this specification) MUST be fully implemented by every IPv6 node.

2.1.  Message General Format

   Every ICMPv6 message is preceded by an IPv6 header and zero or more
   IPv6 extension headers.  The ICMPv6 header is identified by a Next
   Header value of 58 in the immediately preceding header.  (This is
   different from the value used to identify ICMP for IPv4.)

   The ICMPv6 messages have the following general format:

       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             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +                         Message Body                          +
      |                                                               |

   The type field indicates the type of the message.  Its value
   determines the format of the remaining data.

   The code field depends on the message type.  It is used to create an
   additional level of message granularity.

   The checksum field is used to detect data corruption in the ICMPv6
   message and parts of the IPv6 header.

   ICMPv6 messages are grouped into two classes: error messages and
   informational messages.  Error messages are identified as such by a
   zero in the high-order bit of their message Type field values.  Thus,
   error messages have message types from 0 to 127; informational
   messages have message types from 128 to 255.

   This document defines the message formats for the following ICMPv6
   messages:

      ICMPv6 error messages:

          1    Destination Unreachable      (see Section 3.1)
          2    Packet Too Big               (see Section 3.2)
          3    Time Exceeded                (see Section 3.3)
          4    Parameter Problem            (see Section 3.4)

          100  Private experimentation
          101  Private experimentation

          127  Reserved for expansion of ICMPv6 error messages

      ICMPv6 informational messages:

          128  Echo Request                 (see Section 4.1)
          129  Echo Reply                   (see Section 4.2)

          200  Private experimentation
          201  Private experimentation

          255  Reserved for expansion of ICMPv6 informational messages

   Type values 100, 101, 200, and 201 are reserved for private
   experimentation.  They are not intended for general use.  It is
   expected that multiple concurrent experiments will be done with the
   same type values.  Any wide-scale and/or uncontrolled usage should
   obtain real allocations as defined in Section 6.

   Type values 127 and 255 are reserved for future expansion of the type
   value range if there is a shortage in the future.  The details of
   this are left for future work.  One possible way of doing this that
   would not cause any problems with current implementations is that if
   the type equals 127 or 255, the code field should be used for the new
   assignment.  Existing implementations would ignore the new
   assignments as specified in Section 2.4, (b).  The new messages using
   these expanded type values could assign fields in the message body
   for its code values.

   Sections 3 and 4 describe the message formats for the ICMPv6 error
   message types 1 through 4 and informational message types 128 and
   129.

   Inclusion of, at least, the start of the invoking packet is intended
   to allow the originator of a packet that has resulted in an ICMPv6
   error message to identify the upper-layer protocol and process that
   sent the packet.

2.2.  Message Source Address Determination

   A node that originates an ICMPv6 message has to determine both the
   Source and Destination IPv6 Addresses in the IPv6 header before
   calculating the checksum.  If the node has more than one unicast
   address, it MUST choose the Source Address of the message as follows:

   (a) If the message is a response to a message sent to one of the
       node’s unicast addresses, the Source Address of the reply MUST be
       that same address.

   (b) If the message is a response to a message sent to any other
       address, such as

       - a multicast group address,
       - an anycast address implemented by the node, or
       - a unicast address that does not belong to the node

      the Source Address of the ICMPv6 packet MUST be a unicast address
      belonging to the node.  The address SHOULD be chosen according to
      the rules that would be used to select the source address for any
      other packet originated by the node, given the destination address
      of the packet.  However, it MAY be selected in an alternative way
      if this would lead to a more informative choice of address
      reachable from the destination of the ICMPv6 packet.

2.3.  Message Checksum Calculation

   The checksum is the 16-bit one’s complement of the one’s complement
   sum of the entire ICMPv6 message, starting with the ICMPv6 message
   type field, and prepended with a "pseudo-header" of IPv6 header
   fields, as specified in [IPv6, Section 8.1].  The Next Header value
   used in the pseudo-header is 58.  (The inclusion of a pseudo-header
   in the ICMPv6 checksum is a change from IPv4; see [IPv6] for the
   rationale for this change.)

   For computing the checksum, the checksum field is first set to zero.

2.4.  Message Processing Rules

   Implementations MUST observe the following rules when processing
   ICMPv6 messages (from [RFC-1122]):

   (a) If an ICMPv6 error message of unknown type is received at its
       destination, it MUST be passed to the upper-layer process that
       originated the packet that caused the error, where this can be
       identified (see Section 2.4, (d)).

   (b) If an ICMPv6 informational message of unknown type is received,
       it MUST be silently discarded.

   (c) Every ICMPv6 error message (type < 128) MUST include as much of
       the IPv6 offending (invoking) packet (the packet that caused the
       error) as possible without making the error message packet exceed
       the minimum IPv6 MTU [IPv6].

   (d) In cases where the internet-layer protocol is required to pass an
       ICMPv6 error message to the upper-layer process, the upper-layer
       protocol type is extracted from the original packet (contained in
       the body of the ICMPv6 error message) and used to select the
       appropriate upper-layer process to handle the error.

       In cases where it is not possible to retrieve the upper-layer
       protocol type from the ICMPv6 message, the ICMPv6 message is
       silently dropped after any IPv6-layer processing.  One example of
       such a case is an ICMPv6 message with an unusually large amount
       of extension headers that does not have the upper-layer protocol
       type due to truncation of the original packet to meet the minimum
       IPv6 MTU [IPv6] limit.  Another example is an ICMPv6 message with
       an ESP extension header for which it is not possible to decrypt
       the original packet due to either truncation or the
       unavailability of the state necessary to decrypt the packet.

   (e) An ICMPv6 error message MUST NOT be originated as a result of
       receiving the following:

       (e.1) An ICMPv6 error message.

       (e.2) An ICMPv6 redirect message [IPv6-DISC].

       (e.3) A packet destined to an IPv6 multicast address.  (There are
             two exceptions to this rule: (1) the Packet Too Big Message
             (Section 3.2) to allow Path MTU discovery to work for IPv6
             multicast, and (2) the Parameter Problem Message, Code 2
             (Section 3.4) reporting an unrecognized IPv6 option (see
             Section 4.2 of [IPv6]) that has the Option Type highest-
             order two bits set to 10).

       (e.4) A packet sent as a link-layer multicast (the exceptions
             from e.3 apply to this case, too).

       (e.5) A packet sent as a link-layer broadcast (the exceptions
             from e.3 apply to this case, too).

       (e.6) A packet whose source address does not uniquely identify a
             single node -- e.g., the IPv6 Unspecified Address, an IPv6
             multicast address, or an address known by the ICMP message
             originator to be an IPv6 anycast address.

   (f) Finally, in order to limit the bandwidth and forwarding costs
       incurred by originating ICMPv6 error messages, an IPv6 node MUST
       limit the rate of ICMPv6 error messages it originates.  This
       situation may occur when a source sending a stream of erroneous
       packets fails to heed the resulting ICMPv6 error messages.

       Rate-limiting of forwarded ICMP messages is out of scope of this
       specification.

       A recommended method for implementing the rate-limiting function
       is a token bucket, limiting the average rate of transmission to
       N, where N can be either packets/second or a fraction of the
       attached link’s bandwidth, but allowing up to B error messages to
       be transmitted in a burst, as long as the long-term average is
       not exceeded.

       Rate-limiting mechanisms that cannot cope with bursty traffic
       (e.g., traceroute) are not recommended; for example, a simple
       timer-based implementation, allowing an error message every T
       milliseconds (even with low values for T), is not reasonable.

       The rate-limiting parameters SHOULD be configurable.  In the case
       of a token-bucket implementation, the best defaults depend on
       where the implementation is expected to be deployed (e.g., a
       high-end router vs. an embedded host).  For example, in a
       small/mid-size device, the possible defaults could be B=10,
       N=10/s.

   NOTE: THE RESTRICTIONS UNDER (e) AND (f) ABOVE TAKE PRECEDENCE OVER
   ANY REQUIREMENT ELSEWHERE IN THIS DOCUMENT FOR ORIGINATING ICMP ERROR
   MESSAGES.

   The following sections describe the message formats for the above
   ICMPv6 messages.

3. ICMPv6 Error Messages

3.1.  Destination Unreachable 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             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             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           1

   Code           0 - No route to destination
                  1 - Communication with destination
                        administratively prohibited
                  2 - Beyond scope of source address
                  3 - Address unreachable
                  4 - Port unreachable
                  5 - Source address failed ingress/egress policy
                  6 - Reject route to destination

   Unused         This field is unused for all code values.
                  It must be initialized to zero by the originator
                  and ignored by the receiver.
   Description

   A Destination Unreachable message SHOULD be generated by a router, or
   by the IPv6 layer in the originating node, in response to a packet
   that cannot be delivered to its destination address for reasons other
   than congestion.  (An ICMPv6 message MUST NOT be generated if a
   packet is dropped due to congestion.)

   If the reason for the failure to deliver is lack of a matching entry
   in the forwarding node’s routing table, the Code field is set to 0.

   (This error can occur only in nodes that do not hold a "default
   route" in their routing tables.)

   If the reason for the failure to deliver is administrative
   prohibition (e.g., a "firewall filter"), the Code field is set to 1.

   If the reason for the failure to deliver is that the destination is
   beyond the scope of the source address, the Code field is set to 2.
   This condition can occur only when the scope of the source address is
   smaller than the scope of the destination address (e.g., when a
   packet has a link-local source address and a global-scope destination
   address) and the packet cannot be delivered to the destination
   without leaving the scope of the source address.

   If the reason for the failure to deliver cannot be mapped to any of
   other codes, the Code field is set to 3.  Example of such cases are
   an inability to resolve the IPv6 destination address into a
   corresponding link address, or a link-specific problem of some sort.

   One specific case in which a Destination Unreachable message is sent
   with a code 3 is in response to a packet received by a router from a
   point-to-point link, destined to an address within a subnet assigned
   to that same link (other than one of the receiving router’s own
   addresses).  In such a case, the packet MUST NOT be forwarded back
   onto the arrival link.

   A destination node SHOULD originate a Destination Unreachable message
   with Code 4 in response to a packet for which the transport protocol
   (e.g., UDP) has no listener, if that transport protocol has no
   alternative means to inform the sender.

   If the reason for the failure to deliver is that the packet with this
   source address is not allowed due to ingress or egress filtering
   policies, the Code field is set to 5.

   If the reason for the failure to deliver is that the route to the
   destination is a reject route, the Code field is set to 6.  This may
   occur if the router has been configured to reject all the traffic for
   a specific prefix.

   Codes 5 and 6 are more informative subsets of code 1.

   For security reasons, it is recommended that implementations SHOULD
   allow sending of ICMP destination unreachable messages to be
   disabled, preferably on a per-interface basis.

   Upper Layer Notification

   A node receiving the ICMPv6 Destination Unreachable message MUST
   notify the upper-layer process if the relevant process can be
   identified (see Section 2.4, (d)).

3.2.  Packet Too Big 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             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             MTU                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    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           2

   Code           Set to 0 (zero) by the originator and ignored by the
                  receiver.

   MTU            The Maximum Transmission Unit of the next-hop link.

   Description

   A Packet Too Big MUST be sent by a router in response to a packet
   that it cannot forward because the packet is larger than the MTU of
   the outgoing link.  The information in this message is used as part
   of the Path MTU Discovery process [PMTU].

   Originating a Packet Too Big Message makes an exception to one of the
   rules as to when to originate an ICMPv6 error message.  Unlike other
   messages, it is sent in response to a packet received with an IPv6
   multicast destination address, or with a link-layer multicast or
   link-layer broadcast address.

   Upper Layer Notification

   An incoming Packet Too Big message MUST be passed to the upper-layer
   process if the relevant process can be identified (see Section 2.4,
   (d)).

3.3.  Time Exceeded Message

       0                   1                   2                   3
------分隔线----------------------------
顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容