<?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-tokar-pce-sid-algo-03" ipr="trust200902">
  <front>
    <title abbrev="SID Algorithm in PCEP">
    Carrying SID Algorithm information in PCE-based Networks.
    </title>

    <author fullname="Alex Tokar" initials="A." surname="Tokar">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Eurovea Central 3.</street>
          <street>Pribinova 10</street>
          <city>Bratislava</city>
          <code>811 09</code>
          <country>Slovakia</country>
        </postal>
        <email>atokar@cisco.com</email>
      </address>
    </author>

    <author fullname="Samuel Sidor" initials="S." surname="Sidor">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Eurovea Central 3.</street>
          <street>Pribinova 10</street>
          <city>Bratislava</city>
          <code>811 09</code>
          <country>Slovakia</country>
        </postal>
        <email>ssidor@cisco.com</email>
      </address>
    </author>

    <author fullname="Siva Sivabalan" initials="S." surname="Sivabalan">
      <organization>Ciena</organization>
      <address>
        <postal>
          <street>385 Terry Fox Drive</street>
          <city>Kanata</city>
          <region>Ontario</region>
          <code>K2K 0L1</code>
          <country>Canada</country>
        </postal>
        <email>msiva282@gmail.com</email>
      </address>
    </author>

    <author fullname="Shuping Peng" initials="S." surname="Peng">
      <organization>Huawei Technologies</organization>
       <address>
        <postal>
          <street>Huawei Campus, No. 156 Beiqing Rd.</street>
           <city>Beijing</city>
           <region/>
           <code>100095</code>
           <country>China</country>
        </postal>
         <phone/>
         <facsimile/>
         <email>pengshuping@huawei.com</email>
         <uri/>
      </address>
    </author>

    <author initials="M" surname="Negi" fullname="Mahendra Singh Negi">
      <organization>RtBrick Inc</organization>
      <address>
        <postal>
          <street/>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code/>
          <country>India</country>
        </postal>
        <email>mahend.ietf@gmail.com</email>
      </address>
    </author>

    <date day="19" month="February" year="2021" />

    <workgroup>PCE Working Group</workgroup>

    <abstract>

      <t>The Algorithm associated with a prefix Segment-ID (SID) defines the path computation Algorithm used by Interior Gateway Protocols (IGPs).  This information is available to controllers such as the Path Computation Element (PCE) via topology learning.  This document proposes an approach for informing headend routers regarding the Algorithm associated with each prefix SID used in PCE-computed paths, as well as signalling a specific SID algorithm as a constraint to the PCE.</t> 

    </abstract> 

    <note 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 BCP
      14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> when,
      and only when, they appear in all capitals, as shown here.</t>
    </note>
  </front>
  <middle>
    <section anchor="Introduction" title="Introduction">

      <t>A PCE can compute SR-TE paths using prefix SIDs with different Algorithms depending on the use-case, constraints, etc.  While this information is available on the PCE, there is no method of conveying this information to the headend router.</t>

      <t>Similarly, the headend can also compute SR-TE paths using different Algorithms, and this information also needs to be conveyed to the PCE for collection or troubleshooting purposes.  In addition, in the case of multiple (redundant) PCEs, when the headend receives a path from the primary PCE, it needs to be able to report the complete path information - including the Algorithm - to the backup PCE so that in HA scenarios, the backup PCE can verify the prefix SIDs appropriately.</t>

      <t>An operator may also want to constrain the path computed by the PCE to a specific SID Algorithm, for example, in order to only use SID Algorithms for a low-latency path.  A new TLV is introduced for this purpose.</t>

      <t>Refer to <xref target="RFC8665"/> and <xref target="RFC8667"/> for details about the prefix SID Algorithm.</t>

      <t>This document introduces two new NAI types for the SR-ERO subobject, which is defined in <xref target="RFC8664"/>.  A new TLV for signalling SID Algorithm constraint to the PCE is also introduced, to be carried inside the LSPA object, which is defined in <xref target="RFC5440"/>.</t>

      <t>The mechanisms described in this document are equally applicable to both SR-MPLS and SRv6.</t>

    </section>

    <section title="Terminology">
      <t>The following terminologies are used in this document:
	    <list style="hanging">
          <t hangText="ERO:"> Explicit Route Object</t>
          <t hangText="IGP:"> Interior Gateway Protocol</t>
          <t hangText="NAI:"> Node or Adjacency Identifier.</t>
          <t hangText="PCE:"> Path Computation Element</t>
          <t hangText="PCEP:"> Path Computation Element Protocol.</t>
          <t hangText="SID:"> Segment Identifier.</t>
          <t hangText="SR:"> Segment Routing.</t>
          <t hangText="SR-TE:"> Segment Routing Traffic Engineering.</t>
          <t hangText="LSP:"> Label Switched Path.</t>
          <t hangText="LSPA:"> Label Switched Path Attributes.</t>
        </list>
      </t>
    </section>

    <section anchor="OBJECT-FORMATS" title="Object Formats">

      <section anchor="SR-ERO-SUBOBJECT" title="SR ERO Subobject">
        <t>The SR-ERO subobject encoding is extended with additional NAI types.</t>

        <t>The following new NAI types (NT) are defined:
          <list style="symbols">
            <t>NT=TBD1: The NAI is an IPv4 node ID with Algorithm.</t>
            <t>NT=TBD2: The NAI is an IPv6 node ID with Algorithm.</t>
          </list>
        </t>

        <t>This document defines the following NAIs:
          <list style="hanging">
            <t hangText="'IPv4 Node ID with Algorithm'">is specified as an IPv4 address and Algorithm identifier.  In this case, the NT value is TBD1 and the NAI field length is 8 octets.
              <figure anchor="IPV4-NODE-ALGO-SR-ERO-SUBOBJECT" title="NAI for IPv4 Node SID with Algorithm">
                <artwork><![CDATA[
     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                      Node IPv4 address                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                  Reserved                     |  Algorithm    | 
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                ]]></artwork>
              </figure>
            </t>
            <t hangText="'IPv6 Node ID with Algorithm'">is specified as an IPv6 address and Algorithm identifier.  In this case, the NT value is TBD2 and the NAI field length is 20 octets.
              <figure anchor="IPV6-NODE-ALGO-SR-ERO-SUBOBJECT" title="NAI for IPv6 Node SID with Algorithm">
                <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  //               Node IPv6 address (16 octets)                 //
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                  Reserved                     |  Algorithm    | 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                ]]></artwork>
              </figure>
            </t>
          </list>
        </t>
      </section>

      <section anchor="LSPA-OBJECT" title="LSPA Object">
        <t>A new TLV for the LSPA Object with TLV type=TBD3 is introduced to carry the SID Algorithm constraint.  This TLV SHOULD only be used when PST (Path Setup type) = SR or SRv6.</t>

        <t>The format of the SID Algorithm TLV is as follows:</t>
        <figure anchor="SID-ALGORITHM-TLV-FMT" title="SID Algorithm TLV Format">
          <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Type=TBD3             |            Length=4           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Reserved              |   Flags     |L|   Algorithm   |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>

        <t>The code point for the TLV type is TBD3. The TLV length is 4 octets.</t>

        <t>The 32-bit value is formatted as follows.
          <list style="hanging">
            <t hangText="Reserved:"> MUST be set to zero by the sender and MUST be ignored by the receiver.</t>
            <t hangText="Flags:"> This document defines the following flag bits.  The other bits
              MUST be set to zero by the sender and MUST be ignored by the receiver.
              <list style="symbols">
                <t>L (Loose): If set to 1, the PCE MAY insert prefix SIDs with a different Algorithm, but it MUST prefer the specified Algorithm whenever possible.</t>
              </list>
            </t>
            <t hangText="Algorithm:"> SID Algorithm the PCE MUST take into acount while computing a path for the LSP.</t>
          </list>
        </t>

      </section>

    </section>

    <section anchor="Operation" title="Operation">

      <section anchor="SR-ERO-NAI-ENCODING" title="SR-ERO NAI Encoding">

        <t>IPv4 prefix SIDs used by SR-TE paths with an associated Algorithm SHOULD be encoded with 'IPv4 Node ID with Algorithm' NAI.</t>

        <t>IPv6 prefix SIDs used by SR-TE paths with an associated Algorithm SHOULD be encoded with 'IPv6 Node ID with Algorithm' NAI.</t>

      </section>

      <section anchor="SID-ALGORITHM-CONSTRAINT" title="SID Algorithm Constraint">

        <t>In order to signal a specific SID Algorithm constraint to the PCE, the headend MUST encode the SID ALGORITHM TLV inside the LSPA object.</t>

        <t>When the PCE receives a SID Algorithm constraint, it MUST only take prefix SIDs with the specified Algorithm into account during path computation.  However, if the L flag is set in the SID Algorithm TLV, the PCE MAY insert prefix SIDs with a different Algorithm in order to successfully compute a path.</t>

        <t>If the PCE is unable to find a path with the given SID Algorithm constraint, it MUST bring the LSP down.</t>

        <t>SID Algorithm does not replace the Objective Function defined in <xref target="RFC5541"/>. The SID Algorithm constraint acts as a filter, restricting which SIDs may be used as a result of the path computation function.</t>
      </section>

    </section>

    <section anchor="Security" title="Security Considerations">

      <t>No additional security measure is required.</t>

    </section>

    <section anchor="IANA" title="IANA Considerations">

      <section anchor="NAI-Type" title="PCEP SR-ERO NAI Types">

        <t>IANA is requested to allocate new SR-ERO NAI types for the new NAI types specified in this document.</t>

        <texttable anchor="PSR-ERO-NAI-type" style="none" suppress-title="true">
          <ttcol align="center" width='15%'>Value</ttcol>
          <ttcol align="left" width='30%'>Description </ttcol>
          <ttcol align="left" width='55%'>Reference </ttcol>
          <c></c><c>&nbsp;</c><c></c>
          <c>TBD1</c><c>IPv4 Node ID with Algorithm</c><c>This document</c>
          <c>TBD2</c><c>IPv6 Node ID with Algorithm</c><c>This document</c>
        </texttable>

      </section>

      <section anchor="TLV-Type" title="PCEP TLV Types">

        <t>IANA is requested to allocate a new TLV type for the new LSPA TLV specified in this document.</t>

        <texttable anchor="PSR-TLV-type" style="none" suppress-title="true">
          <ttcol align="center" width='15%'>Value</ttcol>
          <ttcol align="left" width='30%'>Description </ttcol>
          <ttcol align="left" width='55%'>Reference </ttcol>
          <c></c><c>&nbsp;</c><c></c>
          <c>TBD3</c><c>SID Algorithm</c><c>This document</c>
        </texttable>

      </section>

    </section>

  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5440.xml"?>
	  <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5541.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8664.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8665.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8667.xml"?>
    </references>

<section title="Contributors">

<t><figure><artwork>
Mike Koldychev
Cisco Systems
Kanata, Ontario
Canada

EMail: mkoldych@cisco.com
</artwork></figure></t>

</section> <!-- Contributors -->

  </back>

</rfc>
