<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-bonica-6man-crh-helper-opt-04"
     ipr="trust200902">
  <front>
    <title abbrev="CRH Helper Option">Compressed Routing Header (CRH) Helper
    Option</title>

    <author fullname="Xing Li" initials="X." surname="Li">
      <organization>CERNET Center/Tsinghua University</organization>

      <address>
        <postal>
          <street>Room 225, Main Building, Tsinghua University</street>

          <city>Beijing</city>

          <code>100084</code>

          <country>People's Republic of China</country>
        </postal>

        <email>xing@cernet.edu.cn</email>
      </address>
    </author>

    <author fullname="Congxiao Bao" initials="C." surname="Bao">
      <organization>CERNET Center/Tsinghua University</organization>

      <address>
        <postal>
          <street>Room 225, Main Building, Tsinghua University</street>

          <city>Beijing</city>

          <code>100084</code>

          <country>People's Republic of China</country>
        </postal>

        <email>congxiao@cernet.edu</email>
      </address>
    </author>

    <author fullname="Eddie Ruan" initials="E." surname="Ruan">
      <organization>Fungible Inc.</organization>

      <address>
        <postal>
          <street>3201 Scott Blvd</street>

          <city>Santa Clara</city>

          <region>California</region>

          <code>95054</code>

          <country>USA</country>
        </postal>

        <email>eddie.ruan@fungible.com</email>
      </address>
    </author>

    <author fullname="Ron Bonica" initials="R." surname="Bonica">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street>2251 Corporate Park Drive</street>

          <city>Herndon</city>

          <code>20171</code>

          <region>Virginia</region>

          <country>USA</country>
        </postal>

        <email>rbonica@juniper.net</email>
      </address>
    </author>

    <date day="11" month="October" year="2021"/>

    <area>INT Area</area>

    <workgroup>6man WG</workgroup>

    <keyword>IPv6</keyword>

    <keyword/>

    <abstract>
      <t>This document defines the IPv6 Compressed Routing Header (CRH) Helper
      option. When a source node sends a packet with a CRH, it can use the CRH
      Helper option to provide additional information to downstream nodes.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Intro" title="Introduction">
      <t><xref target="RFC8200">IPv6</xref> source nodes use the <xref
      target="I-D.bonica-6man-comp-rtg-hdr">Compressed Routing Header
      (CRH)</xref> to steer packets along a delivery path to their
      destination. Two CRH versions have been defined. The CRH-16 encodes
      segment endpoints in 16 bits, while CRH-32, encodes segment endpoints in
      32 bits.</t>

      <t>Both CRH versions contain the following fields:</t>

      <t><list style="symbols">
          <t>Next Header - Identifies the header immediately following the
          CRH.</t>

          <t>Hdr Ext Len - Length of the CRH.</t>

          <t>Routing Type - Identifies the Routing header variant (i.e.,
          CRH-16 or CRH-32).</t>

          <t>Segments Left - The number of segments still to be traversed
          before reaching the packet's ultimate destination.</t>

          <t>Segment Identifier (SID) List - Represents the delivery path as
          an ordered list of Segment Identifiers (SID). SIDs are listed in
          reverse order, with SID[0] representing the final segment, SID[1]
          representing the penultimate segment, and so forth. SIDs are listed
          in reverse order so that Segments Left can be used as an index to
          the SID List. The SID indexed by Segments Left is called the current
          SID.</t>
        </list></t>

      <t>As per <xref target="RFC8200"/>, when an IPv6 node receives a packet,
      it examines the packet's destination address. If the destination address
      represents an interface belonging to the node, the node processes the
      next header. If the next header is a CRH, it is processed as
      follows:</t>

      <t><list style="symbols">
          <t>If Segments Left equals 0, skip over the CRH and process the next
          header in the packet.</t>

          <t>Decrement Segments Left.</t>

          <t>Query a local data structure, called the CRH Forwarding
          Information Base (CRH-FIB), searching for an entry that is indexed
          by the current SID.</t>

          <t>If the above-mentioned query returns a CRH-FIB entry, update the
          packet's IPv6 Destination Address and forward the packet.</t>
        </list></t>

      <t>In a typical CRH deployment, every segment ingress node maintains a
      complete CRH-FIB and the above-mentioned query returns a CRH-FIB entry.
      However, in some CRH deployments, some segment ingress nodes maintain a
      complete CRH-FIB while others do not. For example, a node that does not
      participate in a control plane or communicate with a controller may not
      maintain a CRH-FIB.</t>

      <t>This document defines the IPv6 CRH Helper option. When a source node
      sends a packet with a CRH, it can use the IPv6 CRH Helper option to
      provide CRH-FIB information to downstream nodes that do not maintain a
      complete CRH-FIB.</t>

      <t>If a segment ingress node queries its CRH-FIB, searching for an entry
      that is indexed by the current SID, and that query returns nothing, the
      segment ingress node can obtain the required CRH-FIB information from
      the IPv6 CRH Helper option. If the segment ingress node cannot obtain
      the required CRH-FIB information from either source, it discards the
      packet and sends an <xref target="RFC4443">ICMPv6 </xref> Parameter
      Problem message to the source node.</t>
    </section>

    <section anchor="ReqLang" title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in <xref
      target="RFC2119">BCP 14</xref> <xref target="RFC8174"/> when, and only
      when, they appear in all capitals, as shown here.</t>
    </section>

    <section title="Option Format">
      <t>The CRH Helper option contains the following fields:</t>

      <t><list style="symbols">
          <t>Option Type - (8-bits) CRH Helper option. Value TBD by IANA.
          (Suggested value: 0x11). See Note below.</t>

          <t>Opt Data Len - (8-bits) Length of the option, in octets,
          excluding the Option Type and Option Length fields.</t>

          <t>Helper List - (Variable length) A list of Helpers.</t>
        </list></t>

      <t>Each Helper contains the following fields:</t>

      <t><list style="symbols">
          <t>Helper Length - (8-bits) Length of the Helper, in octets,
          excluding Helper Length. Value MUST be greater than 2 and less than
          19.</t>

          <t>Low SID - (8-bits) Index to the CRH SID List. References the
          first member of the SID List to which this Helper applies.</t>

          <t>High SID - (8-bits) Index to the CRH SID List. References the
          last member of the SID List to which this Helper applies.</t>

          <t>Prefix field (variable length): An IPv6 Prefix.</t>
        </list></t>

      <t>NOTE : The highest-order two bits of the Option Type (i.e., the "act"
      bits) are 00. These bits specify the action taken by a destination node
      that does not recognize the option. The required action is to skip over
      this option and continue processing the header.</t>

      <t>The third highest-order bit of the Option Type (i.e., the "chg" bit)
      is 0. This indicates that Option Data cannot be modified along the path
      between the packet's source and its destination.</t>
    </section>

    <section title="Option Processing">
      <t>When a segment endpoint node processes a CRH, it attempts to resolve
      the SID using information contained by its CRH-FIB. If it cannot resolve
      the SID using CRH-FIB, it attempts to resolve the SID using information
      received in an applicable Helper. If no Helper applies to the current
      SID, the processing node discards the packet and sends an ICMPv6
      Parameter Problem message to the source node.</t>

      <t>When the processing node uses a Helper to resolve a SID, it executes
      the following procedure:</t>

      <t><list style="symbols">
          <t>Set the IPv6 Destination Address to 0::</t>

          <t>Overwrite the low order bits of the IPv6 Destination Address with
          the current SID found in the CRH</t>

          <t>Overwrite the high order bits of the IPv6 Destination Address
          with the prefix found in the applicable Helper</t>
        </list></t>

      <t>If the prefix found in the applicable Helper is 16 bytes long, it
      overwrites the entire IPv6 Destination Address.</t>

      <t>The CRH Helper option MAY occur in a Destination Options header that
      precedes a CRH. It SHOULD NOT occur in a Hop-by-hop options header or in
      a Destination Options header that precedes an upper-layer header.</t>

      <t>When a segment ingress node resolves a SID using information obtained
      from the CRH helper option, it forwards the packet through the
      least-cost path to its new destination.</t>

      <t>Information obtained from the CRH Helper option is transient. It is
      discarded as soon as the packet that carried it has been processed.</t>
    </section>

    <section title="Security Considerations">
      <t>When a segment endpoint node processes a CRH, it attempts to resolve
      the SID using information contained by its CRH-FIB. If it can resolve
      the SID using CRH-FIB, it MUST ignore the CRH Helper option, even if it
      contains an applicable Helper.</t>
    </section>

    <section title="IANA Considerations">
      <t>IANA is requested to allocate a code point from the Destination
      Options and Hop-by-hop Options registry
      (https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml#ipv6-parameters-2).
      This option is called "CRH Helper Option". The "act" bits are 00 and the
      "chg" bit is 0. (Suggested value: 0x11).</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>Thanks to TBD for their careful review of this document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.4443'?>

      <?rfc ?>

      <?rfc include='reference.I-D.bonica-6man-comp-rtg-hdr"?>

      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8200'?>
    </references>
  </back>
</rfc>
