home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit v2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Texts / Rfc / RFC1883.TXT < prev    next >
Text File  |  1999-11-04  |  82KB  |  2,110 lines

  1. Network Working Group                             S. Deering, Xerox PARC
  2. Request for Comments: 1883                  R.  Hinden, Ipsilon Networks
  3. Category: Standards Track                                  December 1995
  4.  
  5.  
  6.  
  7.  
  8.                   Internet Protocol, Version 6 (IPv6)
  9.                              Specification
  10.  
  11.  
  12.  
  13.  
  14.  
  15. Status of this Memo
  16.  
  17.    This document specifies an Internet standards track protocol for the
  18.    Internet community, and requests discussion and suggestions for
  19.    improvements.  Please refer to the current edition of the "Internet
  20.    Official Protocol Standards" (STD 1) for the standardization state
  21.    and status of this protocol.  Distribution of this memo is unlimited.
  22.  
  23.  
  24. Abstract
  25.  
  26.  
  27.    This document specifies version 6 of the Internet Protocol (IPv6),
  28.    also sometimes referred to as IP Next Generation or IPng.
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. Deering & Hinden            Standards Track                     [Page 1]
  53.  
  54.  
  55. RFC 1883                   IPv6 Specification              December 1995
  56.  
  57.  
  58. Table of Contents
  59.  
  60.    1. Introduction..................................................3
  61.  
  62.    2. Terminology...................................................4
  63.  
  64.    3. IPv6 Header Format............................................5
  65.  
  66.    4. IPv6 Extension Headers........................................6
  67.        4.1 Extension Header Order...................................8
  68.        4.2 Options..................................................9
  69.        4.3 Hop-by-Hop Options Header...............................11
  70.        4.4 Routing Header..........................................13
  71.        4.5 Fragment Header.........................................19
  72.        4.6 Destination Options Header..............................24
  73.        4.7 No Next Header..........................................25
  74.  
  75.    5. Packet Size Issues...........................................26
  76.  
  77.    6. Flow Labels..................................................28
  78.  
  79.    7. Priority.....................................................30
  80.  
  81.    8. Upper-Layer Protocol Issues..................................31
  82.        8.1 Upper-Layer Checksums...................................31
  83.        8.2 Maximum Packet Lifetime.................................32
  84.        8.3 Maximum Upper-Layer Payload Size........................32
  85.  
  86.    Appendix A. Formatting Guidelines for Options...................33
  87.  
  88.    Security Considerations.........................................36
  89.  
  90.    Acknowledgments.................................................36
  91.  
  92.    Authors' Addresses..............................................36
  93.  
  94.    References......................................................37
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. Deering & Hinden            Standards Track                     [Page 2]
  110.  
  111.  
  112. RFC 1883                   IPv6 Specification              December 1995
  113.  
  114.  
  115. 1.  Introduction
  116.  
  117.    IP version 6 (IPv6) is a new version of the Internet Protocol,
  118.    designed as a successor to IP version 4 (IPv4) [RFC-791].  The
  119.    changes from IPv4 to IPv6 fall primarily into the following
  120.    categories:
  121.  
  122.       o  Expanded Addressing Capabilities
  123.  
  124.          IPv6 increases the IP address size from 32 bits to 128 bits, to
  125.          support more levels of addressing hierarchy, a much greater
  126.          number of addressable nodes, and simpler auto-configuration of
  127.          addresses.  The scalability of multicast routing is improved by
  128.          adding a "scope" field to multicast addresses.  And a new type
  129.          of address called an "anycast address" is defined, used to send
  130.          a packet to any one of a group of nodes.
  131.  
  132.       o  Header Format Simplification
  133.  
  134.          Some IPv4 header fields have been dropped or made optional, to
  135.          reduce the common-case processing cost of packet handling and
  136.          to limit the bandwidth cost of the IPv6 header.
  137.  
  138.       o  Improved Support for Extensions and Options
  139.  
  140.          Changes in the way IP header options are encoded allows for
  141.          more efficient forwarding, less stringent limits on the length
  142.          of options, and greater flexibility for introducing new options
  143.          in the future.
  144.  
  145.       o  Flow Labeling Capability
  146.  
  147.          A new capability is added to enable the labeling of packets
  148.          belonging to particular traffic "flows" for which the sender
  149.          requests special handling, such as non-default quality of
  150.          service or "real-time" service.
  151.  
  152.       o  Authentication and Privacy Capabilities
  153.  
  154.          Extensions to support authentication, data integrity, and
  155.          (optional) data confidentiality are specified for IPv6.
  156.  
  157.    This document specifies the basic IPv6 header and the initially-
  158.    defined IPv6 extension headers and options.  It also discusses packet
  159.    size issues, the semantics of flow labels and priority, and the
  160.    effects of IPv6 on upper-layer protocols.  The format and semantics
  161.    of IPv6 addresses are specified separately in [RFC-1884].  The IPv6
  162.    version of ICMP, which all IPv6 implementations are required to
  163.    include, is specified in [RFC-1885].
  164.  
  165.  
  166. Deering & Hinden            Standards Track                     [Page 3]
  167.  
  168.  
  169. RFC 1883                   IPv6 Specification              December 1995
  170.  
  171.  
  172. 2.  Terminology
  173.  
  174.    node        - a device that implements IPv6.
  175.  
  176.    router      - a node that forwards IPv6 packets not explicitly
  177.                  addressed to itself.  [See Note below].
  178.  
  179.    host        - any node that is not a router.  [See Note below].
  180.  
  181.    upper layer - a protocol layer immediately above IPv6.  Examples are
  182.                  transport protocols such as TCP and UDP, control
  183.                  protocols such as ICMP, routing protocols such as OSPF,
  184.                  and internet or lower-layer protocols being "tunneled"
  185.                  over (i.e., encapsulated in) IPv6 such as IPX,
  186.                  AppleTalk, or IPv6 itself.
  187.  
  188.    link        - a communication facility or medium over which nodes can
  189.                  communicate at the link layer, i.e., the layer
  190.                  immediately below IPv6.  Examples are Ethernets (simple
  191.                  or bridged); PPP links; X.25, Frame Relay, or ATM
  192.                  networks; and internet (or higher) layer "tunnels",
  193.                  such as tunnels over IPv4 or IPv6 itself.
  194.  
  195.    neighbors   - nodes attached to the same link.
  196.  
  197.    interface   - a node's attachment to a link.
  198.  
  199.    address     - an IPv6-layer identifier for an interface or a set of
  200.                  interfaces.
  201.  
  202.    packet      - an IPv6 header plus payload.
  203.  
  204.    link MTU    - the maximum transmission unit, i.e., maximum packet
  205.                  size in octets, that can be conveyed in one piece over
  206.                  a link.
  207.  
  208.    path MTU    - the minimum link MTU of all the links in a path between
  209.                  a source node and a destination node.
  210.  
  211.    Note: it is possible, though unusual, for a device with multiple
  212.    interfaces to be configured to forward non-self-destined packets
  213.    arriving from some set (fewer than all) of its interfaces, and to
  214.    discard non-self-destined packets arriving from its other interfaces.
  215.    Such a device must obey the protocol requirements for routers when
  216.    receiving packets from, and interacting with neighbors over, the
  217.    former (forwarding) interfaces.  It must obey the protocol
  218.    requirements for hosts when receiving packets from, and interacting
  219.    with neighbors over, the latter (non-forwarding) interfaces.
  220.  
  221.  
  222.  
  223. Deering & Hinden            Standards Track                     [Page 4]
  224.  
  225.  
  226. RFC 1883                   IPv6 Specification              December 1995
  227.  
  228.  
  229. 3.  IPv6 Header Format
  230.  
  231.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  232.    |Version| Prio. |                   Flow Label                  |
  233.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  234.    |         Payload Length        |  Next Header  |   Hop Limit   |
  235.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  236.    |                                                               |
  237.    +                                                               +
  238.    |                                                               |
  239.    +                         Source Address                        +
  240.    |                                                               |
  241.    +                                                               +
  242.    |                                                               |
  243.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  244.    |                                                               |
  245.    +                                                               +
  246.    |                                                               |
  247.    +                      Destination Address                      +
  248.    |                                                               |
  249.    +                                                               +
  250.    |                                                               |
  251.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  252.  
  253.    Version              4-bit Internet Protocol version number = 6.
  254.  
  255.    Prio.                4-bit priority value.  See section 7.
  256.  
  257.    Flow Label           24-bit flow label.  See section 6.
  258.  
  259.    Payload Length       16-bit unsigned integer.  Length of payload,
  260.                         i.e., the rest of the packet following the
  261.                         IPv6 header, in octets.  If zero, indicates that
  262.                         the payload length is carried in a Jumbo Payload
  263.                         hop-by-hop option.
  264.  
  265.    Next Header          8-bit selector.  Identifies the type of header
  266.                         immediately following the IPv6 header.  Uses
  267.                         the same values as the IPv4 Protocol field
  268.                         [RFC-1700 et seq.].
  269.  
  270.    Hop Limit            8-bit unsigned integer.  Decremented by 1 by
  271.                         each node that forwards the packet. The packet
  272.                         is discarded if Hop Limit is decremented to
  273.                         zero.
  274.  
  275.    Source Address       128-bit address of the originator of the
  276.                         packet.  See [RFC-1884].
  277.  
  278.  
  279.  
  280. Deering & Hinden            Standards Track                     [Page 5]
  281.  
  282.  
  283. RFC 1883                   IPv6 Specification              December 1995
  284.  
  285.  
  286.    Destination Address  128-bit address of the intended recipient
  287.                         of the packet (possibly not the ultimate
  288.                         recipient, if a Routing header is present).
  289.                         See [RFC-1884] and section 4.4.
  290.  
  291.  
  292.  
  293. 4.  IPv6 Extension Headers
  294.  
  295.    In IPv6, optional internet-layer information is encoded in separate
  296.    headers that may be placed between the IPv6 header and the upper-
  297.    layer header in a packet.  There are a small number of such extension
  298.    headers, each identified by a distinct Next Header value.  As
  299.    illustrated in these examples, an IPv6 packet may carry zero, one, or
  300.    more extension headers, each identified by the Next Header field of
  301.    the preceding header:
  302.  
  303.    +---------------+------------------------
  304.    |  IPv6 header  | TCP header + data
  305.    |               |
  306.    | Next Header = |
  307.    |      TCP      |
  308.    +---------------+------------------------
  309.  
  310.  
  311.    +---------------+----------------+------------------------
  312.    |  IPv6 header  | Routing header | TCP header + data
  313.    |               |                |
  314.    | Next Header = |  Next Header = |
  315.    |    Routing    |      TCP       |
  316.    +---------------+----------------+------------------------
  317.  
  318.  
  319.    +---------------+----------------+-----------------+-----------------
  320.    |  IPv6 header  | Routing header | Fragment header | fragment of TCP
  321.    |               |                |                 |  header + data
  322.    | Next Header = |  Next Header = |  Next Header =  |
  323.    |    Routing    |    Fragment    |       TCP       |
  324.    +---------------+----------------+-----------------+-----------------
  325.  
  326.  
  327.    With one exception, extension headers are not examined or processed
  328.    by any node along a packet's delivery path, until the packet reaches
  329.    the node (or each of the set of nodes, in the case of multicast)
  330.    identified in the Destination Address field of the IPv6 header.
  331.    There, normal demultiplexing on the Next Header field of the IPv6
  332.    header invokes the module to process the first extension header, or
  333.    the upper-layer header if no extension header is present.  The
  334.    contents and semantics of each extension header determine whether or
  335.  
  336.  
  337. Deering & Hinden            Standards Track                     [Page 6]
  338.  
  339.  
  340. RFC 1883                   IPv6 Specification              December 1995
  341.  
  342.  
  343.    not to proceed to the next header.  Therefore, extension headers must
  344.    be processed strictly in the order they appear in the packet; a
  345.    receiver must not, for example, scan through a packet looking for a
  346.    particular kind of extension header and process that header prior to
  347.    processing all preceding ones.
  348.  
  349.    The exception referred to in the preceding paragraph is the Hop-by-
  350.    Hop Options header, which carries information that must be examined
  351.    and processed by every node along a packet's delivery path, including
  352.    the source and destination nodes.  The Hop-by-Hop Options header,
  353.    when present, must immediately follow the IPv6 header.  Its presence
  354.    is indicated by the value zero in the Next Header field of the IPv6
  355.    header.
  356.  
  357.    If, as a result of processing a header, a node is required to proceed
  358.    to the next header but the Next Header value in the current header is
  359.    unrecognized by the node, it should discard the packet and send an
  360.    ICMP Parameter Problem message to the source of the packet, with an
  361.    ICMP Code value of 2 ("unrecognized Next Header type encountered")
  362.    and the ICMP Pointer field containing the offset of the unrecognized
  363.    value within the original packet.  The same action should be taken if
  364.    a node encounters a Next Header value of zero in any header other
  365.    than an IPv6 header.
  366.  
  367.    Each extension header is an integer multiple of 8 octets long, in
  368.    order to retain 8-octet alignment for subsequent headers.  Multi-
  369.    octet fields within each extension header are aligned on their
  370.    natural boundaries, i.e., fields of width n octets are placed at an
  371.    integer multiple of n octets from the start of the header, for n = 1,
  372.    2, 4, or 8.
  373.  
  374.    A full implementation of IPv6 includes implementation of the
  375.    following extension headers:
  376.  
  377.            Hop-by-Hop Options
  378.            Routing (Type 0)
  379.            Fragment
  380.            Destination Options
  381.            Authentication
  382.            Encapsulating Security Payload
  383.  
  384.    The first four are specified in this document; the last two are
  385.    specified in [RFC-1826] and [RFC-1827], respectively.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Deering & Hinden            Standards Track                     [Page 7]
  395.  
  396.  
  397. RFC 1883                   IPv6 Specification              December 1995
  398.  
  399.  
  400. 4.1  Extension Header Order
  401.  
  402.    When more than one extension header is used in the same packet, it is
  403.    recommended that those headers appear in the following order:
  404.  
  405.            IPv6 header
  406.            Hop-by-Hop Options header
  407.            Destination Options header (note 1)
  408.            Routing header
  409.            Fragment header
  410.            Authentication header (note 2)
  411.            Encapsulating Security Payload header (note 2)
  412.            Destination Options header (note 3)
  413.            upper-layer header
  414.  
  415.            note 1: for options to be processed by the first destination
  416.                    that appears in the IPv6 Destination Address field
  417.                    plus subsequent destinations listed in the Routing
  418.                    header.
  419.  
  420.            note 2: additional recommendations regarding the relative
  421.                    order of the Authentication and Encapsulating
  422.                    Security Payload headers are given in [RFC-1827].
  423.  
  424.            note 3: for options to be processed only by the final
  425.                    destination of the packet.
  426.  
  427.    Each extension header should occur at most once, except for the
  428.    Destination Options header which should occur at most twice (once
  429.    before a Routing header and once before the upper-layer header).
  430.  
  431.    If the upper-layer header is another IPv6 header (in the case of IPv6
  432.    being tunneled over or encapsulated in IPv6), it may be followed by
  433.    its own extensions headers, which are separately subject to the same
  434.    ordering recommendations.
  435.  
  436.    If and when other extension headers are defined, their ordering
  437.    constraints relative to the above listed headers must be specified.
  438.  
  439.    IPv6 nodes must accept and attempt to process extension headers in
  440.    any order and occurring any number of times in the same packet,
  441.    except for the Hop-by-Hop Options header which is restricted to
  442.    appear immediately after an IPv6 header only.  Nonetheless, it is
  443.    strongly advised that sources of IPv6 packets adhere to the above
  444.    recommended order until and unless subsequent specifications revise
  445.    that recommendation.
  446.  
  447.  
  448.  
  449.  
  450.  
  451. Deering & Hinden            Standards Track                     [Page 8]
  452.  
  453.  
  454. RFC 1883                   IPv6 Specification              December 1995
  455.  
  456.  
  457. 4.2  Options
  458.  
  459.    Two of the currently-defined extension headers -- the Hop-by-Hop
  460.    Options header and the Destination Options header -- carry a variable
  461.    number of type-length-value (TLV) encoded "options", of the following
  462.    format:
  463.  
  464.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
  465.       |  Option Type  |  Opt Data Len |  Option Data
  466.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
  467.  
  468.       Option Type          8-bit identifier of the type of option.
  469.  
  470.       Opt Data Len         8-bit unsigned integer.  Length of the Option
  471.                            Data field of this option, in octets.
  472.  
  473.       Option Data          Variable-length field.  Option-Type-specific
  474.                            data.
  475.  
  476.    The sequence of options within a header must be processed strictly in
  477.    the order they appear in the header; a receiver must not, for
  478.    example, scan through the header looking for a particular kind of
  479.    option and process that option prior to processing all preceding
  480.    ones.
  481.  
  482.    The Option Type identifiers are internally encoded such that their
  483.    highest-order two bits specify the action that must be taken if the
  484.    processing IPv6 node does not recognize the Option Type:
  485.  
  486.       00 - skip over this option and continue processing the header.
  487.  
  488.       01 - discard the packet.
  489.  
  490.       10 - discard the packet and, regardless of whether or not the
  491.            packets's Destination Address was a multicast address, send
  492.            an ICMP Parameter Problem, Code 2, message to the packet's
  493.            Source Address, pointing to the unrecognized Option Type.
  494.  
  495.       11 - discard the packet and, only if the packet's Destination
  496.            Address was not a multicast address, send an ICMP Parameter
  497.            Problem, Code 2, message to the packet's Source Address,
  498.            pointing to the unrecognized Option Type.
  499.  
  500.    The third-highest-order bit of the Option Type specifies whether or
  501.    not the Option Data of that option can change en-route to the
  502.    packet's final destination.  When an Authentication header is present
  503.    in the packet, for any option whose data may change en-route, its
  504.    entire Option Data field must be treated as zero-valued octets when
  505.    computing or verifying the packet's authenticating value.
  506.  
  507.  
  508. Deering & Hinden            Standards Track                     [Page 9]
  509.  
  510.  
  511. RFC 1883                   IPv6 Specification              December 1995
  512.  
  513.  
  514.       0 - Option Data does not change en-route
  515.  
  516.       1 - Option Data may change en-route
  517.  
  518.    Individual options may have specific alignment requirements, to
  519.    ensure that multi-octet values within Option Data fields fall on
  520.    natural boundaries.  The alignment requirement of an option is
  521.    specified using the notation xn+y, meaning the Option Type must
  522.    appear at an integer multiple of x octets from the start of the
  523.    header, plus y octets.  For example:
  524.  
  525.        2n    means any 2-octet offset from the start of the header.
  526.        8n+2  means any 8-octet offset from the start of the header,
  527.              plus 2 octets.
  528.  
  529.    There are two padding options which are used when necessary to align
  530.    subsequent options and to pad out the containing header to a multiple
  531.    of 8 octets in length.  These padding options must be recognized by
  532.    all IPv6 implementations:
  533.  
  534.  
  535.    Pad1 option  (alignment requirement: none)
  536.  
  537.        +-+-+-+-+-+-+-+-+
  538.        |       0       |
  539.        +-+-+-+-+-+-+-+-+
  540.  
  541.        NOTE! the format of the Pad1 option is a special case -- it does
  542.              not have length and value fields.
  543.  
  544.        The Pad1 option is used to insert one octet of padding into the
  545.        Options area of a header.  If more than one octet of padding is
  546.        required, the PadN option, described next, should be used,
  547.        rather than multiple Pad1 options.
  548.  
  549.  
  550.    PadN option  (alignment requirement: none)
  551.  
  552.        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
  553.        |       1       |  Opt Data Len |  Option Data
  554.        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
  555.  
  556.        The PadN option is used to insert two or more octets of padding
  557.        into the Options area of a header.  For N octets of padding,
  558.        the Opt Data Len field contains the value N-2, and the Option
  559.        Data consists of N-2 zero-valued octets.
  560.  
  561.  
  562.    Appendix A contains formatting guidelines for designing new options.
  563.  
  564.  
  565. Deering & Hinden            Standards Track                    [Page 10]
  566.  
  567.  
  568. RFC 1883                   IPv6 Specification              December 1995
  569.  
  570.  
  571. 4.3  Hop-by-Hop Options Header
  572.  
  573.    The Hop-by-Hop Options header is used to carry optional information
  574.    that must be examined by every node along a packet's delivery path.
  575.    The Hop-by-Hop Options header is identified by a Next Header value of
  576.    0 in the IPv6 header, and has the following format:
  577.  
  578.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  579.    |  Next Header  |  Hdr Ext Len  |                               |
  580.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
  581.    |                                                               |
  582.    .                                                               .
  583.    .                            Options                            .
  584.    .                                                               .
  585.    |                                                               |
  586.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  587.  
  588.    Next Header          8-bit selector.  Identifies the type of header
  589.                         immediately following the Hop-by-Hop Options
  590.                         header.  Uses the same values as the IPv4
  591.                         Protocol field [RFC-1700 et seq.].
  592.  
  593.    Hdr Ext Len          8-bit unsigned integer.  Length of the
  594.                         Hop-by-Hop Options header in 8-octet units,
  595.                         not including the first 8 octets.
  596.  
  597.    Options              Variable-length field, of length such that the
  598.                         complete Hop-by-Hop Options header is an integer
  599.                         multiple of 8 octets long.  Contains one or
  600.                         more TLV-encoded options, as described in
  601.                         section 4.2.
  602.  
  603.    In addition to the Pad1 and PadN options specified in section 4.2,
  604.    the following hop-by-hop option is defined:
  605.  
  606.    Jumbo Payload option  (alignment requirement: 4n + 2)
  607.  
  608.                                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  609.                                        |      194      |Opt Data Len=4 |
  610.        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  611.        |                     Jumbo Payload Length                      |
  612.        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  613.  
  614.        The Jumbo Payload option is used to send IPv6 packets with
  615.        payloads longer than 65,535 octets.  The Jumbo Payload Length is
  616.        the length of the packet in octets, excluding the IPv6 header but
  617.        including the Hop-by-Hop Options header; it must be greater than
  618.        65,535.  If a packet is received with a Jumbo Payload option
  619.        containing a Jumbo Payload Length less than or equal to 65,535,
  620.  
  621.  
  622. Deering & Hinden            Standards Track                    [Page 11]
  623.  
  624.  
  625. RFC 1883                   IPv6 Specification              December 1995
  626.  
  627.  
  628.        an ICMP Parameter Problem message, Code 0, should be sent to the
  629.        packet's source, pointing to the high-order octet of the invalid
  630.        Jumbo Payload Length field.
  631.  
  632.        The Payload Length field in the IPv6 header must be set to zero
  633.        in every packet that carries the Jumbo Payload option.  If a
  634.        packet is received with a valid Jumbo Payload option present and
  635.        a non-zero IPv6 Payload Length field, an ICMP Parameter Problem
  636.        message, Code 0, should be sent to the packet's source, pointing
  637.        to the Option Type field of the Jumbo Payload option.
  638.  
  639.        The Jumbo Payload option must not be used in a packet that
  640.        carries a Fragment header.  If a Fragment header is encountered
  641.        in a packet that contains a valid Jumbo Payload option, an ICMP
  642.        Parameter Problem message, Code 0, should be sent to the packet's
  643.        source, pointing to the first octet of the Fragment header.
  644.  
  645.        An implementation that does not support the Jumbo Payload option
  646.        cannot have interfaces to links whose link MTU is greater than
  647.        65,575 (40 octets of IPv6 header plus 65,535 octets of payload).
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679. Deering & Hinden            Standards Track                    [Page 12]
  680.  
  681.  
  682. RFC 1883                   IPv6 Specification              December 1995
  683.  
  684.  
  685. 4.4  Routing Header
  686.  
  687.    The Routing header is used by an IPv6 source to list one or more
  688.    intermediate nodes to be "visited" on the way to a packet's
  689.    destination.  This function is very similar to IPv4's Source Route
  690.    options.  The Routing header is identified by a Next Header value of
  691.    43 in the immediately preceding header, and has the following format:
  692.  
  693.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  694.    |  Next Header  |  Hdr Ext Len  |  Routing Type | Segments Left |
  695.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  696.    |                                                               |
  697.    .                                                               .
  698.    .                       type-specific data                      .
  699.    .                                                               .
  700.    |                                                               |
  701.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  702.  
  703.    Next Header          8-bit selector.  Identifies the type of header
  704.                         immediately following the Routing header.
  705.                         Uses the same values as the IPv4 Protocol field
  706.                         [RFC-1700 et seq.].
  707.  
  708.    Hdr Ext Len          8-bit unsigned integer.  Length of the
  709.                         Routing header in 8-octet units, not including
  710.                         the first 8 octets.
  711.  
  712.    Routing Type         8-bit identifier of a particular Routing
  713.                         header variant.
  714.  
  715.    Segments Left        8-bit unsigned integer.  Number of route
  716.                         segments remaining, i.e., number of explicitly
  717.                         listed intermediate nodes still to be visited
  718.                         before reaching the final destination.
  719.  
  720.    type-specific data   Variable-length field, of format determined by
  721.                         the Routing Type, and of length such that the
  722.                         complete Routing header is an integer multiple
  723.                         of 8 octets long.
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736. Deering & Hinden            Standards Track                    [Page 13]
  737.  
  738.  
  739. RFC 1883                   IPv6 Specification              December 1995
  740.  
  741.  
  742.    If, while processing a received packet, a node encounters a Routing
  743.    header with an unrecognized Routing Type value, the required behavior
  744.    of the node depends on the value of the Segments Left field, as
  745.    follows:
  746.  
  747.       If Segments Left is zero, the node must ignore the Routing header
  748.       and proceed to process the next header in the packet, whose type
  749.       is identified by the Next Header field in the Routing header.
  750.  
  751.       If Segments Left is non-zero, the node must discard the packet and
  752.       send an ICMP Parameter Problem, Code 0, message to the packet's
  753.       Source Address, pointing to the unrecognized Routing Type.
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793. Deering & Hinden            Standards Track                    [Page 14]
  794.  
  795.  
  796. RFC 1883                   IPv6 Specification              December 1995
  797.  
  798.  
  799.    The Type 0 Routing header has the following format:
  800.  
  801.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  802.    |  Next Header  |  Hdr Ext Len  | Routing Type=0| Segments Left |
  803.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  804.    |   Reserved    |             Strict/Loose Bit Map              |
  805.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  806.    |                                                               |
  807.    +                                                               +
  808.    |                                                               |
  809.    +                           Address[1]                          +
  810.    |                                                               |
  811.    +                                                               +
  812.    |                                                               |
  813.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  814.    |                                                               |
  815.    +                                                               +
  816.    |                                                               |
  817.    +                           Address[2]                          +
  818.    |                                                               |
  819.    +                                                               +
  820.    |                                                               |
  821.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  822.    .                               .                               .
  823.    .                               .                               .
  824.    .                               .                               .
  825.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  826.    |                                                               |
  827.    +                                                               +
  828.    |                                                               |
  829.    +                           Address[n]                          +
  830.    |                                                               |
  831.    +                                                               +
  832.    |                                                               |
  833.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  834.  
  835.    Next Header          8-bit selector.  Identifies the type of header
  836.                         immediately following the Routing header.
  837.                         Uses the same values as the IPv4 Protocol field
  838.                         [RFC-1700 et seq.].
  839.  
  840.    Hdr Ext Len          8-bit unsigned integer.  Length of the
  841.                         Routing header in 8-octet units, not including
  842.                         the first 8 octets.  For the Type 0 Routing
  843.                         header, Hdr Ext Len is equal to two times the
  844.                         number of addresses in the header, and must
  845.                         be an even number less than or equal to 46.
  846.  
  847.    Routing Type         0.
  848.  
  849.  
  850. Deering & Hinden            Standards Track                    [Page 15]
  851.  
  852.  
  853. RFC 1883                   IPv6 Specification              December 1995
  854.  
  855.  
  856.    Segments Left        8-bit unsigned integer.  Number of route
  857.                         segments remaining, i.e., number of explicitly
  858.                         listed intermediate nodes still to be visited
  859.                         before reaching the final destination.
  860.                         Maximum legal value = 23.
  861.  
  862.    Reserved             8-bit reserved field.  Initialized to zero for
  863.                         transmission; ignored on reception.
  864.  
  865.    Strict/Loose Bit Map
  866.                         24-bit bit-map, numbered 0 to 23, left-to-right.
  867.                         Indicates, for each segment of the route, whether
  868.                         or not the next destination address must be a
  869.                         neighbor of the preceding address: 1 means strict
  870.                         (must be a neighbor), 0 means loose (need not be
  871.                         a neighbor).
  872.  
  873.    Address[1..n]        Vector of 128-bit addresses, numbered 1 to n.
  874.  
  875.  
  876.    Multicast addresses must not appear in a Routing header of Type 0, or
  877.    in the IPv6 Destination Address field of a packet carrying a Routing
  878.    header of Type 0.
  879.  
  880.    If bit number 0 of the Strict/Loose Bit Map has value 1, the
  881.    Destination Address field of the IPv6 header in the original packet
  882.    must identify a neighbor of the originating node.  If bit number 0
  883.    has value 0, the originator may use any legal, non-multicast address
  884.    as the initial Destination Address.
  885.  
  886.    Bits numbered greater than n, where n is the number of addresses in
  887.    the Routing header, must be set to 0 by the originator and ignored by
  888.    receivers.
  889.  
  890.    A Routing header is not examined or processed until it reaches the
  891.    node identified in the Destination Address field of the IPv6 header.
  892.    In that node, dispatching on the Next Header field of the immediately
  893.    preceding header causes the Routing header module to be invoked,
  894.    which, in the case of Routing Type 0, performs the following
  895.    algorithm:
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907. Deering & Hinden            Standards Track                    [Page 16]
  908.  
  909.  
  910. RFC 1883                   IPv6 Specification              December 1995
  911.  
  912.  
  913.    if Segments Left = 0 {
  914.       proceed to process the next header in the packet, whose type is
  915.       identified by the Next Header field in the Routing header
  916.    }
  917.    else if Hdr Ext Len is odd or greater than 46 {
  918.          send an ICMP Parameter Problem, Code 0, message to the Source
  919.          Address, pointing to the Hdr Ext Len field, and discard the
  920.          packet
  921.    }
  922.    else {
  923.       compute n, the number of addresses in the Routing header, by
  924.       dividing Hdr Ext Len by 2
  925.  
  926.       if Segments Left is greater than n {
  927.          send an ICMP Parameter Problem, Code 0, message to the Source
  928.          Address, pointing to the Segments Left field, and discard the
  929.          packet
  930.       }
  931.       else {
  932.          decrement Segments Left by 1;
  933.          compute i, the index of the next address to be visited in
  934.          the address vector, by subtracting Segments Left from n
  935.  
  936.          if Address [i] or the IPv6 Destination Address is multicast {
  937.             discard the packet
  938.          }
  939.          else {
  940.             swap the IPv6 Destination Address and Address[i]
  941.  
  942.             if bit i of the Strict/Loose Bit map has value 1 and the
  943.             new Destination Address is not the address of a neighbor
  944.             of this node {
  945.                send an ICMP Destination Unreachable -- Not a Neighbor
  946.                message to the Source Address and discard the packet
  947.             }
  948.             else if the IPv6 Hop Limit is less than or equal to 1 {
  949.                send an ICMP Time Exceeded -- Hop Limit Exceeded in
  950.                Transit message to the Source Address and discard the
  951.                packet
  952.             }
  953.             else {
  954.                decrement the Hop Limit by 1
  955.  
  956.                resubmit the packet to the IPv6 module for transmission
  957.                to the new destination
  958.             }
  959.          }
  960.       }
  961.    }
  962.  
  963.  
  964. Deering & Hinden            Standards Track                    [Page 17]
  965.  
  966.  
  967. RFC 1883                   IPv6 Specification              December 1995
  968.  
  969.  
  970.    As an example of the effects of the above algorithm, consider the
  971.    case of a source node S sending a packet to destination node D, using
  972.    a Routing header to cause the packet to be routed via intermediate
  973.    nodes I1, I2, and I3.  The values of the relevant IPv6 header and
  974.    Routing header fields on each segment of the delivery path would be
  975.    as follows:
  976.  
  977.    As the packet travels from S to I1:
  978.  
  979.         Source Address = S                  Hdr Ext Len = 6
  980.         Destination Address = I1            Segments Left = 3
  981.                                             Address[1] = I2
  982.         (if bit 0 of the Bit Map is 1,      Address[2] = I3
  983.          S and I1 must be neighbors;        Address[3] = D
  984.          this is checked by S)
  985.  
  986.    As the packet travels from I1 to I2:
  987.  
  988.         Source Address = S                  Hdr Ext Len = 6
  989.         Destination Address = I2            Segments Left = 2
  990.                                             Address[1] = I1
  991.         (if bit 1 of the Bit Map is 1,      Address[2] = I3
  992.          I1 and I2 must be neighbors;       Address[3] = D
  993.          this is checked by I1)
  994.  
  995.    As the packet travels from I2 to I3:
  996.  
  997.         Source Address = S                  Hdr Ext Len = 6
  998.         Destination Address = I3            Segments Left = 1
  999.                                             Address[1] = I1
  1000.         (if bit 2 of the Bit Map is 1,      Address[2] = I2
  1001.          I2 and I3 must be neighbors;       Address[3] = D
  1002.          this is checked by I2)
  1003.  
  1004.    As the packet travels from I3 to D:
  1005.  
  1006.         Source Address = S                  Hdr Ext Len = 6
  1007.         Destination Address = D             Segments Left = 0
  1008.                                             Address[1] = I1
  1009.         (if bit 3 of the Bit Map is 1,      Address[2] = I2
  1010.          I3 and D must be neighbors;        Address[3] = I3
  1011.          this is checked by I3)
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021. Deering & Hinden            Standards Track                    [Page 18]
  1022.  
  1023.  
  1024. RFC 1883                   IPv6 Specification              December 1995
  1025.  
  1026.  
  1027. 4.5  Fragment Header
  1028.  
  1029.    The Fragment header is used by an IPv6 source to send packets larger
  1030.    than would fit in the path MTU to their destinations.  (Note: unlike
  1031.    IPv4, fragmentation in IPv6 is performed only by source nodes, not by
  1032.    routers along a packet's delivery path -- see section 5.)  The
  1033.    Fragment header is identified by a Next Header value of 44 in the
  1034.    immediately preceding header, and has the following format:
  1035.  
  1036.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1037.    |  Next Header  |   Reserved    |      Fragment Offset    |Res|M|
  1038.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1039.    |                         Identification                        |
  1040.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1041.  
  1042.    Next Header          8-bit selector.  Identifies the initial header
  1043.                         type of the Fragmentable Part of the original
  1044.                         packet (defined below).  Uses the same values
  1045.                         as the IPv4 Protocol field [RFC-1700 et seq.].
  1046.  
  1047.    Reserved             8-bit reserved field.  Initialized to zero for
  1048.                         transmission; ignored on reception.
  1049.  
  1050.    Fragment Offset      13-bit unsigned integer.  The offset, in 8-octet
  1051.                         units, of the data following this header,
  1052.                         relative to the start of the Fragmentable Part
  1053.                         of the original packet.
  1054.  
  1055.    Res                  2-bit reserved field.  Initialized to zero for
  1056.                         transmission; ignored on reception.
  1057.  
  1058.    M flag               1 = more fragments; 0 = last fragment.
  1059.  
  1060.    Identification       32 bits.  See description below.
  1061.  
  1062.    In order to send a packet that is too large to fit in the MTU of the
  1063.    path to its destination, a source node may divide the packet into
  1064.    fragments and send each fragment as a separate packet, to be
  1065.    reassembled at the receiver.
  1066.  
  1067.    For every packet that is to be fragmented, the source node generates
  1068.    an Identification value. The Identification must be different than
  1069.    that of any other fragmented packet sent recently* with the same
  1070.    Source Address and Destination Address.  If a Routing header is
  1071.    present, the Destination Address of concern is that of the final
  1072.    destination.
  1073.  
  1074.       * "recently" means within the maximum likely lifetime of a packet,
  1075.         including transit time from source to destination and time spent
  1076.  
  1077.  
  1078. Deering & Hinden            Standards Track                    [Page 19]
  1079.  
  1080.  
  1081. RFC 1883                   IPv6 Specification              December 1995
  1082.  
  1083.  
  1084.         awaiting reassembly with other fragments of the same packet.
  1085.         However, it is not required that a source node know the maximum
  1086.         packet lifetime.  Rather, it is assumed that the requirement can
  1087.         be met by maintaining the Identification value as a simple, 32-
  1088.         bit, "wrap-around" counter, incremented each time a packet must
  1089.         be fragmented.  It is an implementation choice whether to
  1090.         maintain a single counter for the node or multiple counters,
  1091.         e.g., one for each of the node's possible source addresses, or
  1092.         one for each active (source address, destination address)
  1093.         combination.
  1094.  
  1095.    The initial, large, unfragmented packet is referred to as the
  1096.    "original packet", and it is considered to consist of two parts, as
  1097.    illustrated:
  1098.  
  1099.    original packet:
  1100.  
  1101.    +------------------+----------------------//-----------------------+
  1102.    |  Unfragmentable  |                 Fragmentable                  |
  1103.    |       Part       |                     Part                      |
  1104.    +------------------+----------------------//-----------------------+
  1105.  
  1106.       The Unfragmentable Part consists of the IPv6 header plus any
  1107.       extension headers that must be processed by nodes en route to the
  1108.       destination, that is, all headers up to and including the Routing
  1109.       header if present, else the Hop-by-Hop Options header if present,
  1110.       else no extension headers.
  1111.  
  1112.       The Fragmentable Part consists of the rest of the packet, that is,
  1113.       any extension headers that need be processed only by the final
  1114.       destination node(s), plus the upper-layer header and data.
  1115.  
  1116.    The Fragmentable Part of the original packet is divided into
  1117.    fragments, each, except possibly the last ("rightmost") one, being an
  1118.    integer multiple of 8 octets long.  The fragments are transmitted in
  1119.    separate "fragment packets" as illustrated:
  1120.  
  1121.    original packet:
  1122.  
  1123.    +------------------+--------------+--------------+--//--+----------+
  1124.    |  Unfragmentable  |    first     |    second    |      |   last   |
  1125.    |       Part       |   fragment   |   fragment   | .... | fragment |
  1126.    +------------------+--------------+--------------+--//--+----------+
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135. Deering & Hinden            Standards Track                    [Page 20]
  1136.  
  1137.  
  1138. RFC 1883                   IPv6 Specification              December 1995
  1139.  
  1140.  
  1141.    fragment packets:
  1142.  
  1143.    +------------------+--------+--------------+
  1144.    |  Unfragmentable  |Fragment|    first     |
  1145.    |       Part       | Header |   fragment   |
  1146.    +------------------+--------+--------------+
  1147.  
  1148.    +------------------+--------+--------------+
  1149.    |  Unfragmentable  |Fragment|    second    |
  1150.    |       Part       | Header |   fragment   |
  1151.    +------------------+--------+--------------+
  1152.                          o
  1153.                          o
  1154.                          o
  1155.    +------------------+--------+----------+
  1156.    |  Unfragmentable  |Fragment|   last   |
  1157.    |       Part       | Header | fragment |
  1158.    +------------------+--------+----------+
  1159.  
  1160.    Each fragment packet is composed of:
  1161.  
  1162.       (1) The Unfragmentable Part of the original packet, with the
  1163.           Payload Length of the original IPv6 header changed to contain
  1164.           the length of this fragment packet only (excluding the length
  1165.           of the IPv6 header itself), and the Next Header field of the
  1166.           last header of the Unfragmentable Part changed to 44.
  1167.  
  1168.       (2) A Fragment header containing:
  1169.  
  1170.                The Next Header value that identifies the first header of
  1171.                the Fragmentable Part of the original packet.
  1172.  
  1173.                A Fragment Offset containing the offset of the fragment,
  1174.                in 8-octet units, relative to the start of the
  1175.                Fragmentable Part of the original packet.  The Fragment
  1176.                Offset of the first ("leftmost") fragment is 0.
  1177.  
  1178.                An M flag value of 0 if the fragment is the last
  1179.                ("rightmost") one, else an M flag value of 1.
  1180.  
  1181.                The Identification value generated for the original
  1182.                packet.
  1183.  
  1184.       (3) The fragment itself.
  1185.  
  1186.    The lengths of the fragments must be chosen such that the resulting
  1187.    fragment packets fit within the MTU of the path to the packets'
  1188.    destination(s).
  1189.  
  1190.  
  1191.  
  1192. Deering & Hinden            Standards Track                    [Page 21]
  1193.  
  1194.  
  1195. RFC 1883                   IPv6 Specification              December 1995
  1196.  
  1197.  
  1198.    At the destination, fragment packets are reassembled into their
  1199.    original, unfragmented form, as illustrated:
  1200.  
  1201.    reassembled original packet:
  1202.  
  1203.    +------------------+----------------------//------------------------+
  1204.    |  Unfragmentable  |                 Fragmentable                   |
  1205.    |       Part       |                     Part                       |
  1206.    +------------------+----------------------//------------------------+
  1207.  
  1208.    The following rules govern reassembly:
  1209.  
  1210.       An original packet is reassembled only from fragment packets that
  1211.       have the same Source Address, Destination Address, and Fragment
  1212.       Identification.
  1213.  
  1214.       The Unfragmentable Part of the reassembled packet consists of all
  1215.       headers up to, but not including, the Fragment header of the first
  1216.       fragment packet (that is, the packet whose Fragment Offset is
  1217.       zero), with the following two changes:
  1218.  
  1219.          The Next Header field of the last header of the Unfragmentable
  1220.          Part is obtained from the Next Header field of the first
  1221.          fragment's Fragment header.
  1222.  
  1223.          The Payload Length of the reassembled packet is computed from
  1224.          the length of the Unfragmentable Part and the length and offset
  1225.          of the last fragment.  For example, a formula for computing the
  1226.          Payload Length of the reassembled original packet is:
  1227.  
  1228.            PL.orig = PL.first - FL.first - 8 + (8 * FO.last) + FL.last
  1229.  
  1230.            where
  1231.            PL.orig  = Payload Length field of reassembled packet.
  1232.            PL.first = Payload Length field of first fragment packet.
  1233.            FL.first = length of fragment following Fragment header of
  1234.                       first fragment packet.
  1235.            FO.last  = Fragment Offset field of Fragment header of
  1236.                       last fragment packet.
  1237.            FL.last  = length of fragment following Fragment header of
  1238.                       last fragment packet.
  1239.  
  1240.       The Fragmentable Part of the reassembled packet is constructed
  1241.       from the fragments following the Fragment headers in each of the
  1242.       fragment packets.  The length of each fragment is computed by
  1243.       subtracting from the packet's Payload Length the length of the
  1244.       headers between the IPv6 header and fragment itself; its relative
  1245.       position in Fragmentable Part is computed from its Fragment Offset
  1246.       value.
  1247.  
  1248.  
  1249. Deering & Hinden            Standards Track                    [Page 22]
  1250.  
  1251.  
  1252. RFC 1883                   IPv6 Specification              December 1995
  1253.  
  1254.  
  1255.       The Fragment header is not present in the final, reassembled
  1256.       packet.
  1257.  
  1258.    The following error conditions may arise when reassembling fragmented
  1259.    packets:
  1260.  
  1261.       If insufficient fragments are received to complete reassembly of a
  1262.       packet within 60 seconds of the reception of the first-arriving
  1263.       fragment of that packet, reassembly of that packet must be
  1264.       abandoned and all the fragments that have been received for that
  1265.       packet must be discarded.  If the first fragment (i.e., the one
  1266.       with a Fragment Offset of zero) has been received, an ICMP Time
  1267.       Exceeded -- Fragment Reassembly Time Exceeded message should be
  1268.       sent to the source of that fragment.
  1269.  
  1270.       If the length of a fragment, as derived from the fragment packet's
  1271.       Payload Length field, is not a multiple of 8 octets and the M flag
  1272.       of that fragment is 1, then that fragment must be discarded and an
  1273.       ICMP Parameter Problem, Code 0, message should be sent to the
  1274.       source of the fragment, pointing to the Payload Length field of
  1275.       the fragment packet.
  1276.  
  1277.       If the length and offset of a fragment are such that the Payload
  1278.       Length of the packet reassembled from that fragment would exceed
  1279.       65,535 octets, then that fragment must be discarded and an ICMP
  1280.       Parameter Problem, Code 0, message should be sent to the source of
  1281.       the fragment, pointing to the Fragment Offset field of the
  1282.       fragment packet.
  1283.  
  1284.    The following conditions are not expected to occur, but are not
  1285.    considered errors if they do:
  1286.  
  1287.       The number and content of the headers preceding the Fragment
  1288.       header of different fragments of the same original packet may
  1289.       differ.  Whatever headers are present, preceding the Fragment
  1290.       header in each fragment packet, are processed when the packets
  1291.       arrive, prior to queueing the fragments for reassembly.  Only
  1292.       those headers in the Offset zero fragment packet are retained in
  1293.       the reassembled packet.
  1294.  
  1295.       The Next Header values in the Fragment headers of different
  1296.       fragments of the same original packet may differ.  Only the value
  1297.       from the Offset zero fragment packet is used for reassembly.
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306. Deering & Hinden            Standards Track                    [Page 23]
  1307.  
  1308.  
  1309. RFC 1883                   IPv6 Specification              December 1995
  1310.  
  1311.  
  1312. 4.6  Destination Options Header
  1313.  
  1314.    The Destination Options header is used to carry optional information
  1315.    that need be examined only by a packet's destination node(s).  The
  1316.    Destination Options header is identified by a Next Header value of 60
  1317.    in the immediately preceding header, and has the following format:
  1318.  
  1319.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1320.    |  Next Header  |  Hdr Ext Len  |                               |
  1321.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
  1322.    |                                                               |
  1323.    .                                                               .
  1324.    .                            Options                            .
  1325.    .                                                               .
  1326.    |                                                               |
  1327.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1328.  
  1329.    Next Header          8-bit selector.  Identifies the type of header
  1330.                         immediately following the Destination Options
  1331.                         header.  Uses the same values as the IPv4
  1332.                         Protocol field [RFC-1700 et seq.].
  1333.  
  1334.    Hdr Ext Len          8-bit unsigned integer.  Length of the
  1335.                         Destination Options header in 8-octet units,
  1336.                         not including the first 8 octets.
  1337.  
  1338.    Options              Variable-length field, of length such that the
  1339.                         complete Destination Options header is an
  1340.                         integer multiple of 8 octets long.  Contains
  1341.                         one or  more TLV-encoded options, as described
  1342.                         in section 4.2.
  1343.  
  1344.  
  1345.    The only destination options defined in this document are the Pad1
  1346.    and PadN options specified in section 4.2.
  1347.  
  1348.    Note that there are two possible ways to encode optional destination
  1349.    information in an IPv6 packet: either as an option in the Destination
  1350.    Options header, or as a separate extension header.  The Fragment
  1351.    header and the Authentication header are examples of the latter
  1352.    approach.  Which approach can be used depends on what action is
  1353.    desired of a destination node that does not understand the optional
  1354.    information:
  1355.  
  1356.       o  if the desired action is for the destination node to discard
  1357.          the packet and, only if the packet's Destination Address is not
  1358.          a multicast address, send an ICMP Unrecognized Type message to
  1359.          the packet's Source Address, then the information may be
  1360.          encoded either as a separate header or as an option in the
  1361.  
  1362.  
  1363. Deering & Hinden            Standards Track                    [Page 24]
  1364.  
  1365.  
  1366. RFC 1883                   IPv6 Specification              December 1995
  1367.  
  1368.  
  1369.          Destination Options header whose Option Type has the value 11
  1370.          in its highest-order two bits.  The choice may depend on such
  1371.          factors as which takes fewer octets, or which yields better
  1372.          alignment or more efficient parsing.
  1373.  
  1374.       o  if any other action is desired, the information must be encoded
  1375.          as an option in the Destination Options header whose Option
  1376.          Type has the value 00, 01, or 10 in its highest-order two bits,
  1377.          specifying the desired action (see section 4.2).
  1378.  
  1379.  
  1380.  
  1381. 4.7 No Next Header
  1382.  
  1383.    The value 59 in the Next Header field of an IPv6 header or any
  1384.    extension header indicates that there is nothing following that
  1385.    header.  If the Payload Length field of the IPv6 header indicates the
  1386.    presence of octets past the end of a header whose Next Header field
  1387.    contains 59, those octets must be ignored, and passed on unchanged if
  1388.    the packet is forwarded.
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420. Deering & Hinden            Standards Track                    [Page 25]
  1421.  
  1422.  
  1423. RFC 1883                   IPv6 Specification              December 1995
  1424.  
  1425.  
  1426. 5. Packet Size Issues
  1427.  
  1428.    IPv6 requires that every link in the internet have an MTU of 576
  1429.    octets or greater.  On any link that cannot convey a 576-octet packet
  1430.    in one piece, link-specific fragmentation and reassembly must be
  1431.    provided at a layer below IPv6.
  1432.  
  1433.     From each link to which a node is directly attached, the node must
  1434.    be able to accept packets as large as that link's MTU.  Links that
  1435.    have a configurable MTU (for example, PPP links [RFC-1661]) must be
  1436.    configured to have an MTU of at least 576 octets; it is recommended
  1437.    that a larger MTU be configured, to accommodate possible
  1438.    encapsulations (i.e., tunneling) without incurring fragmentation.
  1439.  
  1440.    It is strongly recommended that IPv6 nodes implement Path MTU
  1441.    Discovery [RFC-1191], in order to discover and take advantage of
  1442.    paths with MTU greater than 576 octets.  However, a minimal IPv6
  1443.    implementation (e.g., in a boot ROM) may simply restrict itself to
  1444.    sending packets no larger than 576 octets, and omit implementation of
  1445.    Path MTU Discovery.
  1446.  
  1447.    In order to send a packet larger than a path's MTU, a node may use
  1448.    the IPv6 Fragment header to fragment the packet at the source and
  1449.    have it reassembled at the destination(s).  However, the use of such
  1450.    fragmentation is discouraged in any application that is able to
  1451.    adjust its packets to fit the measured path MTU (i.e., down to 576
  1452.    octets).
  1453.  
  1454.    A node must be able to accept a fragmented packet that, after
  1455.    reassembly, is as large as 1500 octets, including the IPv6 header.  A
  1456.    node is permitted to accept fragmented packets that reassemble to
  1457.    more than 1500 octets.  However, a node must not send fragments that
  1458.    reassemble to a size greater than 1500 octets unless it has explicit
  1459.    knowledge that the destination(s) can reassemble a packet of that
  1460.    size.
  1461.  
  1462.    In response to an IPv6 packet that is sent to an IPv4 destination
  1463.    (i.e., a packet that undergoes translation from IPv6 to IPv4), the
  1464.    originating IPv6 node may receive an ICMP Packet Too Big message
  1465.    reporting a Next-Hop MTU less than 576.  In that case, the IPv6 node
  1466.    is not required to reduce the size of subsequent packets to less than
  1467.    576, but must include a Fragment header in those packets so that the
  1468.    IPv6-to-IPv4 translating router can obtain a suitable Identification
  1469.    value to use in resulting IPv4 fragments.  Note that this means the
  1470.    payload may have to be reduced to 528 octets (576 minus 40 for the
  1471.    IPv6 header and 8 for the Fragment header), and smaller still if
  1472.    additional extension headers are used.
  1473.  
  1474.  
  1475.  
  1476.  
  1477. Deering & Hinden            Standards Track                    [Page 26]
  1478.  
  1479.  
  1480. RFC 1883                   IPv6 Specification              December 1995
  1481.  
  1482.  
  1483.         Note: Path MTU Discovery must be performed even in cases where a
  1484.         host "thinks" a destination is attached to the same link as
  1485.         itself.
  1486.  
  1487.         Note: Unlike IPv4, it is unnecessary in IPv6 to set a "Don't
  1488.         Fragment" flag in the packet header in order to perform Path MTU
  1489.         Discovery; that is an implicit attribute of every IPv6 packet.
  1490.         Also, those parts of the RFC-1191 procedures that involve use of
  1491.         a table of MTU "plateaus" do not apply to IPv6, because the IPv6
  1492.         version of the "Datagram Too Big" message always identifies the
  1493.         exact MTU to be used.
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534. Deering & Hinden            Standards Track                    [Page 27]
  1535.  
  1536.  
  1537. RFC 1883                   IPv6 Specification              December 1995
  1538.  
  1539.  
  1540. 6.  Flow Labels
  1541.  
  1542.    The 24-bit Flow Label field in the IPv6 header may be used by a
  1543.    source to label those packets for which it requests special handling
  1544.    by the IPv6 routers, such as non-default quality of service or
  1545.    "real-time" service.  This aspect of IPv6 is, at the time of writing,
  1546.    still experimental and subject to change as the requirements for flow
  1547.    support in the Internet become clearer.  Hosts or routers that do not
  1548.    support the functions of the Flow Label field are required to set the
  1549.    field to zero when originating a packet, pass the field on unchanged
  1550.    when forwarding a packet, and ignore the field when receiving a
  1551.    packet.
  1552.  
  1553.    A flow is a sequence of packets sent from a particular source to a
  1554.    particular (unicast or multicast) destination for which the source
  1555.    desires special handling by the intervening routers.  The nature of
  1556.    that special handling might be conveyed to the routers by a control
  1557.    protocol, such as a resource reservation protocol, or by information
  1558.    within the flow's packets themselves, e.g., in a hop-by-hop option.
  1559.    The details of such control protocols or options are beyond the scope
  1560.    of this document.
  1561.  
  1562.    There may be multiple active flows from a source to a destination, as
  1563.    well as traffic that is not associated with any flow.  A flow is
  1564.    uniquely identified by the combination of a source address and a
  1565.    non-zero flow label.  Packets that do not belong to a flow carry a
  1566.    flow label of zero.
  1567.  
  1568.    A flow label is assigned to a flow by the flow's source node.  New
  1569.    flow labels must be chosen (pseudo-)randomly and uniformly from the
  1570.    range 1 to FFFFFF hex.  The purpose of the random allocation is to
  1571.    make any set of bits within the Flow Label field suitable for use as
  1572.    a hash key by routers, for looking up the state associated with the
  1573.    flow.
  1574.  
  1575.    All packets belonging to the same flow must be sent with the same
  1576.    source address, destination address, priority, and flow label.  If
  1577.    any of those packets includes a Hop-by-Hop Options header, then they
  1578.    all must be originated with the same Hop-by-Hop Options header
  1579.    contents (excluding the Next Header field of the Hop-by-Hop Options
  1580.    header).  If any of those packets includes a Routing header, then
  1581.    they all must be originated with the same contents in all extension
  1582.    headers up to and including the Routing header (excluding the Next
  1583.    Header field in the Routing header).  The routers or destinations are
  1584.    permitted, but not required, to verify that these conditions are
  1585.    satisfied.  If a violation is detected, it should be reported to the
  1586.    source by an ICMP Parameter Problem message, Code 0, pointing to the
  1587.    high-order octet of the Flow Label field (i.e., offset 1 within the
  1588.    IPv6 packet).
  1589.  
  1590.  
  1591. Deering & Hinden            Standards Track                    [Page 28]
  1592.  
  1593.  
  1594. RFC 1883                   IPv6 Specification              December 1995
  1595.  
  1596.  
  1597.    Routers are free to "opportunistically" set up flow-handling state
  1598.    for any flow, even when no explicit flow establishment information
  1599.    has been provided to them via a control protocol, a hop-by-hop
  1600.    option, or other means.  For example, upon receiving a packet from a
  1601.    particular source with an unknown, non-zero flow label, a router may
  1602.    process its IPv6 header and any necessary extension headers as if the
  1603.    flow label were zero.  That processing would include determining the
  1604.    next-hop interface, and possibly other actions, such as updating a
  1605.    hop-by-hop option, advancing the pointer and addresses in a Routing
  1606.    header, or deciding on how to queue the packet based on its Priority
  1607.    field.  The router may then choose to "remember" the results of those
  1608.    processing steps and cache that information, using the source address
  1609.    plus the flow label as the cache key.  Subsequent packets with the
  1610.    same source address and flow label may then be handled by referring
  1611.    to the cached information rather than examining all those fields
  1612.    that, according to the requirements of the previous paragraph, can be
  1613.    assumed unchanged from the first packet seen in the flow.
  1614.  
  1615.    Cached flow-handling state that is set up opportunistically, as
  1616.    discussed in the preceding paragraph, must be discarded no more than
  1617.    6 seconds after it is established, regardless of whether or not
  1618.    packets of the same flow continue to arrive.  If another packet with
  1619.    the same source address and flow label arrives after the cached state
  1620.    has been discarded, the packet undergoes full, normal processing (as
  1621.    if its flow label were zero), which may result in the re-creation of
  1622.    cached flow state for that flow.
  1623.  
  1624.    The lifetime of flow-handling state that is set up explicitly, for
  1625.    example by a control protocol or a hop-by-hop option, must be
  1626.    specified as part of the specification of the explicit set-up
  1627.    mechanism; it may exceed 6 seconds.
  1628.  
  1629.    A source must not re-use a flow label for a new flow within the
  1630.    lifetime of any flow-handling state that might have been established
  1631.    for the prior use of that flow label.  Since flow-handling state with
  1632.    a lifetime of 6 seconds may be established opportunistically for any
  1633.    flow, the minimum interval between the last packet of one flow and
  1634.    the first packet of a new flow using the same flow label is 6
  1635.    seconds.  Flow labels used for explicitly set-up flows with longer
  1636.    flow-state lifetimes must remain unused for those longer lifetimes
  1637.    before being re-used for new flows.
  1638.  
  1639.    When a node stops and restarts (e.g., as a result of a "crash"), it
  1640.    must be careful not to use a flow label that it might have used for
  1641.    an earlier flow whose lifetime may not have expired yet.  This may be
  1642.    accomplished by recording flow label usage on stable storage so that
  1643.    it can be remembered across crashes, or by refraining from using any
  1644.    flow labels until the maximum lifetime of any possible previously
  1645.    established flows has expired (at least 6 seconds; more if explicit
  1646.  
  1647.  
  1648. Deering & Hinden            Standards Track                    [Page 29]
  1649.  
  1650.  
  1651. RFC 1883                   IPv6 Specification              December 1995
  1652.  
  1653.  
  1654.    flow set-up mechanisms with longer lifetimes might have been used).
  1655.    If the minimum time for rebooting the node is known (often more than
  1656.    6 seconds), that time can be deducted from the necessary waiting
  1657.    period before starting to allocate flow labels.
  1658.  
  1659.    There is no requirement that all, or even most, packets belong to
  1660.    flows, i.e., carry non-zero flow labels.  This observation is placed
  1661.    here to remind protocol designers and implementors not to assume
  1662.    otherwise.  For example, it would be unwise to design a router whose
  1663.    performance would be adequate only if most packets belonged to flows,
  1664.    or to design a header compression scheme that only worked on packets
  1665.    that belonged to flows.
  1666.  
  1667.  
  1668. 7.  Priority
  1669.  
  1670.    The 4-bit Priority field in the IPv6 header enables a source to
  1671.    identify the desired delivery priority of its packets, relative to
  1672.    other packets from the same source.  The Priority values are divided
  1673.    into two ranges:  Values 0 through 7 are used to specify the priority
  1674.    of traffic for which the source is providing congestion control,
  1675.    i.e., traffic that "backs off" in response to congestion, such as TCP
  1676.    traffic.  Values 8 through 15 are used to specify the priority of
  1677.    traffic that does not back off in response to congestion, e.g.,
  1678.    "real-time" packets being sent at a constant rate.
  1679.  
  1680.    For congestion-controlled traffic, the following Priority values are
  1681.    recommended for particular application categories:
  1682.  
  1683.          0 - uncharacterized traffic
  1684.          1 - "filler" traffic (e.g., netnews)
  1685.          2 - unattended data transfer (e.g., email)
  1686.          3 - (reserved)
  1687.          4 - attended bulk transfer (e.g., FTP, NFS)
  1688.          5 - (reserved)
  1689.          6 - interactive traffic (e.g., telnet, X)
  1690.          7 - internet control traffic (e.g., routing protocols, SNMP)
  1691.  
  1692.    For non-congestion-controlled traffic, the lowest Priority value (8)
  1693.    should be used for those packets that the sender is most willing to
  1694.    have discarded under conditions of congestion (e.g., high-fidelity
  1695.    video traffic), and the highest value (15) should be used for those
  1696.    packets that the sender is least willing to have discarded (e.g.,
  1697.    low-fidelity audio traffic).  There is no relative ordering implied
  1698.    between the congestion-controlled priorities and the non-congestion-
  1699.    controlled priorities.
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705. Deering & Hinden            Standards Track                    [Page 30]
  1706.  
  1707.  
  1708. RFC 1883                   IPv6 Specification              December 1995
  1709.  
  1710.  
  1711. 8. Upper-Layer Protocol Issues
  1712.  
  1713. 8.1 Upper-Layer Checksums
  1714.  
  1715.    Any transport or other upper-layer protocol that includes the
  1716.    addresses from the IP header in its checksum computation must be
  1717.    modified for use over IPv6, to include the 128-bit IPv6 addresses
  1718.    instead of 32-bit IPv4 addresses.  In particular, the following
  1719.    illustration shows the TCP and UDP "pseudo-header" for IPv6:
  1720.  
  1721.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1722.    |                                                               |
  1723.    +                                                               +
  1724.    |                                                               |
  1725.    +                         Source Address                        +
  1726.    |                                                               |
  1727.    +                                                               +
  1728.    |                                                               |
  1729.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1730.    |                                                               |
  1731.    +                                                               +
  1732.    |                                                               |
  1733.    +                      Destination Address                      +
  1734.    |                                                               |
  1735.    +                                                               +
  1736.    |                                                               |
  1737.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1738.    |                         Payload Length                        |
  1739.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1740.    |                      zero                     |  Next Header  |
  1741.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1742.  
  1743.  
  1744.       o  If the packet contains a Routing header, the Destination
  1745.          Address used in the pseudo-header is that of the final
  1746.          destination.  At the originating node, that address will be in
  1747.          the last element of the Routing header; at the recipient(s),
  1748.          that address will be in the Destination Address field of the
  1749.          IPv6 header.
  1750.  
  1751.       o  The Next Header value in the pseudo-header identifies the
  1752.          upper-layer protocol (e.g., 6 for TCP, or 17 for UDP).  It will
  1753.          differ from the Next Header value in the IPv6 header if there
  1754.          are extension headers between the IPv6 header and the upper-
  1755.          layer header.
  1756.  
  1757.       o  The Payload Length used in the pseudo-header is the length of
  1758.          the upper-layer packet, including the upper-layer header.  It
  1759.          will be less than the Payload Length in the IPv6 header (or in
  1760.  
  1761.  
  1762. Deering & Hinden            Standards Track                    [Page 31]
  1763.  
  1764.  
  1765. RFC 1883                   IPv6 Specification              December 1995
  1766.  
  1767.  
  1768.          the Jumbo Payload option) if there are extension headers
  1769.          between the IPv6 header and the upper-layer header.
  1770.  
  1771.       o  Unlike IPv4, when UDP packets are originated by an IPv6 node,
  1772.          the UDP checksum is not optional.  That is, whenever
  1773.          originating a UDP packet, an IPv6 node must compute a UDP
  1774.          checksum over the packet and the pseudo-header, and, if that
  1775.          computation yields a result of zero, it must be changed to hex
  1776.          FFFF for placement in the UDP header.  IPv6 receivers must
  1777.          discard UDP packets containing a zero checksum, and should log
  1778.          the error.
  1779.  
  1780.    The IPv6 version of ICMP [RFC-1885] includes the above pseudo-header
  1781.    in its checksum computation; this is a change from the IPv4 version
  1782.    of ICMP, which does not include a pseudo-header in its checksum.  The
  1783.    reason for the change is to protect ICMP from misdelivery or
  1784.    corruption of those fields of the IPv6 header on which it depends,
  1785.    which, unlike IPv4, are not covered by an internet-layer checksum.
  1786.    The Next Header field in the pseudo-header for ICMP contains the
  1787.    value 58, which identifies the IPv6 version of ICMP.
  1788.  
  1789.  
  1790. 8.2 Maximum Packet Lifetime
  1791.  
  1792.    Unlike IPv4, IPv6 nodes are not required to enforce maximum packet
  1793.    lifetime.  That is the reason the IPv4 "Time to Live" field was
  1794.    renamed "Hop Limit" in IPv6.  In practice, very few, if any, IPv4
  1795.    implementations conform to the requirement that they limit packet
  1796.    lifetime, so this is not a change in practice.  Any upper-layer
  1797.    protocol that relies on the internet layer (whether IPv4 or IPv6) to
  1798.    limit packet lifetime ought to be upgraded to provide its own
  1799.    mechanisms for detecting and discarding obsolete packets.
  1800.  
  1801.  
  1802. 8.3 Maximum Upper-Layer Payload Size
  1803.  
  1804.    When computing the maximum payload size available for upper-layer
  1805.    data, an upper-layer protocol must take into account the larger size
  1806.    of the IPv6 header relative to the IPv4 header.  For example, in
  1807.    IPv4, TCP's MSS option is computed as the maximum packet size (a
  1808.    default value or a value learned through Path MTU Discovery) minus 40
  1809.    octets (20 octets for the minimum-length IPv4 header and 20 octets
  1810.    for the minimum-length TCP header).  When using TCP over IPv6, the
  1811.    MSS must be computed as the maximum packet size minus 60 octets,
  1812.    because the minimum-length IPv6 header (i.e., an IPv6 header with no
  1813.    extension headers) is 20 octets longer than a minimum-length IPv4
  1814.    header.
  1815.  
  1816.  
  1817.  
  1818.  
  1819. Deering & Hinden            Standards Track                    [Page 32]
  1820.  
  1821.  
  1822. RFC 1883                   IPv6 Specification              December 1995
  1823.  
  1824.  
  1825. Appendix A. Formatting Guidelines for Options
  1826.  
  1827.    This appendix gives some advice on how to lay out the fields when
  1828.    designing new options to be used in the Hop-by-Hop Options header or
  1829.    the Destination Options header, as described in section 4.2.  These
  1830.    guidelines are based on the following assumptions:
  1831.  
  1832.       o  One desirable feature is that any multi-octet fields within the
  1833.          Option Data area of an option be aligned on their natural
  1834.          boundaries, i.e., fields of width n octets should be placed at
  1835.          an integer multiple of n octets from the start of the Hop-by-
  1836.          Hop or Destination Options header, for n = 1, 2, 4, or 8.
  1837.  
  1838.       o  Another desirable feature is that the Hop-by-Hop or Destination
  1839.          Options header take up as little space as possible, subject to
  1840.          the requirement that the header be an integer multiple of 8
  1841.          octets long.
  1842.  
  1843.       o  It may be assumed that, when either of the option-bearing
  1844.          headers are present, they carry a very small number of options,
  1845.          usually only one.
  1846.  
  1847.    These assumptions suggest the following approach to laying out the
  1848.    fields of an option: order the fields from smallest to largest, with
  1849.    no interior padding, then derive the alignment requirement for the
  1850.    entire option based on the alignment requirement of the largest field
  1851.    (up to a maximum alignment of 8 octets).  This approach is
  1852.    illustrated in the following examples:
  1853.  
  1854.  
  1855.    Example 1
  1856.  
  1857.    If an option X required two data fields, one of length 8 octets and
  1858.    one of length 4 octets, it would be laid out as follows:
  1859.  
  1860.  
  1861.                                    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1862.                                    | Option Type=X |Opt Data Len=12|
  1863.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1864.    |                         4-octet field                         |
  1865.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1866.    |                                                               |
  1867.    +                         8-octet field                         +
  1868.    |                                                               |
  1869.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1870.  
  1871.  
  1872.    Its alignment requirement is 8n+2, to ensure that the 8-octet field
  1873.    starts at a multiple-of-8 offset from the start of the enclosing
  1874.  
  1875.  
  1876. Deering & Hinden            Standards Track                    [Page 33]
  1877.  
  1878.  
  1879. RFC 1883                   IPv6 Specification              December 1995
  1880.  
  1881.  
  1882.    header.  A complete Hop-by-Hop or Destination Options header
  1883.    containing this one option would look as follows:
  1884.  
  1885.  
  1886.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1887.    |  Next Header  | Hdr Ext Len=1 | Option Type=X |Opt Data Len=12|
  1888.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1889.    |                         4-octet field                         |
  1890.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1891.    |                                                               |
  1892.    +                         8-octet field                         +
  1893.    |                                                               |
  1894.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1895.  
  1896.  
  1897.  
  1898.    Example 2
  1899.  
  1900.    If an option Y required three data fields, one of length 4 octets,
  1901.    one of length 2 octets, and one of length 1 octet, it would be laid
  1902.    out as follows:
  1903.  
  1904.  
  1905.                                                    +-+-+-+-+-+-+-+-+
  1906.                                                    | Option Type=Y |
  1907.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1908.    |Opt Data Len=7 | 1-octet field |         2-octet field         |
  1909.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1910.    |                         4-octet field                         |
  1911.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1912.  
  1913.  
  1914.    Its alignment requirement is 4n+3, to ensure that the 4-octet field
  1915.    starts at a multiple-of-4 offset from the start of the enclosing
  1916.    header.  A complete Hop-by-Hop or Destination Options header
  1917.    containing this one option would look as follows:
  1918.  
  1919.  
  1920.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1921.    |  Next Header  | Hdr Ext Len=1 | Pad1 Option=0 | Option Type=Y |
  1922.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1923.    |Opt Data Len=7 | 1-octet field |         2-octet field         |
  1924.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1925.    |                         4-octet field                         |
  1926.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1927.    | PadN Option=1 |Opt Data Len=2 |       0       |       0       |
  1928.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1929.  
  1930.  
  1931.  
  1932.  
  1933. Deering & Hinden            Standards Track                    [Page 34]
  1934.  
  1935.  
  1936. RFC 1883                   IPv6 Specification              December 1995
  1937.  
  1938.  
  1939.    Example 3
  1940.  
  1941.    A Hop-by-Hop or Destination Options header containing both options X
  1942.    and Y from Examples 1 and 2 would have one of the two following
  1943.    formats, depending on which option appeared first:
  1944.  
  1945.  
  1946.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1947.    |  Next Header  | Hdr Ext Len=3 | Option Type=X |Opt Data Len=12|
  1948.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1949.    |                         4-octet field                         |
  1950.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1951.    |                                                               |
  1952.    +                         8-octet field                         +
  1953.    |                                                               |
  1954.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1955.    | PadN Option=1 |Opt Data Len=1 |       0       | Option Type=Y |
  1956.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1957.    |Opt Data Len=7 | 1-octet field |         2-octet field         |
  1958.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1959.    |                         4-octet field                         |
  1960.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1961.    | PadN Option=1 |Opt Data Len=2 |       0       |       0       |
  1962.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1963.  
  1964.  
  1965.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1966.    |  Next Header  | Hdr Ext Len=3 | Pad1 Option=0 | Option Type=Y |
  1967.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1968.    |Opt Data Len=7 | 1-octet field |         2-octet field         |
  1969.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1970.    |                         4-octet field                         |
  1971.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1972.    | PadN Option=1 |Opt Data Len=4 |       0       |       0       |
  1973.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1974.    |       0       |       0       | Option Type=X |Opt Data Len=12|
  1975.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1976.    |                         4-octet field                         |
  1977.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1978.    |                                                               |
  1979.    +                         8-octet field                         +
  1980.    |                                                               |
  1981.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990. Deering & Hinden            Standards Track                    [Page 35]
  1991.  
  1992.  
  1993. RFC 1883                   IPv6 Specification              December 1995
  1994.  
  1995.  
  1996. Security Considerations
  1997.  
  1998.    This document specifies that the IP Authentication Header [RFC-1826]
  1999.    and the IP Encapsulating Security Payload [RFC-1827] be used with
  2000.    IPv6, in conformance with the Security Architecture for the Internet
  2001.    Protocol [RFC-1825].
  2002.  
  2003. Acknowledgments
  2004.  
  2005.    The authors gratefully acknowledge the many helpful suggestions of
  2006.    the members of the IPng working group, the End-to-End Protocols
  2007.    research group, and the Internet Community At Large.
  2008.  
  2009. Authors' Addresses
  2010.  
  2011.    Stephen E. Deering                   Robert M. Hinden
  2012.    Xerox Palo Alto Research Center      Ipsilon Networks, Inc.
  2013.    3333 Coyote Hill Road                2191 E. Bayshore Road, Suite 100
  2014.    Palo Alto, CA 94304                  Palo Alto, CA 94303
  2015.    USA                                  USA
  2016.  
  2017.    Phone: +1 415 812 4839               Phone: +1 415 846 4604
  2018.    Fax:   +1 415 812 4471               Fax:   +1 415 855 1414
  2019.    EMail: deering@parc.xerox.com        EMail: hinden@ipsilon.com
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047. Deering & Hinden            Standards Track                    [Page 36]
  2048.  
  2049.  
  2050. RFC 1883                   IPv6 Specification              December 1995
  2051.  
  2052.  
  2053. References
  2054.  
  2055.    [RFC-1825]   Atkinson, R., "Security Architecture for the Internet
  2056.                 Protocol", RFC 1825, Naval Research Laboratory, August
  2057.                 1995.
  2058.  
  2059.    [RFC-1826]   Atkinson, R., "IP Authentication Header", RFC 1826,
  2060.                 Naval Research Laboratory, August 1995.
  2061.  
  2062.    [RFC-1827]   Atkinson, R., "IP Encapsulating Security Protocol
  2063.                 (ESP)", RFC 1827, Naval Research Laboratory, August
  2064.                 1995.
  2065.  
  2066.    [RFC-1885]   Conta, A., and S. Deering, "Internet Control Message
  2067.                 Protocol (ICMPv6) for the Internet Protocol Version 6
  2068.                 (IPv6) Specification", RFC 1885, Digital Equipment
  2069.                 Corporation, Xerox PARC, December 1995.
  2070.  
  2071.    [RFC-1884]   Hinden, R., and S. Deering, Editors, "IP Version 6
  2072.                 Addressing Architecture", RFC 1884, Ipsilon Networks,
  2073.                 Xerox PARC, December 1995.
  2074.  
  2075.    [RFC-1191]   Mogul, J., and S. Deering, "Path MTU Discovery", RFC
  2076.                 1191, DECWRL, Stanford University, November 1990.
  2077.  
  2078.    [RFC-791]    Postel, J., "Internet Protocol", STD 5, RFC 791,
  2079.                 USC/Information Sciences Institute, September 1981.
  2080.  
  2081.    [RFC-1700]   Reynolds, J., and J. Postel, "Assigned Numbers", STD 2,
  2082.                 RFC 1700, USC/Information Sciences Institute, October
  2083.                 1994.
  2084.  
  2085.    [RFC-1661]   Simpson, W., Editor, "The Point-to-Point Protocol
  2086.                 (PPP)", STD 51, RFC 1661, Daydreamer, July 1994.
  2087.  
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104. Deering & Hinden            Standards Track                    [Page 37]
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.