<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std"
     number="8664" ipr="trust200902"
     docName="draft-ietf-pce-segment-routing-16" updates="8408" submissionType="IETF" consensus="true" obsoletes="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 2.32.0 -->
  <front>
    <title abbrev="PCEP Extensions for Segment Routing">
    Path Computation Element Communication Protocol (PCEP) Extensions for
    Segment Routing</title>
    <seriesInfo name="RFC" value="8664"/>
    <author fullname="Siva Sivabalan" initials="S." surname="Sivabalan">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>2000 Innovation Drive</street>
          <city>Kanata</city>
          <region>Ontario</region>
          <code>K2K 3E8</code>
          <country>Canada</country>
        </postal>
        <email>msiva@cisco.com</email>
      </address>
    </author>
    <author fullname="Clarence Filsfils" initials="C." surname="Filsfils">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Pegasus Parc</street>
          <city>De kleetlaan 6a</city>
          <region>Diegem</region>
          <code>Brabant 1831</code>
          <country>Belgium</country>
        </postal>
        <email>cfilsfil@cisco.com</email>
      </address>
    </author>
    <author fullname="Jeff Tantsura" initials="J." surname="Tantsura">
      <organization>Apstra, Inc.</organization>
      <address>
        <postal>
          <street>333 Middlefield Rd #200</street>
          <city>Menlo Park</city>
          <region>CA</region>
          <code>94025</code>
          <country>United States of America</country>
        </postal>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Wim Henderickx" initials="W." surname="Henderickx">
      <organization>Nokia</organization>
      <address>
        <postal>
          <street>Copernicuslaan 50 </street>
          <city>Antwerp 2018</city>
          <region>CA</region>
          <code>95134</code>
          <country>Belgium</country>
        </postal>
        <email>wim.henderickx@nokia.com</email>
      </address>
    </author>
    <author fullname="Jon Hardwick" initials="J." surname="Hardwick">
      <organization>Metaswitch Networks</organization>
      <address>
        <postal>
          <street>100 Church Street</street>
          <city>Enfield</city>
          <region>Middlesex</region>
          <country>United Kingdom</country>
        </postal>
        <email>jonathan.hardwick@metaswitch.com</email>
      </address>
    </author>
    <date month="December" year="2019"/>
    <workgroup>PCE</workgroup>
<keyword>SR</keyword>
<keyword>Traffic-Engineering</keyword>
<keyword>PCE</keyword>

    <abstract>
      <t>Segment Routing (SR) enables any head-end node to select any path without relying on a hop-by-hop signaling technique (e.g., LDP or RSVP-TE). It depends only on "segments" that are advertised by link-state Interior Gateway Protocols (IGPs). An SR path can be derived from a variety of mechanisms, including an IGP Shortest Path Tree (SPT), an explicit configuration, or a Path Computation Element (PCE). This document specifies extensions to the Path Computation Element Communication Protocol (PCEP) that allow a stateful PCE to compute and initiate Traffic-Engineering (TE) paths, as well as a Path Computation Client (PCC) to request a path subject to certain constraints and optimization criteria in SR networks.</t>
<t>
This document updates RFC 8408.
</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>Segment Routing (SR) leverages the source-routing paradigm. Using
SR, a source node steers a packet through a path without relying on
hop-by-hop signaling protocols such as LDP or RSVP-TE. Each path is
specified as an ordered list of instructions called "segments".  Each
segment is an instruction to route the packet to a specific place in
the network or to perform a function on the packet.  A database of
segments can be distributed through the network using a routing
protocol (such as IS-IS or OSPF) or by any other means.  Several types
of segments are defined. A node segment uniquely identifies a specific
node in the SR domain. Each router in the SR domain associates a node
segment with an ECMP-aware shortest path to the node that it
identifies. An adjacency segment represents a unidirectional
adjacency. An adjacency segment is local to the node that advertises
it. Both node segments and adjacency segments can be used for SR.</t>
      <t><xref target="RFC8402" format="default"/> describes the SR architecture.  The
corresponding IS-IS and OSPF extensions are specified in <xref target="RFC8667" format="default"/> and <xref target="RFC8665" format="default"/>, respectively.</t>
      <t>The SR architecture can be implemented using either an MPLS
forwarding plane <xref target="RFC8660" format="default"/> or an IPv6 forwarding plane
<xref target="I-D.ietf-6man-segment-routing-header" format="default"/>.  The MPLS forwarding plane can be applied
to SR without any change; in which case, an SR path corresponds to an
MPLS Label Switching Path (LSP). This document is relevant to the MPLS
forwarding plane only. In this document, "Node-SID" and
"Adj-SID" denote the Node Segment Identifier and Adjacency
Segment Identifier, respectively.</t>
      <t>An SR path can be derived from an IGP Shortest Path Tree
(SPT). Segment Routing Traffic-Engineering (SR-TE) paths may not
follow an IGP SPT. Such paths may be chosen by a suitable network
planning tool and provisioned on the ingress node of the SR-TE
path.</t>
      <t> <xref target="RFC5440" format="default"/> describes the Path Computation Element
Communication Protocol (PCEP) for communication between a Path
Computation Client (PCC) and a Path Computation Element (PCE) or
between a pair of PCEs. A PCE computes paths for MPLS
Traffic-Engineering (MPLS-TE) LSPs based on various constraints and
optimization criteria. <xref target="RFC8231" format="default"/> specifies extensions
to PCEP that allow a stateful PCE to compute and recommend network
paths in compliance with <xref target="RFC4657" format="default"/>.  It also defines objects
and TLVs for MPLS-TE LSPs. Stateful PCEP extensions provide
synchronization of LSP state between a PCC and a PCE or between a pair
of PCEs, delegation of LSP control, reporting of LSP state from a PCC
to a PCE, and control of the setup and path routing of an LSP from a
PCE to a PCC. Stateful PCEP extensions are intended for an operational
model in which LSPs are configured on the PCC, and control over them
is delegated to the PCE.</t>
      <t>A mechanism to dynamically initiate LSPs on a PCC based on the requests from a stateful PCE or a controller using stateful PCE is specified in <xref target="RFC8281" format="default"/>. This mechanism is useful in Software-Defined Networking (SDN) applications, such as on-demand engineering or bandwidth calendaring <xref target="RFC8413" format="default"/>.</t>
      <t>It is possible to use a stateful PCE for computing one or more SR-TE paths, taking into account various constraints and objective functions. Once a path is chosen, the stateful PCE can initiate an SR-TE path on a PCC using the PCEP extensions specified in <xref target="RFC8281" format="default"/> and the SR-specific PCEP extensions specified in this document. Additionally, using procedures described in this document, a PCC can request an SR path from either a stateful or a stateless PCE.</t>
      <t>This specification relies on the procedures specified in <xref target="RFC8408" format="default"/> to exchange the Segment Routing capability and to specify that the path setup type of an LSP is Segment Routing.  This specification also updates <xref target="RFC8408" format="default"/> to clarify the use of sub-TLVs in the PATH-SETUP-TYPE-CAPABILITY TLV.  See <xref target="pst-cap-tlv" format="default"/> for details.</t>
      <t>This specification provides a mechanism for a network controller (acting as a PCE) to instantiate candidate paths for an SR Policy onto a head-end node (acting as a PCC) using PCEP.  For more information on the SR Policy Architecture, see <xref target="I-D.ietf-spring-segment-routing-policy" format="default"/>.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Terminology</name>
      <t>The following terminology is used in this document:

      </t>
      <dl newline="false" spacing="normal" indent="8">
        <dt>ERO:</dt>
        <dd> Explicit Route Object</dd>
        <dt>IGP:</dt>
        <dd> Interior Gateway Protocol</dd>
        <dt>IS-IS:</dt>
        <dd> Intermediate System to Intermediate System</dd>
        <dt>LSR:</dt>
        <dd> Label Switching Router</dd>
        <dt>MSD:</dt>
        <dd> Base MPLS Imposition Maximum SID Depth, as defined in <xref target="RFC8491" format="default"/></dd>
        <dt>NAI:</dt>
        <dd> Node or Adjacency Identifier</dd>
        <dt>OSPF:</dt>
        <dd> Open Shortest Path First</dd>
        <dt>PCC:</dt>
        <dd> Path Computation Client</dd>
        <dt>PCE:</dt>
        <dd> Path Computation Element</dd>
        <dt>PCEP:</dt>
        <dd> Path Computation Element Communication Protocol</dd>
        <dt>RRO:</dt>
        <dd> Record Route Object</dd>
        <dt>SID:</dt>
        <dd> Segment Identifier</dd>
        <dt>SR:</dt>
        <dd> Segment Routing</dd>
        <dt>SR-DB:</dt>
        <dd> Segment Routing Database: the collection of SRGBs, SRLBs, and SIDs and the objects they map to, advertised by a link-state IGP</dd>
        <dt>SR-TE:</dt>
        <dd> Segment Routing Traffic Engineering</dd>
        <dt>SRGB:</dt>
        <dd> Segment Routing Global Block</dd>
        <dt>SRLB:</dt>
        <dd> Segment Routing Local Block</dd>
      </dl>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
	
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
    </section>
    <section anchor="Operation-Overview" numbered="true" toc="default">
      <name>Overview of PCEP Operation in SR Networks</name>
      <t>In an SR network, the ingress node of an SR path prepends an SR header to all outgoing packets.  The SR header consists of a list of SIDs (or MPLS labels in the context of this document).    The header has all
   necessary information so that, in combination with the information
   distributed by the IGP, the packets can be guided from the ingress
   node to the egress node of the path; hence, there is no need for
   any signaling protocol.
</t>
      <t>
   In PCEP messages, LSP route information is carried in the Explicit
   Route Object (ERO), which consists of a sequence of subobjects.
   SR-TE paths computed by a PCE can be represented in an ERO in one
   of the following forms:

</t>
      <ul spacing="normal">
        <li>An ordered set of IP addresses representing network nodes/links.</li>
        <li>An ordered set of SIDs, with or without the corresponding IP addresses.</li>
        <li>An ordered set of MPLS labels, with or without corresponding IP addresses.</li>
      </ul>
      <t>

The PCC converts these into an MPLS label stack and next hop, as described in <xref target="SR-ERO-INTERPRET" format="default"/>.

</t>
      <t>This document defines a new ERO subobject denoted by "SR-ERO subobject" that is capable of carrying a SID as well as the identity of the node/adjacency represented by the SID. SR-capable PCEP speakers should be able to generate and/or process such an ERO subobject. 
An ERO containing SR-ERO subobjects can be included in the PCEP Path Computation Reply (PCRep) message defined in <xref target="RFC5440" format="default"/>, the Path Computation LSP Initiate Request (PCInitiate) message defined in <xref target="RFC8281" format="default"/>, and the Path Computation Update Request (PCUpd) and Path Computation State Report (PCRpt) messages for LSPs defined in <xref target="RFC8231" format="default"/>.</t>
      <t>When a PCEP session between a PCC and a PCE is established, both PCEP speakers exchange their capabilities to indicate their ability to support SR-specific functionality.</t>
      <t>A PCE can update an LSP that is initially established via RSVP-TE
signaling to use an SR-TE path by sending a PCUpd to the PCC that
delegated the LSP to it <xref target="RFC8231" format="default"/>.  A PCC can update an
undelegated LSP that is initially established via RSVP-TE signaling to
use an SR-TE path as follows.  First, it requests an SR-TE path from a
PCE by sending a Path Computation Request (PCReq) message.  If it
receives a suitable path, it establishes the path in the data plane
and then tears down the original RSVP-TE path.  If the PCE is
stateful, then the PCC sends PCRpt messages indicating that the new
path is set up and the old path is torn down, per <xref target="RFC8231" format="default"/>.</t>
      <t>Similarly, a PCE or PCC can update an LSP initially created with an SR-TE path to use RSVP-TE signaling, if necessary. This capability is useful for rolling back a change when a network is migrated from RSVP-TE to SR-TE technology.</t>
      <t>A PCC <bcp14>MAY</bcp14> include a Record Route Object (RRO) containing the recorded LSP in PCReq and PCRpt messages as specified in <xref target="RFC5440" format="default"/> and <xref target="RFC8231" format="default"/>, respectively. This document defines a new RRO subobject for SR networks. The methods used by a PCC to record the SR-TE LSP are outside the scope of this document.</t>
      <t>In summary, this document:

      </t>
      <ul spacing="normal">
        <li>Defines a new ERO subobject, a new RRO subobject, and new PCEP error codes.</li>
        <li>Specifies how two PCEP speakers can establish a PCEP session that can carry information about SR-TE paths.</li>
        <li>Specifies processing rules for the ERO subobject.</li>
        <li>Defines a new path setup type to be used in the PATH-SETUP-TYPE and PATH-SETUP-TYPE-CAPABILITY TLVs <xref target="RFC8408" format="default"/>.</li>
        <li>Defines a new sub-TLV for the PATH-SETUP-TYPE-CAPABILITY TLV.</li>
      </ul>
      <t>The extensions specified in this document complement the existing
PCEP specifications to support SR-TE paths. As such, the PCEP messages
(e.g., PCReq, PCRep, PCRpt, PCUpd, PCInitiate, etc.) are formatted
according to <xref target="RFC5440" format="default"/>, <xref target="RFC8231" format="default"/>, <xref target="RFC8281" format="default"/>, and any other applicable PCEP specifications.</t>
    </section>
    <section anchor="object-formats" numbered="true" toc="default">
      <name>Object Formats</name>
      <section anchor="open-object-fmt" numbered="true" toc="default">
        <name>The OPEN Object</name>
        <section anchor="pst-cap-tlv" numbered="true" toc="default">
          <name>The Path Setup Type Capability TLV</name>
          <t><xref target="RFC8408" format="default"/> defines the PATH-SETUP-TYPE-CAPABILITY TLV
for use in the OPEN object.  The PATH-SETUP-TYPE-CAPABILITY TLV
contains an optional list of sub-TLVs, which are intended to convey
parameters that are associated with the path setup types supported by
a PCEP speaker.</t>
          <t>This specification updates <xref target="RFC8408" format="default"/> as follows.  It
creates a new registry that defines the valid type indicators of the
sub-TLVs of the PATH-SETUP-TYPE-CAPABILITY TLV (see <xref target="IANA-subTLV-Type-Indicators" format="default"/>).  A PCEP speaker <bcp14>MUST NOT</bcp14>
include a sub-TLV in the PATH-SETUP-TYPE-CAPABILITY TLV unless it
appears in this registry.  If a PCEP speaker receives a sub-TLV whose
type indicator does not match one of those from the registry or is not
recognized by the speaker, then the speaker <bcp14>MUST</bcp14> ignore the
sub-TLV.</t>
        </section>
        <section anchor="cap-negotiation" numbered="true" toc="default">
          <name>The SR PCE Capability Sub-TLV</name>
          <t>This document defines a new Path Setup Type (PST) for SR, as follows:
          </t>
          <ul spacing="normal" empty="true">
            <li><dl><dt>PST = 1:</dt><dd>Traffic-engineering path is set up using Segment Routing.</dd></dl></li>
          </ul>
          <t>A PCEP speaker <bcp14>SHOULD</bcp14> indicate its support of the function described in this document by sending a PATH-SETUP-TYPE-CAPABILITY TLV in the OPEN object with this new PST included in the PST list.</t>
          <t>This document also defines the SR-PCE-CAPABILITY sub-TLV.  PCEP speakers use this sub-TLV to exchange information about their SR capability. If a PCEP speaker includes PST=1 in the PST list of the PATH-SETUP-TYPE-CAPABILITY TLV, then it <bcp14>MUST</bcp14> also include the SR-PCE-CAPABILITY sub-TLV inside the PATH-SETUP-TYPE-CAPABILITY TLV.</t>
          <t>The format of the SR-PCE-CAPABILITY sub-TLV is shown in the following figure:</t>
          <figure anchor="Capability-TLV-Fmt">
            <name>SR-PCE-CAPABILITY Sub-TLV Format</name>
            <artwork align="center" name="" type="" alt=""><![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=26               |            Length=4           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Reserved              |   Flags   |N|X|      MSD      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>
          <t>The codepoint for the TLV type is 26. The TLV length is 4 octets.</t>
          <t>The 32-bit value is formatted as follows.
          </t>
          <dl newline="false" spacing="normal">
            <dt>Reserved:</dt>
            <dd> <bcp14>MUST</bcp14> be set to zero by the sender and <bcp14>MUST</bcp14> be ignored by the receiver.</dd>
            <dt>Flags:</dt>
            <dd>
              <t> This document defines the following flag bits.  The other bits
      <bcp14>MUST</bcp14> be set to zero by the sender and <bcp14>MUST</bcp14> be ignored by the receiver.
              </t>
              <ul spacing="normal" empty="true">
                <li><dl indent="5"><dt>N:</dt><dd>A PCC sets this flag bit to 1 to indicate that it is capable of resolving a Node or Adjacency Identifier (NAI) to a SID.</dd>
                <dt>X:</dt><dd>A PCC sets this flag bit to 1 to indicate that it does not impose any limit on the MSD.</dd></dl></li>
              </ul>
            </dd>
            <dt>Maximum SID Depth (MSD):</dt>
            <dd> specifies the maximum number of SIDs (MPLS label stack depth in the context of this document) that a PCC is capable of imposing on a packet.  <xref target="SR-CAP-PROCESS" format="default"/> explains the relationship between this field and the X-Flag.</dd>
          </dl>
        </section>
      </section>
      <section anchor="rp-object-fmt" numbered="true" toc="default">
        <name>The RP/SRP Object</name>
        <t>To set up an SR-TE LSP using SR, the Request Parameter (RP) or Stateful PCE Request Parameter (SRP) object <bcp14>MUST</bcp14> include the PATH-SETUP-TYPE TLV, specified in <xref target="RFC8408" format="default"/>, with the PST set to 1 (and path setup using SR-TE).</t>
        <t>The LSP-IDENTIFIERS TLV <bcp14>MAY</bcp14> be present for the above PST type.</t>
      </section>
      <section anchor="SR-ERO" numbered="true" toc="default">
        <name>ERO</name>
        <t>An SR-TE path consists of one or more SIDs where each SID <bcp14>MAY</bcp14> be associated with the identifier that represents the node or adjacency corresponding to the SID. This identifier is referred to as the NAI. As described later, an NAI can be represented in various formats (e.g., IPv4 address, IPv6 address, etc). Furthermore, an NAI is used for troubleshooting purposes and, if necessary, to derive a SID value as described below.</t>
        <t>The ERO specified in <xref target="RFC5440" format="default"/> is used to carry SR-TE path information. In order to carry a SID and/or NAI, this document defines a new ERO subobject referred to as the "SR-ERO subobject", whose format is specified in the following section. An ERO carrying an SR-TE path consists of one or more ERO subobjects, and it <bcp14>MUST</bcp14> carry only SR-ERO subobjects. Note that an SR-ERO subobject does not need to have both the SID and NAI. However, at least one of them <bcp14>MUST</bcp14> be present.</t>
        <t>When building the MPLS label stack from ERO, a PCC <bcp14>MUST</bcp14> assume that SR-ERO subobjects are organized as a last-in-first-out stack.  The first subobject relative to the beginning of ERO contains the information about the topmost label. The last subobject contains information about the bottommost label.</t>
        <section anchor="SR-ERO-SUB" numbered="true" toc="default">
          <name>SR-ERO Subobject</name>
          <t>An SR-ERO subobject is formatted as shown in the following diagram.</t>
          <figure anchor="SR-ERO-SUBOBJECT">
            <name>SR-ERO Subobject Format</name>
            <artwork name="" type="" align="left" alt=""><![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
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |L|   Type=36   |     Length    |  NT   |     Flags     |F|S|C|M|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                         SID (optional)                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  //                   NAI (variable, optional)                  //
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
          </figure>
          <t>The fields in the SR-ERO subobject are as follows:

</t>
          <dl newline="false" spacing="normal">

            <dt>The L-Flag:</dt>
            <dd> Indicates whether the subobject represents a loose hop in the LSP <xref target="RFC3209" format="default"/>. If this flag is set to zero, a PCC <bcp14>MUST NOT</bcp14> overwrite the SID value present in the SR-ERO subobject. Otherwise, a PCC <bcp14>MAY</bcp14> expand or replace one or more SID values in the received SR-ERO based on its local policy.</dd>
            <dt>Type:</dt>
            <dd> Set to 36. </dd>
            <dt>Length:</dt>
            <dd> Contains the total length of the subobject in octets. The Length <bcp14>MUST</bcp14> be at least 8 and <bcp14>MUST</bcp14> be a multiple of 4. An SR-ERO subobject <bcp14>MUST</bcp14> contain at least one SID or NAI. The flags described below indicate whether the SID or NAI fields are absent.</dd>
            <dt>NAI Type (NT):</dt>
            <dd><t>Indicates the type and format of the NAI contained in
	    the object body, if any is present. If the F bit is set to
	    zero (see below), then the NT field has no meaning and
	    <bcp14>MUST</bcp14> be ignored by the receiver.  This
	    document describes the following NT values:</t>
              <dl newline="false" spacing="normal">
                <dt>NT=0</dt>
                <dd>The NAI is absent.</dd>
                <dt>NT=1</dt>
                <dd>The NAI is an IPv4 node ID.</dd>
                <dt>NT=2</dt>
                <dd>The NAI is an IPv6 node ID.</dd>
                <dt>NT=3</dt>
                <dd>The NAI is an IPv4 adjacency.</dd>
                <dt>NT=4</dt>
                <dd>The NAI is an IPv6 adjacency with global IPv6
		addresses.</dd>
                <dt>NT=5</dt>
                <dd>The NAI is an unnumbered adjacency with IPv4 node
		IDs.</dd>
                <dt>NT=6</dt>
                <dd>The NAI is an IPv6 adjacency with link-local IPv6
		addresses.</dd>
              </dl>
	    </dd>

            <dt>Flags:</dt>
            <dd>
              <t> Used to carry additional information pertaining to the SID. This document defines the following flag bits. The other bits <bcp14>MUST</bcp14> be set to zero by the sender and <bcp14>MUST</bcp14> be ignored by the receiver.

</t>
              <dl newline="false" spacing="normal" indent="5">
                <dt>M:</dt>
                <dd>If this bit is set to 1, the SID value represents an MPLS label stack entry as specified in <xref target="RFC3032" format="default"/>. Otherwise, the SID value is an administratively configured value that represents an index into an MPLS label space (either SRGB or SRLB) per <xref target="RFC8402" format="default"/>.</dd>
                <dt>C:</dt>
                <dd>If the M bit and the C bit are both set to 1, then the TC, S, and TTL fields in the MPLS label stack entry are specified by the PCE. However, a PCC <bcp14>MAY</bcp14> choose to override these values according to its local policy and MPLS forwarding rules. If the M bit is set to 1 but the C bit is set to zero, then the TC, S, and TTL fields <bcp14>MUST</bcp14> be ignored by the PCC. The PCC <bcp14>MUST</bcp14> set these fields according to its local policy and MPLS forwarding rules. If the M bit is set to zero, then the C bit <bcp14>MUST</bcp14> be set to zero.</dd>
                <dt>S:</dt>
                <dd>When this bit is set to 1, the SID value in the subobject body is absent. In this case, the PCC is responsible for choosing the SID value, e.g., by looking it up in the SR-DB using the NAI that, in this case, <bcp14>MUST</bcp14> be present in the subobject. If the S bit is set to 1, then the M and C bits <bcp14>MUST</bcp14> be set to zero.</dd>
                <dt>F:</dt>
                <dd>When this bit is set to 1, the NAI value in the subobject body is absent.  The F bit <bcp14>MUST</bcp14> be set to 1 if NT=0; otherwise, it <bcp14>MUST</bcp14> be set to zero.  The S and F bits <bcp14>MUST NOT</bcp14> both be set to 1.</dd>
              </dl>
            </dd>
            <dt>SID:</dt>
            <dd>
              <t> The Segment Identifier. Depending on the M bit, it contains either:
              </t>
              <ul spacing="normal">
                <li>A 4-octet index defining the offset into an MPLS label space per <xref target="RFC8402" format="default"/> or</li>
                <li>A 4-octet MPLS label stack entry, where the 20 most significant bits encode the label value per <xref target="RFC3032" format="default"/>.</li>
              </ul>
            </dd>
            <dt>NAI:</dt>
            <dd> The NAI associated with the SID. The NAI's format depends on the value in the NT field and is described in the following section.</dd>
          </dl>
          <t>
At least one SID and NAI <bcp14>MUST</bcp14> be included in the SR-ERO subobject, and both <bcp14>MAY</bcp14> be included.
</t>
        </section>
        <section anchor="SR-ERO-NODAL-32" numbered="true" toc="default">
          <name>NAI Associated with SID</name>
          <t>This document defines the following NAIs:

</t>
          <dl newline="false" spacing="normal">
            <dt>IPv4 Node ID:</dt>
            <dd>Specified as an IPv4 address. In this case, the NT value is 1, and the NAI field length is 4 octets.</dd>
            <dt>IPv6 Node ID:</dt>
            <dd>Specified as an IPv6 address. In this case, the NT value is 2, and the NAI field length is 16 octets.</dd>
            <dt>IPv4 Adjacency:</dt>
            <dd>
              <t>Specified as a pair of IPv4 addresses. In this case, the NT value is 3, and the NAI field length is 8 octets.  The format of the NAI is shown in the following figure:

              </t>
              <figure anchor="ADJ-SID-ERO-SUBOBJECT-32">
                <name>NAI for IPv4 Adjacency</name>
                <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Local IPv4 address                       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                     Remote IPv4 address                       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure>
            </dd>
            <dt>IPv6 Global Adjacency:</dt>
            <dd>
              <t>Specified as a pair of global IPv6 addresses.  It is used to describe an IPv6 adjacency for a link that uses global IPv6 addresses.  Each global IPv6 address is configured on a specific router interface, so together they identify an adjacency between a pair of routers.  In this case, the NT value is 4, and the NAI field length is 32 octets. The format of the NAI is shown in the following figure:

              </t>
              <figure anchor="ADJ-SID-ERO-SUBOBJECT-128">
                <name>NAI for IPv6 Global Adjacency</name>
                <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //               Local IPv6 address (16 octets)                //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //               Remote IPv6 address (16 octets)               //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure>
            </dd>
            <dt>Unnumbered Adjacency with IPv4 NodeIDs:</dt>
            <dd>
              <t>Specified as a
pair of (node ID, interface ID) tuples. In this case, the NT value is
5, and the NAI field length is 16 octets. The format of the NAI is
shown in the following figure:

              </t>
              <figure anchor="ADJ-SID-ERO-UNNUM-32">
                <name>NAI for Unnumbered Adjacency with IPv4 Node IDs</name>
                <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Local Node ID                            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Local Interface ID                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                      Remote Node ID                           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                   Remote Interface ID                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure>
            </dd>
            <dt>IPv6 Link-Local Adjacency:</dt>
            <dd>
              <t>Specified as a pair of (global IPv6 address, interface ID) tuples.  It is used to describe an IPv6 adjacency for a link that uses only link-local IPv6 addresses. Each global IPv6 address is configured on a specific router, so together they identify a pair of adjacent routers. The interface IDs identify the link that the adjacency is formed over. In this case, the NT value is 6, and the NAI field length is 40 octets. The format of the NAI is shown in the following figure:

              </t>
              <figure anchor="ADJ-SID-ERO-LINKLOCAL-40">
                <name>NAI for IPv6 Link-Local Adjacency</name>
                <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //               Local IPv6 address (16 octets)                //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                    Local Interface ID                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //               Remote IPv6 address (16 octets)               //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                   Remote Interface ID                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure>
            </dd>
          </dl>
        </section>
      </section>
      <section anchor="SR-RRO" numbered="true" toc="default">
        <name>RRO</name>
        <t>A PCC reports an SR-TE LSP to a PCE by sending a PCRpt message, per <xref target="RFC8231" format="default"/>.  The RRO on this message represents the SID list that was applied by the PCC, that is, the actual path taken by the LSP.  The procedures of <xref target="RFC8231" format="default"/> with respect to the RRO apply equally to this specification without change.</t>
        <t>An RRO contains one or more subobjects called "SR-RRO subobjects", whose format is shown below:</t>
        <figure anchor="SR-RRO-SUBOBJECT">
          <name>SR-RRO Subobject Format</name>
          <artwork name="" type="" align="left" alt=""><![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=36    |     Length    |  NT   |     Flags     |F|S|C|M|
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                              SID                              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 //                        NAI (variable)                       //
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
        </figure>
        <t>The format of the SR-RRO subobject is the same as that of the SR-ERO subobject, but without the L-Flag.</t>
        <t>A PCC <bcp14>MUST</bcp14> order the SR-RRO subobjects such that the first subobject relative to the beginning of the RRO identifies the first segment visited by the SR-TE LSP, and the last subobject identifies the final segment of the SR-TE LSP, that is, its endpoint.</t>
      </section>
      <section anchor="SR-METRIC" numbered="true" toc="default">
        <name>METRIC Object</name>
        <t>A PCC <bcp14>MAY</bcp14> request that PCE optimizes an individual path computation request to minimize the SID depth of the computed path by using the METRIC object defined in <xref target="RFC5440" format="default"/>.  This document defines a new type for the METRIC object to be used for this purpose, as follows:

        </t>
        <ul spacing="normal" empty="true">
          <li><dl><dt>T = 11:</dt><dd>Maximum SID Depth of the requested path.</dd></dl></li>
        </ul>
        <t>If the PCC includes a METRIC object of this type on a path computation request, then the PCE minimizes the SID depth of the computed path.  If the B (bound) bit is set to 1 in the METRIC object, then the PCE <bcp14>MUST NOT</bcp14> return a path whose SID depth exceeds the given metric value.  If the PCC did not set the X-Flag in its SR-PCE-CAPABILITY TLV, then it <bcp14>MUST</bcp14> set the B bit to 1.  If the PCC set the X-Flag in its SR-PCE-CAPABILITY TLV, then it <bcp14>MAY</bcp14> set the B bit to 1 or zero.</t>
        <t>If a PCEP session is established with a non-zero default MSD value, then the
   PCC <bcp14>MUST NOT</bcp14> send an MSD METRIC object with an MSD greater than
   the session's default MSD. If the PCE receives a path computation request
   with an MSD METRIC object on such a session that is greater than the session's
   default MSD, then it <bcp14>MUST</bcp14> consider the request invalid and send
   a PCEP Error (PCErr) with Error-Type = 10 ("Reception of an invalid object") and
   Error-value = 9 ("MSD exceeds the default for the PCEP session").
</t>
      </section>
    </section>
    <section anchor="procedures" numbered="true" toc="default">
      <name>Procedures</name>
      <section anchor="SR-CAP-PROCESS" numbered="true" toc="default">
        <name>Exchanging the SR PCE Capability</name>
        <t>A PCC indicates that it is capable of supporting the head-end functions for SR-TE LSP by including the SR-PCE-CAPABILITY sub-TLV in the Open message that it sends to a PCE. A PCE indicates that it is capable of computing SR-TE paths by including the SR-PCE-CAPABILITY sub-TLV in the Open message that it sends to a PCC.</t>
        <t>If a PCEP speaker receives a PATH-SETUP-TYPE-CAPABILITY TLV with a PST list containing PST=1, and supports that path setup type, then it checks for the presence of the SR-PCE-CAPABILITY sub-TLV.  If that sub-TLV is absent, then the PCEP speaker <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 12 ("Missing PCE-SR-CAPABILITY sub-TLV") and <bcp14>MUST</bcp14> then close the PCEP session.  If a PCEP speaker receives a PATH-SETUP-TYPE-CAPABILITY TLV with a SR-PCE-CAPABILITY sub-TLV, but the PST list does not contain PST=1, then the PCEP speaker <bcp14>MUST</bcp14> ignore the SR-PCE-CAPABILITY sub-TLV.</t>
        <t>If a PCC sets the N-Flag to 1, then the PCE <bcp14>MAY</bcp14> send an SR-ERO subobject containing an NAI and no SID (see <xref target="SR-ERO-PROCESS" format="default"/>).  Otherwise, the PCE <bcp14>MUST NOT</bcp14> send an SR-ERO subobject containing an NAI and no SID.</t>
        <t>The number of SIDs that can be imposed on a packet depends on the PCC's data-plane capability. If a PCC sets the X-Flag to 1, then the MSD is not used and <bcp14>MUST</bcp14> be set to zero. If a PCE receives an SR-PCE-CAPABILITY sub-TLV with the X-Flag set to 1, then it <bcp14>MUST</bcp14> ignore the MSD field and assume that the sender can impose a SID stack of any depth.  If a PCC sets the X-Flag to zero, then it sets the MSD field to the maximum number of SIDs that it can impose on a packet.  In this case, the PCC <bcp14>MUST</bcp14> set the MSD to a number greater than zero.  If a PCE receives an SR-PCE-CAPABILITY sub-TLV with the X-Flag and MSD both set to zero, then it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 21 ("Maximum SID depth must be non-zero") and <bcp14>MUST</bcp14> then close the PCEP session.</t>
        <t>Note that the MSD value exchanged via the SR-PCE-CAPABILITY sub-TLV indicates the SID/label imposition limit for the PCC node.  It is anticipated that, in many deployments, the PCCs will have network interfaces that are homogeneous with respect to MSD (that is, each interface has the same MSD).  In such cases, having a per-node MSD on the PCEP session is sufficient; the PCE <bcp14>SHOULD</bcp14> interpret this to mean that all network interfaces on the PCC have the given MSD.  However, the PCE <bcp14>MAY</bcp14> also learn a per-node MSD and a per-interface MSD from the routing protocols, as specified in <xref target="RFC8491" format="default"/>, <xref target="RFC8476" format="default"/>, and  <xref target="I-D.ietf-idr-bgp-ls-segment-routing-msd" format="default"/>.  If the PCE learns the per-node MSD of a PCC from a routing protocol,  then it <bcp14>MUST</bcp14> ignore the per-node MSD value in the SR-PCE-CAPABILITY sub-TLV and use the per-node MSD learned from the routing protocol instead.  If the PCE learns the MSD of a network interface on a PCC from a routing protocol,  then it <bcp14>MUST</bcp14> use the per-interface MSD instead of the MSD value in the SR-PCE-CAPABILITY sub-TLV when it computes a path that uses that interface.</t>
        <t>Once an SR-capable PCEP session is established with a non-zero MSD value, the corresponding PCE <bcp14>MUST NOT</bcp14> send SR-TE paths with a number of SIDs exceeding that MSD value. If a PCC needs to modify the MSD value, it <bcp14>MUST</bcp14> close the PCEP session and re-establish it with the new MSD value. If a PCEP session is established with a non-zero MSD value, and the PCC receives an SR-TE path containing more SIDs than specified in the MSD value, the PCC <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 3 ("Unsupported number of SR-ERO subobjects"). If a PCEP session is established with an MSD value of zero, then the PCC <bcp14>MAY</bcp14> specify an MSD for each path computation request that it sends to the PCE, by including a "maximum SID depth" METRIC object on the request, as defined in <xref target="SR-METRIC" format="default"/>.</t>
        <t>The N-Flag, X-Flag, and MSD value inside the SR-PCE-CAPABILITY sub-TLV are meaningful only in the Open message sent from a PCC to a PCE. As such, a PCE <bcp14>MUST</bcp14> set the N-Flag to zero, X-Flag to 1, and MSD value to zero in an outbound message to a PCC. Similarly, a PCC <bcp14>MUST</bcp14> ignore any MSD value received from a PCE. If a PCE receives multiple SR-PCE-CAPABILITY sub-TLVs in an Open message, it processes only the first sub-TLV received.</t>
      </section>
      <section anchor="SR-ERO-PROCESS" numbered="true" toc="default">
        <name>ERO Processing</name>
        <section anchor="SR-ERO-VALIDATION" numbered="true" toc="default">
          <name>SR-ERO Validation</name>
          <t>If a PCC does not support the SR PCE Capability and thus cannot recognize the SR-ERO or SR-RRO subobjects, it will respond according to the rules for a malformed object per <xref target="RFC5440" format="default"/>.</t>
          <t>On receiving an SR-ERO, a PCC <bcp14>MUST</bcp14> validate that the Length field, S bit, F bit, and NT field are consistent, as follows.

          </t>
          <ul spacing="normal">
            <li>If NT=0, the F bit <bcp14>MUST</bcp14> be 1, the S bit <bcp14>MUST</bcp14> be zero, and the Length <bcp14>MUST</bcp14> be 8.</li>
            <li>If NT=1, the F bit <bcp14>MUST</bcp14> be zero.  If the S bit is 1, the Length <bcp14>MUST</bcp14> be 8; otherwise, the Length <bcp14>MUST</bcp14> be 12.</li>
            <li>If NT=2, the F bit <bcp14>MUST</bcp14> be zero.  If the S bit is 1, the Length <bcp14>MUST</bcp14> be 20; otherwise, the Length <bcp14>MUST</bcp14> be 24.</li>
            <li>If NT=3, the F bit <bcp14>MUST</bcp14> be zero.  If the S bit is 1, the Length <bcp14>MUST</bcp14> be 12; otherwise, the Length <bcp14>MUST</bcp14> be 16.</li>
            <li>If NT=4, the F bit <bcp14>MUST</bcp14> be zero.  If the S bit is 1, the Length <bcp14>MUST</bcp14> be 36; otherwise, the Length <bcp14>MUST</bcp14> be 40.</li>
            <li>If NT=5, the F bit <bcp14>MUST</bcp14> be zero.  If the S bit is 1, the Length <bcp14>MUST</bcp14> be 20; otherwise, the Length <bcp14>MUST</bcp14> be 24.</li>
            <li>If NT=6, the F bit <bcp14>MUST</bcp14> be zero.  If the S bit is 1, the Length <bcp14>MUST</bcp14> be 44; otherwise, the Length <bcp14>MUST</bcp14> be 48.</li>
          </ul>
          <t>If a PCC finds that the NT field, Length field, S bit, and F bit are not consistent, it <bcp14>MUST</bcp14> consider the entire ERO invalid and <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").</t>
          <t>If a PCC does not recognize or support the value in the NT field,
	  it <bcp14>MUST</bcp14> consider the entire ERO invalid and
	  <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10
	  ("Reception of an invalid object") and Error-value = 13
	  ("Unsupported NAI Type in the SR-ERO/SR-RRO subobject").</t>
          <t>If a PCC receives an SR-ERO subobject in which the S and F bits are both set to 1 (that is, both the SID and NAI are absent), it <bcp14>MUST</bcp14> consider the entire ERO invalid and send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 6 ("Both SID and NAI are absent in the SR-ERO subobject").</t>
          <t>If a PCC receives an SR-ERO subobject in which the S bit is set to 1 and the F bit is set to zero (that is, the SID is absent and the NAI is present), but the PCC does not support NAI resolution, it <bcp14>MUST</bcp14> consider the entire ERO invalid and send a PCErr message with Error-Type = 4 ("Not supported object") and Error-value = 4 ("Unsupported parameter").</t>
          <t>If a PCC receives an SR-ERO subobject in which the S bit is set to 1 and either (or both) the M bit or the C bit is set to 1, it <bcp14>MUST</bcp14> consider the entire ERO invalid and send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").</t>
          <t>If a PCC receives an SR-ERO subobject in which the S bit is set to zero and the M bit is set to 1, then the subobject contains an MPLS label.  The PCC <bcp14>MAY</bcp14> choose not to accept a label provided by the PCE, based on its local policy.  The PCC <bcp14>MUST NOT</bcp14> accept MPLS label value 3 (Implicit NULL), but it <bcp14>MAY</bcp14> accept other special-purpose MPLS label values.  If the PCC decides not to accept an MPLS label value, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 2 ("Bad label value").</t>
          <t>If both the M and C bits of an SR-ERO subobject are set to 1, and if a PCC finds an erroneous setting in one or more of the TC, S, and TTL fields, it <bcp14>MAY</bcp14> overwrite those fields with values chosen according to its own policy. If the PCC does not overwrite them, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 4 ("Bad label format").</t>
          <t>If the M bit of an SR-ERO subobject is set to zero but the C bit is set to 1, then the PCC <bcp14>MUST</bcp14> consider the entire ERO invalid and <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").</t>
          <t>If a PCC receives an SR-ERO subobject in which the S bit is set to zero and the M bit is set to zero, then the subobject contains a SID index value.  If the SID is an Adj-SID, then the L-Flag <bcp14>MUST NOT</bcp14> be set.  If the L-Flag is set for an Adj-SID, then the PCC <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 11 ("Malformed object").</t>
          <t>If a PCC detects that the subobjects of an ERO are a mixture of SR-ERO subobjects and subobjects of other types, then it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 5 ("ERO mixes SR-ERO subobjects with other subobject types").</t>
          <t>The SR-ERO subobjects can be classified according to whether they contain a SID representing an MPLS label value or an index value, or no SID.  If a PCC detects that the SR-ERO subobjects are a mixture of more than one of these types, then it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 20 ("Inconsistent SIDs in SR-ERO/SR-RRO subobjects").</t>
          <t>If an ERO specifies a new SR-TE path for an existing LSP and the PCC determines that the ERO contains SR-ERO subobjects that are not valid, then the PCC <bcp14>MUST NOT</bcp14> update the LSP.</t>
        </section>
        <section anchor="SR-ERO-INTERPRET" numbered="true" toc="default">
          <name>Interpreting the SR-ERO</name>
          <t>
       The SR-ERO contains a sequence of subobjects.  Each SR-ERO subobject in
       the sequence identifies a segment that the traffic will be directed
       to, in the order given.  That is, the first subobject identifies the
       first segment the traffic will be directed to, the second
       subobject represents the second segment, and so on.
          </t>
          <t>
       The PCC interprets the SR-ERO by converting it to an MPLS label stack plus a
       next hop.  The PCC sends packets along the segment-routed path by prepending
       the MPLS label stack onto the packets and sending the resulting, modified
       packet to the next hop.
          </t>
          <t>
       The PCC uses a different procedure to do this conversion, depending on the
       information that the PCE has provided in the subobjects.

          </t>
          <ul spacing="normal">
            <li>
          If the subobjects contain SID index values, then the PCC converts them into the
          corresponding MPLS labels by following the procedure defined in
          <xref target="RFC8660" format="default"/>.
      </li>
            <li>
          If the subobjects contain NAIs only, the PCC first converts
          each NAI into a SID index value and then proceeds as above.
          To convert an NAI to a SID index, the PCC looks for a fully specified
          prefix or adjacency matching the fields in the NAI.  If the PCC finds
          a matching prefix/adjacency, and the matching prefix/adjacency has a SID associated
          with it, then the PCC uses that SID.  If the PCC cannot find a
          matching prefix/adjacency, or if the matching prefix/adjacency has no SID associated
          with it, the PCC behaves as specified in <xref target="SR-ERO-INTERPRET-ERROR" format="default"/>.
      </li>
            <li>
          If the subobjects contain MPLS labels, then the PCC looks up the offset of the first subobject's label
          in its SRGB or SRLB.  This gives the first SID.  The PCC pushes the labels in any
          remaining subobjects onto the packet (with the final subobject specifying the
          bottom-of-stack label).
      </li>
          </ul>
          <t>
      For all cases above, after the PCC has imposed the label stack on the packet, it sends the packet to the segment identified by the first SID.
          </t>
          <section anchor="SR-ERO-INTERPRET-ERROR" numbered="true" toc="default">
            <name>Handling Errors During SR-ERO Conversion</name>
            <t>There are several errors that can occur during the process of converting an SR-ERO sequence to an MPLS label stack and a next hop.  The PCC deals with them as follows.
            </t>
            <ul spacing="normal">
              <li>If the PCC cannot find a SID index in the SR-DB, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 14 ("Unknown SID").</li>
              <li>If the PCC cannot find an NAI in the SR-DB, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 15 ("NAI cannot be resolved to a SID").</li>
              <li>If the PCC needs to convert a SID into an MPLS label value but cannot find the corresponding router's SRGB in the SR-DB, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 16 ("Could not find SRGB").</li>
              <li>If the PCC finds that a router's SRGB is not large enough for a SID index value, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 17 ("SID index exceeds SRGB size").</li>
              <li>If the PCC needs to convert a SID into an MPLS label value but cannot find the corresponding router's SRLB in the SR-DB, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 18 ("Could not find SRLB").</li>
              <li>If the PCC finds that a router's SRLB is not large enough for a SID index value, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 19 ("SID index exceeds SRLB size").</li>
              <li>If the number of labels in the computed label stack exceeds the maximum number of SIDs that the PCC can impose on the packet, it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 3 ("Unsupported number of SR-ERO subobjects").</li>
            </ul>
            <t>If an ERO specifies a new SR-TE path for an existing LSP and the PCC encounters an error while processing the ERO, then the PCC <bcp14>MUST NOT</bcp14> update the LSP.</t>
          </section>
        </section>
      </section>
      <section anchor="SR-RRO-PROCESS" numbered="true" toc="default">
        <name>RRO Processing</name>
        <t>The syntax-checking rules that apply to the SR-RRO subobject are identical to those of the SR-ERO subobject, except as noted below.</t>
        <t>If a PCEP speaker receives an SR-RRO subobject in which both SID and NAI are absent, it <bcp14>MUST</bcp14> consider the entire RRO invalid and send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 7 ("Both SID and NAI are absent in the SR-RRO subobject").</t>
        <t>If a PCE detects that the subobjects of an RRO are a mixture of SR-RRO subobjects and subobjects of other types, then it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 10 ("RRO mixes SR-RRO subobjects with other subobject types").</t>
        <t>The SR-RRO subobjects can be classified according to whether they contain a SID representing an MPLS label value or an index value, or no SID.  If a PCE detects that the SR-RRO subobjects are a mixture of more than one of these types, then it <bcp14>MUST</bcp14> send a PCErr message with Error-Type = 10 ("Reception of an invalid object") and Error-value = 20 ("Inconsistent SIDs in SR-ERO / SR-RRO subobjects").</t>
      </section>
    </section>
    <section anchor="Management" numbered="true" toc="default">
      <name>Management Considerations</name>
      <t>This document adds a new path setup type to PCEP to allow LSPs
to be set up using Segment Routing techniques.  This path setup
type may be used with PCEP alongside other path setup types,
such as RSVP-TE, or it may be used exclusively.</t>
      <section anchor="control" numbered="true" toc="default">
        <name>Controlling the Path Setup Type</name>
        <t>The following factors control which path setup type is used for
a given LSP.

</t>
        <ul spacing="normal">
          <li>  The available path setup types are constrained to those that
   are supported by, or enabled on, the PCEP speakers.  The
   PATH-SETUP-TYPE-CAPABILITY TLV indicates which path setup types
   a PCEP speaker supports.  To use Segment Routing as a path setup type,
   it is a prerequisite that the PCC and PCE both include PST=1 in the
   list of supported path setup types in this TLV and also include the
   SR-PCE-CAPABILITY sub-TLV.</li>
          <li>  When a PCE initiates an LSP, it proposes which path setup type
   to use by including it in the
   PATH-SETUP-TYPE TLV in the SRP object of the PCInitiate message.
   The PCE chooses the path setup type based on the capabilities of the
   network nodes on the path and on its local policy.  The PCC <bcp14>MAY</bcp14> choose
   to accept the proposed path setup type or to reject the PCInitiate
   request, based on its local policy.</li>
          <li>  When a PCC requests a path for an LSP, it can nominate a preferred
   path setup type by including it in the PATH-SETUP-TYPE TLV in the
   RP object of the PCReq message.  The PCE <bcp14>MAY</bcp14> choose to reply
   with a path of the requested type, reply with a path of a
   different type, or reject the request, based on the capabilities of the
   network nodes on the path and on its local policy.</li>
        </ul>
        <t>The operator can influence the path setup type as follows.

</t>
        <ul spacing="normal">
          <li>  Implementations <bcp14>MUST</bcp14> allow the operator to enable and disable
   the Segment Routing path setup type on a PCEP-speaking device.
   Implementations <bcp14>MAY</bcp14> also allow the operator to enable and disable the RSVP-TE
   path setup type.</li>
          <li>  PCE implementations <bcp14>MUST</bcp14> allow the operator to specify that an LSP
   should be instantiated using Segment Routing or RSVP-TE as the proposed path
   setup type.  </li>
          <li>  PCE implementations <bcp14>MAY</bcp14> allow the operator to configure a
   preference for the PCE to propose paths using Segment Routing or RSVP-TE in
   the absence of a specified path setup type.</li>
          <li>  PCC implementations <bcp14>MUST</bcp14> allow the operator to specify that a path
   requested for an LSP nominates Segment Routing or RSVP-TE as the
   path setup type.</li>
          <li>  PCC implementations <bcp14>MAY</bcp14> allow the operator to configure a preference
   for the PCC to nominate Segment Routing or RSVP-TE as the path
   setup type if none is specified for an LSP.</li>
          <li>  PCC implementations <bcp14>SHOULD</bcp14> allow the operator to configure a PCC to
   refuse to set up an LSP using an undesired path setup type.</li>
        </ul>
      </section>
      <section anchor="migrating" numbered="true" toc="default">
        <name>Migrating a Network to Use PCEP Segment-Routed Paths</name>
        <t>
This section discusses the steps that the operator takes when migrating a
network to enable PCEP to set up paths using Segment Routing as the path
setup type.

</t>
        <ul spacing="normal">
          <li>  The operator enables the Segment Routing PST on the PCE servers.</li>
          <li>  The operator enables the Segment Routing PST on the PCCs.</li>
          <li>  The operator resets each PCEP session.  The PCEP sessions come
   back up with Segment Routing enabled.</li>
          <li>  If the operator detects a problem, they can roll the network back
   to its initial state by disabling the Segment Routing PST on the
   PCEP speakers and resetting the PCEP sessions.</li>
        </ul>
        <t>Note that the data plane is unaffected if a PCEP session is reset.  Any
LSPs that were set up before the session reset will remain in place and
will still be present after the session comes back up.</t>
        <t>An implementation <bcp14>SHOULD</bcp14> allow the operator to manually trigger a PCEP
session to be reset.</t>
        <t>An implementation <bcp14>MAY</bcp14> automatically reset a PCEP session when
an operator reconfigures the PCEP speaker's capabilities.  However, note that
if the capabilities at both ends of the PCEP session are not reconfigured
simultaneously, then the session could be reset twice, which could lead to
unnecessary network traffic.  Therefore, such implementations <bcp14>SHOULD</bcp14> allow
the operator to override this behavior and wait instead for a manual reset.</t>
        <t>Once Segment Routing is enabled on a PCEP session, it can be used as the
path setup type for future LSPs.</t>
        <t>User traffic is not automatically migrated from existing LSPs onto
segment-routed LSPs just by enabling the Segment Routing PST in PCEP.  The
migration of user traffic from existing LSPs onto Segment Routing LSPs is
beyond the scope of this document.</t>
      </section>
      <section anchor="verification" numbered="true" toc="default">
        <name>Verification of Network Operation</name>
        <t>The operator needs the following information to verify that PCEP is
operating correctly with respect to the Segment Routing path setup type.

</t>
        <ul spacing="normal">
          <li>  An implementation <bcp14>SHOULD</bcp14> allow the operator to view whether the
   PCEP speaker sent the Segment Routing PST capability to its peer.
   If the PCEP speaker is a PCC, then the implementation <bcp14>SHOULD</bcp14> also allow
   the operator to view the values of the L-Flag and N-Flag that were sent and the value of the MSD field
   that was sent.</li>
          <li>  An implementation <bcp14>SHOULD</bcp14> allow the operator to view
   whether the peer sent the Segment Routing PST capability.  If the peer
   is a PCC, then the implementation <bcp14>SHOULD</bcp14> also allow the operator to view
   the values of the L-Flag and N-Flag and MSD fields that the peer sent.</li>
          <li>  An implementation <bcp14>SHOULD</bcp14> allow the operator to view
   whether the Segment Routing PST is enabled on the PCEP session.</li>
          <li>  If one PCEP speaker advertises the Segment Routing PST capability, but the other
   does not, then the implementation <bcp14>SHOULD</bcp14> create a log to inform the
   operator of the capability mismatch.</li>
          <li>  An implementation <bcp14>SHOULD</bcp14> allow the operator to view the PST that was
   proposed, or requested, for an LSP and the PST that was actually used.</li>
          <li>  If a PCEP speaker decides to use a different PST to the one that was
   proposed, or requested, for an LSP, then the implementation <bcp14>SHOULD</bcp14>
   create a log to inform the operator that the expected PST has not been used.
   The log <bcp14>SHOULD</bcp14> give the reason for this choice (local policy,
   equipment capability, etc.).</li>
          <li>  If a PCEP speaker rejects a Segment Routing path, then it <bcp14>SHOULD</bcp14> create a log
   to inform the operator, giving the reason for the decision (local policy,
   MSD exceeded, etc.).</li>
        </ul>
      </section>
      <section anchor="models" numbered="true" toc="default">
        <name>Relationship to Existing Management Models</name>
        <t>The PCEP YANG module is defined in <xref target="I-D.ietf-pce-pcep-yang" format="default"/>.  In the future, this
   YANG module should be extended or augmented to provide the following
   additional information relating to Segment Routing:

</t>
        <ul spacing="normal">
          <li>  The advertised PST capabilities and MSD per PCEP session.</li>
          <li>  The PST configured for, and used by, each LSP.</li>
        </ul>
        <t>The PCEP MIB <xref target="RFC7420" format="default"/> could also be updated to include this
information.</t>
      </section>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The security considerations described in <xref target="RFC5440" format="default"/>, <xref target="RFC8231" format="default"/>, <xref target="RFC8281" format="default"/>, and <xref target="RFC8408" format="default"/> are
applicable to this specification.  No additional security measures are required.</t>
      <t>Note that this specification enables a network controller to instantiate a
   path in the network without the use of a hop-by-hop signaling protocol
   (such as RSVP-TE).  This creates an additional vulnerability if the security
   mechanisms of <xref target="RFC5440" format="default"/>, <xref target="RFC8231" format="default"/>, and <xref target="RFC8281" format="default"/> are not
   used.  If there is no integrity protection on the session, then an attacker could create a path that is not subjected to the
   further verification checks that would be performed by the signaling
   protocol.</t>
      <t>Note that this specification adds the MSD field to the Open message (see <xref target="cap-negotiation" format="default"/>),
   which discloses how many MPLS labels the sender can push onto packets that
   it forwards into the network. If the security mechanisms of <xref target="RFC8231" format="default"/> and <xref target="RFC8281" format="default"/>
   are not used with strong encryption, then an attacker could use this
   new field to gain intelligence about the capabilities of the edge devices in
   the network.</t>
    </section>
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="PCEP-Object-Codepoints" numbered="true" toc="default">
        <name>PCEP ERO and RRO Subobjects</name>
        <t>This document defines a new subobject type for the PCEP ERO
      and a new subobject type for the PCEP RRO.  The codepoints for
      subobject types of these objects are maintained in the "Resource Reservation Protocol (RSVP) Parameters" registry, under the EXPLICIT_ROUTE and ROUTE_RECORD
	objects, respectively.</t>

        <table anchor="IANA-Subobject-Type" align="center">
          <thead>
            <tr>
              <th align="left">Object</th>
              <th align="left">Subobject</th>
              <th align="left">Subobject Type</th>
            </tr>
          </thead>
          <tbody>

            <tr>
              <td align="left">EXPLICIT_ROUTE</td>
              <td align="left">SR-ERO (PCEP specific)</td>
              <td align="left">36</td>
            </tr>
            <tr>
              <td align="left">ROUTE_RECORD</td>
              <td align="left">SR-RRO (PCEP specific)</td>
              <td align="left">36</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="NAI-Type-Registry" numbered="true" toc="default">
        <name>New NAI Type Registry</name>
        <t>IANA has created a new sub-registry within the "Path Computation
Element Protocol (PCEP) Numbers" registry called "PCEP SR-ERO NAI
Types". The allocation policy for this new registry is by IETF
Review <xref target="RFC8126" format="default"/>. The new registry contains the
following values:
</t>
        <table anchor="New-PCEP-SR-ERO-NAI-value" align="center">
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Description </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="left">NAI is absent.</td>
              <td align="left">This document</td>
            </tr>

            <tr>
              <td align="left">1</td>
              <td align="left">NAI is an IPv4 node ID.</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">2</td>
              <td align="left">NAI is an IPv6 node ID.</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">3</td>
              <td align="left">NAI is an IPv4 adjacency.</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">4</td>
              <td align="left">NAI is an IPv6 adjacency with global IPv6 addresses.</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">5</td>
              <td align="left">NAI is an unnumbered adjacency with IPv4 node IDs.</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">6</td>
              <td align="left">NAI is an IPv6 adjacency with link-local IPv6 addresses.</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">7-15</td>
              <td align="left">Unassigned</td>
              <td align="left"/>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="IANA-SR-ERO-FLAG" numbered="true" toc="default">
        <name>New SR-ERO Flag Registry</name>
        <t>IANA has created a new sub-registry, named
    "SR-ERO Flag Field", within the "Path Computation
    Element Protocol (PCEP) Numbers" registry to manage the Flag
    field of the SR-ERO subobject. New values are to be assigned by Standards
        Action <xref target="RFC8126" format="default"/>. Each bit should be tracked with the
        following qualities:
        </t>
        <ul spacing="normal">
          <li>Bit number (counting from bit 0 as the most significant bit)</li>
          <li>Capability description</li>
          <li>Defining RFC</li>
        </ul>
        <t>The following values are defined in this document:</t>
        <table anchor="SR-ERO-Flags" align="center">
          <thead>
            <tr>
              <th align="center">Bit</th>
              <th align="left">Description </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="center">0-7</td>
              <td align="left">Unassigned</td>
              <td align="left"/>
            </tr>
            <tr>
              <td align="center">8</td>
              <td align="left">NAI is absent (F)</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="center">9</td>
              <td align="left">SID is absent (S)</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="center">10</td>
              <td align="left">SID specifies TC, S, and TTL in addition to an MPLS label (C)</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="center">11</td>
              <td align="left">SID specifies an MPLS label (M)</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="IANA-Error-Object" numbered="true" toc="default">
        <name>PCEP-Error Object</name>
        <t>IANA has allocated the following codepoints in the "PCEP-ERROR Object Error Types and Values" registry for the following new Error-values:</t>

<table anchor="PCEP-Error-table" align="center">
 
  <thead>
    <tr>
      <th align="left">Error-Type</th>
      <th align="left">Meaning</th>
      <th align="left">Error-value</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>10</td>
      <td>Reception of an invalid object</td>
      <td></td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td>2: Bad label value</td>
    </tr>

    <tr>
      <td></td>
      <td></td>
      <td>3: Unsupported number of SR-ERO subobjects</td>
    </tr>
        <tr>
      <td></td>
      <td></td>
      <td>4: Bad label format</td>
	</tr>
	    <tr>
      <td></td>
      <td></td>
      <td>5: ERO mixes SR-ERO subobjects with other subobject types</td>
	    </tr>
	        <tr>
      <td></td>
      <td></td>
      <td>6: Both SID and NAI are absent in the SR-ERO subobject</td>
		</tr>
		    <tr>
      <td></td>
      <td></td>
      <td>7: Both SID and NAI are absent in the SR-RRO subobject</td>
    </tr>

 		    <tr>
      <td></td>
      <td></td>
      <td>9: MSD exceeds the default for the PCEP session</td>
		    </tr>

		    		    <tr>
      <td></td>
      <td></td>
      <td>10: RRO mixes SR-RRO subobjects with other subobject types</td>
    </tr>

    
    <tr>
      <td></td>
      <td></td>
      <td>12: Missing PCE-SR-CAPABILITY sub-TLV</td>
    </tr>

        <tr>
      <td></td>
      <td></td>
      <td>13: Unsupported NAI Type in the SR-ERO/SR-RRO subobject</td>
	</tr>
    <tr>
      <td></td>
      <td></td>
      <td>14: Unknown SID</td>
    </tr>	
    <tr>
      <td></td>
      <td></td>
      <td>15: NAI cannot be resolved to a SID</td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td>16: Could not find SRGB</td>
    </tr>

    <tr>
      <td></td>
      <td></td>
      <td>17: SID index exceeds SRGB size</td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td>18: Could not find SRLB</td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td>19: SID index exceeds SRLB size</td>
    </tr>
    <tr>
      <td></td>
      <td></td>
      <td>20: Inconsistent SIDs in SR-ERO / SR-RRO subobjects</td>
    </tr>    
    
    <tr>
      <td></td>
      <td></td>
      <td>21: MSD must be non-zero</td>
    </tr>
  </tbody>
</table>


      </section>
      <section anchor="IANA-TLV-Type-Indicators" numbered="true" toc="default">
        <name>PCEP TLV Type Indicators</name>
        <t>IANA has allocated the following codepoint in the "PCEP TLV Type Indicators" registry.  Note that this TLV type indicator is deprecated but retained in the registry to ensure compatibility with early implementations of this specification.  See <xref target="Early" format="default"/> for details.</t>
        <table anchor="PCEP-New-TLV-CP" align="center">
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Meaning </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">26</td>
              <td align="left">SR-PCE-CAPABILITY (deprecated)</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="IANA-subTLV-Type-Indicators" numbered="true" toc="default">
        <name>PATH-SETUP-TYPE-CAPABILITY Sub-TLV Type Indicators</name>
        <t>IANA has created a new sub-registry, named
        "PATH-SETUP-TYPE-CAPABILITY Sub-TLV Type Indicators", within
        the "Path Computation Element Protocol (PCEP) Numbers"
        registry to manage the type indicator space for sub-TLVs of
        the PATH-SETUP-TYPE-CAPABILITY TLV. New values are to be
        assigned by Standards Action <xref target="RFC8126" format="default"/>.  The
        valid range of values in the registry is 0-65535.  IANA 
        has initialized the registry with the following
        values.  All other values in the registry should be marked as
        "Unassigned".</t>
        <table anchor="PCEP-New-subTLV-CP" align="center">
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Meaning </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">0</td>
              <td align="left">Reserved</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="left">26</td>
              <td align="left">SR-PCE-CAPABILITY</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="IANA-PATH-SETUP-TYPE" numbered="true" toc="default">
        <name>New Path Setup Type</name>
        <t>A sub-registry within the "Path Computation Element Protocol (PCEP) Numbers" registry called "PCEP Path Setup Types" was created in <xref target="RFC8408" format="default"/>. IANA has allocated a new codepoint within this registry, as follows:</t>
        <table anchor="PATH-SETUP-TLV-value" align="center">
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Description </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">1</td>
              <td align="left">Traffic-engineering path is set up using Segment Routing.</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="IANA-METRIC-TYPE" numbered="true" toc="default">
        <name>New Metric Type</name>
        <t>IANA has allocated the following codepoint in the PCEP "METRIC Object T Field" registry:</t>
        <table anchor="METRIC-type" align="center">
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Description </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">11</td>
              <td align="left">Segment-ID (SID) Depth.</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="IANA-SR-PCE-CAP-FLAG" numbered="true" toc="default">
        <name>SR PCE Capability Flags</name>
        <t>IANA has created a new sub-registry, named
    "SR Capability Flag Field", within the "Path Computation
    Element Protocol (PCEP) Numbers" registry to manage the Flag
    field of the SR-PCE-CAPABILITY TLV. New values are to be assigned by Standards
        Action <xref target="RFC8126" format="default"/>. Each bit should be tracked with the
        following qualities:
        </t>
        <ul spacing="normal">
          <li>Bit number (counting from bit 0 as the most significant bit)</li>
          <li>Capability description</li>
          <li>Defining RFC</li>
        </ul>
        <t>The following values are defined in this document:</t>
        <table anchor="SR-PCE-CAP-Flags" align="center">
          <thead>
            <tr>
              <th align="center">Bit</th>
              <th align="left">Description </th>
              <th align="left">Reference </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="center">0-5</td>
              <td align="left">Unassigned</td>
              <td align="left"/>
            </tr>
            <tr>
              <td align="center">6</td>
              <td align="left">Node or Adjacency Identifier (NAI) is supported (N)</td>
              <td align="left">This document</td>
            </tr>
            <tr>
              <td align="center">7</td>
              <td align="left">Unlimited Maximum SID Depth (X)</td>
              <td align="left">This document</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-6man-segment-routing-header"
		      to="IPv6-SRH"/>
    <displayreference target="I-D.ietf-spring-segment-routing-policy"
		      to="SR-POLICY"/>
    <displayreference target="I-D.ietf-idr-bgp-ls-segment-routing-msd"
		      to="MSD-BGP"/>
        <displayreference target="I-D.ietf-pce-pcep-yang"
			  to="PCE-PCEP-YANG"/>
	
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5440.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8231.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8281.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8402.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8408.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8491.xml"/>



<!--draft-ietf-spring-segment-routing-mpls-22; Active - in REF and part of C340-->
<reference anchor='RFC8660' target='https://www.rfc-editor.org/info/rfc8660'>
<front>
<title>Segment Routing with the MPLS Data Plane</title>
<author initials='A' surname='Bashandy' fullname='Ahmed Bashandy' role='editor'>
    <organization />
</author>
<author initials='C' surname='Filsfils' fullname='Clarence Filsfils' role='editor'>
    <organization />
</author>
<author initials='S' surname='Previdi' fullname='Stefano Previdi'>
    <organization />
</author>
<author initials='B' surname='Decraene' fullname='Bruno Decraene'>
    <organization />
</author>
<author initials='S' surname='Litkowski' fullname='Stephane Litkowski'>
    <organization />
</author>
<author initials='R' surname='Shakir' fullname='Rob Shakir'>
    <organization />
</author>
<date month='December' year='2019' />
</front>
<seriesInfo name='RFC' value='8660' />
<seriesInfo name='DOI' value='10.17487/RFC8660' />
</reference>
	
	
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3209.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4657.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7420.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8413.xml"/>
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8476.xml"/>


<xi:include
    href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-6man-segment-routing-header.xml"/>

	<!--draft-ietf-6man-segment-routing-header-21; Active - AD eval-->


<xi:include
    href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-spring-segment-routing-policy.xml"/>

	
        <!--draft-ietf-spring-segment-routing-policy-03; Active - ID exists-->




	
        <!--draft-ietf-isis-segment-routing-extensions-25; Active, in Edit and part of C340-->

<reference anchor='RFC8667' target='https://www.rfc-editor.org/info/rfc8667'>
<front>
<title>IS-IS Extensions for Segment Routing</title>
<author initials='S' surname='Previdi' fullname='Stefano Previdi' role="editor">
    <organization />
</author>
<author initials='L' surname='Ginsberg' fullname='Les Ginsberg' role="editor">
    <organization />
</author>
<author initials='C' surname='Filsfils' fullname='Clarence Filsfils'>
    <organization />
</author>
<author initials='A' surname='Bashandy' fullname='Ahmed Bashandy'>
    <organization />
</author>
<author initials='H' surname='Gredler' fullname='Hannes Gredler'>
    <organization />
</author>
<author initials='B' surname='Decraene' fullname='Bruno Decraene'>
    <organization />
</author>
<date month='December' year='2019' />
</front>
<seriesInfo name='RFC' value='8667' />
<seriesInfo name='DOI' value='10.17487/RFC8667' />
</reference>
       
        <!--draft-ietf-ospf-segment-routing-extensions-27; Active, in Edit and part of C340-->


	<reference anchor='RFC8665' target='https://www.rfc-editor.org/info/rfc8665'>
<front>
<title>OSPF Extensions for Segment Routing</title>
<author initials='P' surname='Psenak' fullname='Peter Psenak' role="editor">
    <organization />
</author>
<author initials='S' surname='Previdi' fullname='Stefano Previdi' role="editor">
    <organization />
</author>
<author initials='C' surname='Filsfils' fullname='Clarence Filsfils'>
    <organization />
</author>
<author initials='H' surname='Gredler' fullname='Hannes Gredler'>
    <organization />
</author>
<author initials='R' surname='Shakir' fullname='Rob Shakir'>
    <organization />
</author>
<author initials='W' surname='Henderickx' fullname='Wim Henderickx'>
    <organization />
</author>
<author initials='J' surname='Tantsura' fullname='Jeff Tantsura'>
    <organization />
</author>
<date month='December' year='2019' />
</front>
<seriesInfo name='RFC' value='8665' />
<seriesInfo name='DOI' value='10.17487/RFC8665' />
	</reference>


<xi:include
    href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-bgp-ls-segment-routing-msd.xml"/>

        <!--draft-ietf-idr-bgp-ls-segment-routing-msd-05; Active - I-D Exists-->


<xi:include
    href="https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-pce-pcep-yang.xml"/>


	
        <!--draft-ietf-pce-pcep-yang-12; Active - I-D Exists-->
      
      </references>
    </references>
    <section anchor="Early" numbered="true" toc="default">
      <name>Compatibility with Early Implementations</name>
      <t>
  An early implementation of this specification will send the
  SR-CAPABILITY-TLV as a top-level TLV in the OPEN object instead
  of sending the PATH-SETUP-TYPE-CAPABILITY TLV in the OPEN object.
  Implementations that wish to interoperate with such early implementations
  should also send the SR-CAPABILITY-TLV as a top-level TLV in their OPEN object
  and should interpret receiving this top-level TLV as though the sender had sent
  a PATH-SETUP-TYPE-CAPABILITY TLV with a PST list of (0, 1) (that is, both RSVP-TE and
  SR-TE PSTs are supported) with the SR-CAPABILITY-TLV as a sub-TLV.
  If a PCEP speaker receives an OPEN object in which both the
  SR-CAPABILITY-TLV and PATH-SETUP-TYPE-CAPABILITY TLV appear as top-level
  TLVs, then it should ignore the top-level SR-CAPABILITY-TLV and process
  only the PATH-SETUP-TYPE-CAPABILITY TLV.
</t>
    </section>
    <section anchor="Acknowledgement" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>We thank Ina Minei, George Swallow, Marek Zavodsky, Dhruv Dhody, Ing-Wher Chen, and Tomas Janciga for the valuable comments.</t>
    </section>
    <section anchor="Contributors" numbered="false" toc="default">
      <name>Contributors</name>
      <t>The following people contributed to this document:
      </t>
      <ul spacing="compact">
        <li>Lakshmi Sharma</li>
        <li>Jan Medved</li>
        <li>Edward Crabbe</li>
        <li>Robert Raszuk</li>
        <li>Victor Lopez</li>
      </ul>
    </section>
  </back>
</rfc>
