<?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-00"
     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="31" month="October" year="2019"/>

    <area>INT Area</area>

    <workgroup>6man WG</workgroup>

    <keyword>IPv6</keyword>

    <keyword>SRm6</keyword>

    <abstract>
      <t>This document defines the IPv6 CRH Helper option. When an SRm6
      ingress node originates a packet, it can use the IPv6 CRH Helper option
      to provide SID Forwarding Information Base (SFIB) information to
      downstream nodes that do not maintain a complete SFIB.</t>
    </abstract>
  </front>

  <middle>
    <section anchor="Intro" title="Introduction">
      <t><xref target="I-D.bonica-spring-srv6-plus">SRm6 </xref> leverages two
      new <xref target="RFC8200">IPv6 </xref> Routing types. Generically, they
      are called the <xref target="I-D.bonica-6man-comp-rtg-hdr">Compressed
      Routing Header (CRH) </xref>. More specifically, the 16-bit version of
      the CRH is called the CRH-16, while the 32-bit version of the CRH is
      called the CRH-32.</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 SRm6 path egress node.</t>

          <t>Segment Identifier (SID) List - Represents the SRm6 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 node encounters and recognizes the CRH, it processes
      the CRH as follows:</t>

      <t><list style="symbols">
          <t>If Segments Left equal 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 SID Forwarding
          Information Base (SFIB), searching for an entry that is indexed by
          the current SID.</t>

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

      <t>In a typical SRm6 deployment, every segment ingress node maintains a
      complete SFIB and the above-mentioned query returns an SFIB entry.
      However, in some SRm6 deployments, some segment ingress nodes maintain a
      complete SFIB while others do not. The following are reasons why a
      segment ingress node might not maintain a complete SFIB:</t>

      <t><list style="symbols">
          <t>the node is a Network Interface Card (NIC) in a data center.
          Although it originates many segments, it does not participate in the
          <xref target="I-D.bonica-lsr-crh-isis-extensions">SRm6 control
          plane</xref>.</t>

          <t>the node resides in another autonomous system and does not
          participate in the SRm6 control plane.</t>
        </list>This document defines the IPv6 CRH Helper option. When an SRm6
      path ingress node originates a packet, it can use the IPv6 CRH Helper
      option to provide SFIB information to downstream nodes that do not
      maintain a complete SFIB.</t>

      <t>If a segment ingress node queries its SFIB, searching for an entry
      that is indexed by the current SID, and that query returns nothing, the
      segment ingress node can obtain the required SFIB information from the
      IPv6 CRH Helper option. If the segment ingress node cannot obtain the
      required SFIB information from either source, it discards the packet
      sends an <xref target="I-D.bonica-lsr-crh-isis-extensions">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>SFIB Helper (SFIBH) List - (Variable length) A list of
          SFIBHs.</t>
        </list></t>

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

      <t><list style="symbols">
          <t>SFIBH Length - (8-bits) Length of the SFIBH, in octets, excluding
          SFIBH 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 SFIBH applies.</t>

          <t>High SID - (8-bits) Index to the CRH SID List. References the
          last member of the SID List to which this SFIBH 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 SFIB. If it cannot resolve
      the SID using SFIB, it attempts to resolve the SID using information
      received in an applicable SFIBH. If no SFIBH 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 an SFIBH 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 SFIBH</t>
        </list></t>

      <t>If the prefix found in the applicable SFIBH 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, the SID is understood to be a prefix SID.
      Therefore, the packet is forwarded to its destination via the least cost
      path.</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 SFIB. If it can resolve the
      SID using SFIB, it MUST ignore the CRH Helper option, even if it
      contains an applicable SFIBH.</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 include='reference.I-D.bonica-spring-srv6-plus'?>

      <?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>

    <references title="Informative References">
      <?rfc include='reference.I-D.bonica-lsr-crh-isis-extensions'?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>

      <?rfc ?>
    </references>
  </back>
</rfc>
