<?xml version="1.0" encoding="us-ascii"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"
[]>
<?rfc toc="yes" ?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="no"?>
<?rfc rfcedstyle="yes"?>
<?rfc subcompact="no"?>
<?rfc compact="yes" ?>
<?rfc iprnotified="Yes" ?>
<?rfc strict="no" ?>
<rfc category="std"
     docName="draft-ietf-pce-segment-routing-ipv6-01"
     ipr="trust200902">
  <front>
    <title abbrev="PCEP Extensions for SRv6">PCEP Extensions for
    Segment Routing leveraging the IPv6 data plane</title>
    <author initials="M"
            surname="Negi"
            fullname="Mahendra Singh Negi">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street>Divyashree Techno Park, Whitefield</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560066</code>
          <country>India</country>
        </postal>
        <email>mahendrasingh@huawei.com</email>
      </address>
    </author>
    <author fullname="Cheng Li"
            initials="C."
            surname="Li">
      <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>chengli13@huawei.com</email>
        <uri />
      </address>
    </author>
    <author initials="S"
            surname="Sivabalan"
            fullname="Siva Sivabalan">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street></street>
          <city></city>
          <region></region>
          <code></code>
          <country></country>
        </postal>
        <email>msiva@cisco.com</email>
      </address>
    </author>
    <author initials="P"
            surname="Kaladharan"
            fullname="Prejeeth Kaladharan">
      <organization>RtBrick Inc</organization>
      <address>
        <postal>
          <street></street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code></code>
          <country>India</country>
        </postal>
        <email>prejeeth@rtbrick.com</email>
      </address>
    </author>
    <author initials="Z"
            surname="Yongqing"
            fullname="Yongqing Zhu">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>109 West Zhongshan Ave, Tianhe District</street>
          <city>Bangalore</city>
          <region>Guangzhou</region>
          <code></code>
          <country>P.R. China</country>
        </postal>
        <email>zhuyq.gd@chinatelecom.cn</email>
      </address>
    </author>
    <date year="2019" />
    <area>Routing</area>
    <workgroup>PCE Working Group</workgroup>
    <abstract>
      <t>The Source Packet Routing in Networking (SPRING)
      architecture describes how Segment Routing (SR) can be used
      to steer packets through an IPv6 or MPLS network using the
      source routing paradigm. 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).</t>
      <t>It depends only on "segments" that are advertised by Link-
      State IGPs. A Segment Routed Path can be derived from a
      variety of mechanisms, including an IGP Shortest Path Tree
      (SPT), explicit configuration, or a Path Computation Element
      (PCE).</t>
      <t>Since SR can be applied to both MPLS and IPv6 forwarding
      plane, a PCE should be able to compute SR-Path for both MPLS
      and IPv6 forwarding plane. This document describes the
      extensions required for SR support for IPv6 data plane in
      Path Computation Element communication Protocol (PCEP). The
      PCEP extension and mechanism to support SR-MPLS is described
      in 
      <xref target='I-D.ietf-pce-segment-routing' />. This document
      extends it to support SRv6 (SR over IPv6).</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 target="RFC8174" />when, and only when, they appear in
      all capitals, as shown here.</t>
    </note>
  </front>
  <middle>
    <section title="Introduction">
      <t>As per 
      <xref target='RFC8402' />, with Segment Routing (SR), a node
      steers a packet through an ordered list of instructions,
      called segments. A segment can represent any instruction,
      topological or service-based. A segment can have a semantic
      local to an SR node or global within an SR domain. SR allows
      to enforce a flow through any path and service chain while
      maintaining per-flow state only at the ingress node of the SR
      domain. Segments can be derived from different components:
      IGP, BGP, Services, Contexts, Locater, etc. The list of
      segment forming the path is called the Segment List and is
      encoded in the packet header. Segment Routing can be applied
      to the IPv6 architecture with the Segment Routing Header
      (SRH) 
      <xref target='I-D.ietf-6man-segment-routing-header' />. A
      segment is encoded as an IPv6 address. An ordered list of
      segments is encoded as an ordered list of IPv6 addresses in
      the routing header. The active segment is indicated by the
      Destination Address of the packet. Upon completion of a
      segment, a pointer in the new routing header is incremented
      and indicates the next segment.</t>
      <t>Segment Routing use cases are described in 
      <xref target='RFC7855' />and 
      <xref target='RFC8354' />. Segment Routing protocol
      extensions are defined in 
      <xref target='I-D.ietf-isis-segment-routing-extensions' />,
      and 
      <xref target='I-D.ietf-ospf-ospfv3-segment-routing-extensions' />.</t>
      <t>As per 
      <xref target='I-D.ietf-6man-segment-routing-header' />, an
      SRv6 Segment is a 128-bit value. "SRv6 SID" or simply "SID"
      are often used as a shorter reference for "SRv6 Segment".
      Further details are in an illustration provided in 
      <xref target='I-D.filsfils-spring-srv6-network-programming' />.</t>
      <t>The SR architecture can be applied to the MPLS forwarding
      plane without any change, in which case an SR path
      corresponds to an MPLS Label Switching Path (LSP). The SR is
      applied to IPV6 forwarding plane using SRH. A SR path can be
      derived from an IGP Shortest Path Tree (SPT), but SR-TE paths
      may not follow IGP SPT. Such paths may be chosen by a
      suitable network planning tool, or a PCE and provisioned on
      the ingress node.</t>
      <t>
      <xref target='RFC5440' />describes 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 or a PCC operating as
      a PCE (in hierarchical PCE environment) computes paths for
      MPLS Traffic Engineering LSPs (MPLS-TE LSPs) based on various
      constraints and optimization criteria. 
      <xref target='RFC8231' />specifies extensions to PCEP that
      allow a stateful PCE to compute and recommend network paths
      in compliance with 
      <xref target="RFC4657" />and 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, controlling 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" />. As per 
      <xref target='I-D.ietf-pce-segment-routing' />, 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 PCEP extensions
      specified in 
      <xref target="RFC8281" />using the SR specific PCEP
      extensions specified in 
      <xref target='I-D.ietf-pce-segment-routing' />. 
      <xref target='I-D.ietf-pce-segment-routing' />specifies PCEP
      extensions for supporting a SR-TE LSP for MPLS data plane.
      This document extends 
      <xref target='I-D.ietf-pce-segment-routing' />to support SR
      for IPv6 data plane. Additionally, using procedures described
      in this document, a PCC can request an SRv6 path from either
      stateful or a stateless PCE. This specification relies on the
      PATH-SETUP-TYPE TLV and procedures specified in 
      <xref target='RFC8408' />.</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" />.</t>
    </section>
    <!-- Introduction -->
    <section title="Terminology">
      <t>This document uses the following terms defined in 
      <xref target="RFC5440" />: PCC, PCE, PCEP Peer.</t>
      <t>This document uses the following terms defined in 
      <xref target="RFC8051" />: Stateful PCE, Delegation.</t>
      <t>The message formats in this document are specified using
      Routing Backus-Naur Format (RBNF) encoding as specified in 
      <xref target="RFC5511" />.</t>
      <t>
        <list style="hanging">
          <t hangText="NAI:">Node or Adjacency Identifier.</t>
          <t hangText="PCC:">Path Computation Client.</t>
          <t hangText="PCE:">Path Computation Element.</t>
          <t hangText="PCEP:">Path Computation Element
          Protocol.</t>
          <t hangText="SR:">Segment Routing.</t>
          <t hangText="SID:">Segment Identifier.</t>
          <t hangText="SRv6:">Segment Routing for IPv6 forwarding
          plane.</t>
          <t hangText="SRH:">IPv6 Segment Routing Header.</t>
          <t hangText="SR Path:">IPv6 Segment (List of IPv6 SID
          representing a path in IPv6 SR domain)</t>
        </list>
      </t>
    </section>
    <!-- Terminology -->
    <section anchor="Overview"
             title="Overview of PCEP Operation in SRv6 Networks">
      <t>Basic operations for PCEP speakers is as per 
      <xref target='I-D.ietf-pce-segment-routing' />. SRv6 Paths
      computed by a PCE can be represented as an ordered list of
      SRv6 segments of 128-bit value. "SRv6 SID" or simply "SID"
      are often used as a shorter reference for "SRv6 Segment" in
      this document.</t>
      <t>
      <xref target='I-D.ietf-pce-segment-routing' />defined a new
      Explicit Route Object (ERO) subobject denoted by "SR-ERO
      subobject" 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 ERO
      subobject. An ERO containing SR-ERO subobjects can be
      included in the PCEP Path Computation Reply (PCRep) message
      defined in 
      <xref target='RFC5440' />, the PCEP LSP Initiate Request
      message (PCInitiate) defined in 
      <xref target='RFC8281' />, as well as in the PCEP LSP Update
      Request (PCUpd) and PCEP LSP State Report (PCRpt) messages
      defined in defined in 
      <xref target='RFC8231' />.</t>
      <t>This document define new subobjects "SRv6-ERO" and
      "SRv6-RRO" in ERO and RRO respectively to carry SRv6 SID
      (IPv6 Address). SRv6-capable PCEP speakers MUST be able to
      generate and/or process this.</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 SRv6 specific
      functionality.</t>
      <t>In summary, this document:
      <list style="symbols">
        <t>Defines a new PCEP capability for SRv6.</t>
        <t>Defines a new subobject SRv6-ERO in ERO.</t>
        <t>Defines a new subobject SRv6-RRO in RRO.</t>
        <t>Defines a new path setup type carried in the
        PATH-SETUP-TYPE and PATH-SETUP-TYPE-CAPABILITY TLVs.</t>
      </list></t>
      <section anchor="Operation-overview"
               title="Operation Overview">
        <t>In SR networks, an ingress node of an SR path appends
        all outgoing packets with an SR header consisting of a list
        of SIDs (IPv6 Prefix in case of SRv6). The header has all
        necessary information to guide the packets from the ingress
        node to the egress node of the path, and hence there is no
        need for any signaling protocol.</t>
        <t>For IPv6 in control plane with MPLS data-plane,
        mechanism remains same as 
        <xref target='I-D.ietf-pce-segment-routing' /></t>
        <t>This document describes extensions to SR path for IPv6
        data plane. SRv6 Path (i.e. ERO) consists of an ordered set
        of SRv6 SIDs(see details in 
        <xref target="SRv6-ERO-Subobject-Format" />).</t>
        <t>A PCC or PCE indicates its ability to support SRv6
        during the PCEP session Initialization Phase via a new
        SRv6-PCE-CAPABILITY sub-TLV (see details in 
        <xref target="SRv6-PCE-Capability-sub-TLV" />).</t>
      </section>
      <!-- Operation Overview -->
      <section anchor="SRv6-Specific-PCEP-Message-Extensions"
               title="SRv6-Specific PCEP Message Extensions">
        <t>As defined in 
        <xref target='RFC5440' />, a PCEP message consists of a
        common header followed by a variable length body made up of
        mandatory and/or optional objects. This document does not
        require any changes in the format of PCReq and PCRep
        messages specified in 
        <xref target='RFC5440' />, PCInitiate message specified in 
        <xref target='RFC8281' />, and PCRpt and PCUpd messages
        specified in 
        <xref target='RFC8231' />. However, PCEP messages
        pertaining to SRv6 MUST include PATH-SETUP-TYPE TLV in the
        RP or SRP object to clearly identify that SRv6 is intended.
        
        <!--In other words, a PCEP speaker MUST NOT infer whether or
   not a PCEP message pertains to SRv6 from any other object or
   TLV.--></t>
      </section>
    </section>
    <!-- Overview -->
    <section anchor="Object-Formats"
             title="Object Formats">
      <section anchor="The-OPEN-Object"
               title="The OPEN Object">
        <!--<t>This document defines a new optional TLV for use in the OPEN Object.</t>-->
        <section anchor="SRv6-PCE-Capability-sub-TLV"
                 title="The SRv6 PCE Capability sub-TLV">
          <t>This document defines a new Path Setup Type (PST) 
          <xref target='RFC8408' />for SRv6, as follows:
          <list style="symbols">
            <t>PST = TBD2: Path is setup using SRv6.</t>
          </list></t>
          <t>A PCEP speaker SHOULD 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 SRv6-PCE-CAPABILITY
          sub-TLV. PCEP speakers use this sub-TLV to exchange
          information about their SRv6 capability. If a PCEP
          speaker includes PST=TBD2 in the PST List of the
          PATH-SETUP-TYPE-CAPABILITY TLV then it MUST also include
          the SRv6-PCE- CAPABILITY sub-TLV inside the
          PATH-SETUP-TYPE-CAPABILITY TLV.</t>
          <t>The format of the SRv6-PCE-CAPABILITY sub-TLV is shown
          in the following figure:</t>
          <figure anchor="SRv6-PCE-CAPABILITY-sub-TLV-format"
                  title="SRv6-PCE-CAPABILITY sub-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=TBD1          |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Reserved           |             Flags         |N|X|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   MSD-Type    | MSD-Value     |   MSD-Type    | MSD-Value     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//                             ...                             //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   MSD-Type    | MSD-Value     |           Padding             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           ]]>
</artwork>
          </figure>
          <t>The code point for the TLV type (TBD1) is to be
          defined by IANA. The TLV length is variable.</t>
          <t>The value comprise of - 
          <list>
            <t>Reserved: 2 octet, this field MUST be set to 0 on
            transmission, and ignored on receipt.</t>
            <t>Flags: 2 octet, two bits are currently assigned in
            this document. 
            <list>
              <t>N bit: A PCC sets this flag bit to 1 to indicate
              that it is capable of resolving a Node or Adjacency
              Identifier (NAI) to a SRv6-SID.</t>
              <t>X bit: A PCC sets this bit to 1 to indicate that
              it does not impose any limit on MSD (irrespective of
              the MSD-Type).</t>
              <t>Unassigned bits MUST be set to 0 and ignored on
              receipt.</t>
            </list></t>
            <t>A pair of (MSD-Type,MSD-Value): Where MSD-Type (1
            octet) is as per the IGP MSD Type registry created by 
            <xref target='RFC8491' />and populated with SRv6 MSD
            types as per 
            <xref target='I-D.bashandy-isis-srv6-extensions' />;
            MSD-Value (1 octet) is as per 
            <xref target='RFC8491' />.</t>
          </list></t>
          <t>The TLV format is compliant with the PCEP TLV format
          defined in 
          <xref target='RFC5440' />. That is, the TLV is composed
          of 2 octets for the type, 2 octets specifying the TLV
          length, and a Value field. The Length field defines the
          length of the value portion in octets. The TLV is padded
          to 4-octet alignment, and padding is not included in the
          Length field. The number of (MSD-Type,MSD-Value) pairs
          can be determined from the Length field of the TLV.</t>
          <!--<t>The 32-bit value is formatted as follows. The "Maximum
          SID Depth" (1 octet) field (MSD) specifies the maximum
          number of SIDs a PCC is capable of imposing as MPLS
          labels. The "SRH MSD" (2 octets) field (SRH MSD)
          specifies the maximum number of SIDs a PCC is capable of
          imposing as next headers in SRH. "Flags" field is 1
          octet long, and this document defines the following
          flag:</t>
          <t>o L-flag: A PCC sets this flag to 1 to indicate that
          it does not impose any limit on MSD.</t>-->
          <!--<t>[Editor's Note - draft-bashandy-isis-srv6-extensions defines other fields like Max-End-Pop-SRH, Max-T-Ins-SRH, Max-T-Encap-SRH, max-End-D-SRH - should we follow the same?]</t>-->
        </section>
        <!-- SR PCE Capability TLV -->
      </section>
      <!-- The OPEN Object -->
      <section anchor="The-SRP-Object"
               title="The RP/SRP Object">
        <t>In order to indicate the SRv6 path, RP or SRP object
        MUST include the PATH-SETUP-TYPE TLV specified in 
        <xref target='RFC8408' />. This document defines a new Path
        Setup Type (PST=TBD2) for SRv6.</t>
        <t>The LSP-IDENTIFIERS TLV MAY be present for the above PST
        type.</t>
      </section>
      <!-- The SRP Object -->
      <section anchor="ERO"
               title="ERO">
        <t>In order to support SRv6, new subobjects "SRv6-ERO" and
        "SRv6-RRO" are defined in ERO and RRO respectively.</t>
        <section anchor="SRv6-ERO-Subobject"
                 title="SRv6-ERO Subobject">
          <t>An SRv6-ERO subobject is formatted as shown in the
          following diagram.</t>
          <figure anchor="SRv6-ERO-Subobject-Format"
                  title="SRv6-ERO Subobject 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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |L|   Type=TBD3 |     Length    | NT    |     Flags         |F|S|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              reserved           |       Function Code         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                      SRv6 SID (optional)                      |
   |                     (128-bit)                                 |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   //                    NAI (variable, optional)                 //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
</artwork>
          </figure>
          <!--<t>A following new flag is added:</t>
      <t>* I: When this bit is set, the SR-ERO sub-object represents a SRv6 segment.</t>-->
          <t>The fields in the SRv6-ERO Subobject are as
          follows:</t>
          <t>The 'L' Flag: Indicates whether the subobject
          represents a loose-hop (see 
          <xref target='RFC3209' />). If this flag is set to zero,
          a PCC MUST NOT overwrite the SID value present in the
          SRv6-ERO subobject. Otherwise, a PCC MAY expand or
          replace one or more SID values in the received SRv6-ERO
          based on its local policy.</t>
          <t>Type: Set to TBD3.</t>
          <t>Length: Contains the total length of the subobject in
          octets. The Length MUST be at least 24, and MUST be a
          multiple of 4. An SRv6-ERO subobject MUST contain at
          least one of a SRv6-SID or an NAI. The flags described
          below indicate whether the SRv6-SID or NAI fields are
          absent.</t>
          <t>NAI Type (NT): 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 MUST be ignored by the receiver. This
          document reuses NT types defined in 
          <xref target='I-D.ietf-pce-segment-routing' />: 
          <list>
            <t>If NT value is 0, the NAI MUST NOT be included.</t>
            <t>When NT value is 2, the NAI is as per the 'IPv6 Node
            ID' format defined in 
            <xref target='I-D.ietf-pce-segment-routing' />, which
            specifies an IPv6 address. This is used to identify the
            owner of the SRv6 Identifier. This is optional, as the
            LOC (the locater portion) of the SRv6 SID serves a
            similar purpose (when present).</t>
            <t>When NT value is 3, the NAI is as per the 'IPv6
            Adjacency' format defined in 
            <xref target='I-D.ietf-pce-segment-routing' />, which
            specify a pair of IPv6 addresses. This is used to
            identify the IPv6 Adjacency and used with the SRv6
            Adj-SID.</t>
            <t>When NT value is 6, the NAI is as per the
            'link-local IPv6 addresses' format defined in 
            <xref target='I-D.ietf-pce-segment-routing' />, which
            specify a pair of (global IPv6 address, interface ID)
            tuples. It is used to identify the IPv6 Adjacency and
            used with the SRv6 Adj-SID.</t>
            <t>SR-MPLS specific NT types are not valid in
            SRv6-ERO.</t>
          </list></t>
          <t>Flags: Used to carry additional information pertaining
          to the SRv6-SID. 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>S: When this bit is set to 1, the SRv6-SID value in
            the subobject body is absent. In this case, the PCC is
            responsible for choosing the SRv6-SID value, e.g., by
            looking up in the SR-DB using the NAI which, in this
            case, MUST be present in the subobject. If the S bit is
            set to 1 then F bit MUST be set to zero.</t>
            <t>F: When this bit is set to 1, the NAI value in the
            subobject body is absent. The F bit MUST be set to 1 if
            NT=0, and otherwise MUST be set to zero. The S and F
            bits MUST NOT both be set to 1.</t>
          </list></t>
          <t>Function Code: A 16 bit field representing supported
          functions associated with SRv6 SIDs. This information is
          optional and plays no role in the SRH imposed on the
          packet. It could be included for maintainability and
          diagnostic purpose. If function code is not defined 0 is
          used. Functions codes are defined in 
          <xref target='I-D.filsfils-spring-srv6-network-programming' />.</t>
          <t>SRv6 SID: SRv6 Identifier is the 128 bit IPv6
          addresses representing the SRv6 segment.</t>
          <t>NAI: The NAI associated with the SRv6-SID. The NAI's
          format depends on the value in the NT field, and is
          described in 
          <xref target='I-D.ietf-pce-segment-routing' />.</t>
          <t>At least one of the SRv6-SID and the NAI MUST be
          included in the SRv6-ERO subobject, and both MAY be
          included.</t>
        </section>
        <!-- SRIPv6-ERO Subobject Format -->
      </section>
      <!-- ERO -->
      <section anchor="RRO"
               title="RRO">
        <section anchor="SRv6-RRO-Subobject"
                 title="SRv6-RRO Subobject">
          <t>A PCC reports an SRv6 path to a PCE by sending a PCRpt
          message, per 
          <xref target='RFC8231' />. The RRO on this message
          represents the SID list that was applied by the PCC, that
          is, the actual path taken. The procedures of 
          <xref target='I-D.ietf-pce-segment-routing' />with
          respect to the RRO apply equally to this specification
          without change.</t>
          <t>An RRO contains one or more subobjects called
          "SRv6-RRO subobjects" whose format is shown below:</t>
          <figure anchor="SRv6-RRO-Subobject-Format"
                  title="SRv6-RRO Subobject 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=TBD4   |     Length    |  NT   |     Flags         |F|S|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              reserved           |       Function Code         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                      SRv6 SID                                 |
   |                     (128-bit)                                 |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   //                    NAI (variable)                           //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     ]]>
</artwork>
          </figure>
          <t>The format of the SRv6-RRO subobject is the same as
          that of the SRv6-ERO subobject, but without the L
          flag.</t>
          <t>Ordering of SRv6-RRO subobjects by PCC in PCRpt
          message remains as per 
          <xref target='I-D.ietf-pce-segment-routing' />.</t>
        </section>
        <!-- SRv6-RRO Subobject -->
      </section>
      <!-- RRO -->
    </section>
    <!-- Object Formats -->
    <!--<section anchor="Backward-Compatibility"
             title="Backward Compatibility">
      <t>A PCEP speaker that does not support the SR PCEP
      capability cannot recognize the SR-ERO or SR-RRO subobjects
      with new (I) flag MUST send a PCEP error with Error-Type = 4
      (Not supported object) and Error-Value = 2 (Not supported
      object Type) as per [RFC5440].</t>
    </section>-->
    <!-- Backward Compatibility -->
    <section anchor="Procedures"
             title="Procedures">
      <section anchor="Exchanging-SRv6-Capability"
               title="Exchanging the SRv6 Capability">
        <t>A PCC indicates that it is capable of supporting the
        head-end functions for SRv6 by including the
        SRv6-PCE-CAPABILITY sub-TLV in the Open message that it
        sends to a PCE. A PCE indicates that it is capable of
        computing SRv6 paths by including the SRv6-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=TBD2, but the
        SRv6-PCE-CAPABILITY sub-TLV is absent, then the PCEP
        speaker MUST send a PCErr message with Error- Type 10
        (Reception of an invalid object) and Error-Value TBD5 (to
        be assigned by IANA) (Missing PCE-SRv6-CAPABILITY sub-TLV)
        and MUST then close the PCEP session. If a PCEP speaker
        receives a PATH-SETUP- TYPE-CAPABILITY TLV with a
        SRv6-PCE-CAPABILITY sub-TLV, but the PST list does not
        contain PST=TBD2, then the PCEP speaker MUST ignore the
        SRv6-PCE-CAPABILITY sub-TLV.</t>
        <t>The number of SRv6 SIDs that can be imposed on a packet
        depends on the PCC's IPv6 data plane's capability. If a PCC
        sets the X flag to 1 then the MSD is not used and MUST NOT
        be included. If a PCE receives an SRv6-PCE-CAPABILITY
        sub-TLV with the X flag set to 1 then it MUST ignore any
        MSD-Type, MSD-Value fields and MUST assume that the sender
        can impose any length of SRH. If a PCC sets the X flag to
        zero, then it sets the SRv6 MSD-Type, MSD-Value fields that
        it can impose on a packet. If a PCE receives an
        SRv6-PCE-CAPABILITY sub-TLV with the X flag and SRv6
        MSD-Type, MSD-Value fields both set to zero then it is
        considered as an error and the PCE MUST respond with a
        PCErr message (Error-Type=1 "PCEP session establishment
        failure" and Error-Value=1 "reception of an invalid Open
        message or a non Open message."). In case the MSD-Type in
        SRv6-PCE-CAPABILITY sub-TLV received by the PCE does not
        correspond to one of the SRv6 MSD types, the PCE MUST
        respond with a PCErr message (Error-Type=1 "PCEP session
        establishment failure" and Error-Value=1 "reception of an
        invalid Open message or a non Open message.").</t>
        <t>Note that the MSD-Type, MSD-Value exchanged via the
        SRv6-PCE-CAPABILITY sub-TLV indicates the SRv6 SID
        imposition limit for the PCC node. However, if a PCE learns
        these via different means, e.g routing protocols, as
        specified in: 
        <xref target='I-D.li-ospf-ospfv3-srv6-extensions' />; 
        <xref target='I-D.bashandy-isis-srv6-extensions' />; 
        <xref target='I-D.dawra-idr-bgpls-srv6-ext' />, then it
        ignores the values in the SRv6-PCE-CAPABILITY sub-TLV.
        Furthermore, whenever a PCE learns the other advanced SRv6
        MSD via different means, it MUST use that value regardless
        of the values exchanged in the SRv6-PCE-CAPABILITY
        sub-TLV.</t>
        <t>Once an SRv6-capable PCEP session is established with a
        non-zero SRv6 MSD value, the corresponding PCE MUST NOT
        send SRv6 paths with a number of SIDs exceeding that SRv6
        MSD value (based on the SRv6 MSD Type). If a PCC needs to
        modify the SRv6 MSD value, it MUST close the PCEP session
        and re-establish it with the new value. If a PCEP session
        is established with a non-zero SRv6 MSD value, and the PCC
        receives an SRv6 path containing more SIDs than specified
        in the SRv6 MSD value (based on the SRv6 MSD type), the PCC
        MUST send a PCErr message with Error-Type 10 (Reception of
        an invalid object) and Error-Value 3 (Unsupported number of
        Segment ERO subobjects). If a PCEP session is established
        with an SRv6 MSD value of zero, then the PCC MAY specify an
        SRv6 MSD for each path computation request that it sends to
        the PCE, by including a "maximum SID depth" metric object
        on the request similar to 
        <xref target='I-D.ietf-pce-segment-routing' />.</t>
        <t>The N flag, X flag and (MSD-Type,MSD-Value) pair inside
        the SRv6-PCE-CAPABILITY sub-TLV are meaningful only in the
        Open message sent from a PCC to a PCE. As such, a PCE MUST
        set the flags to zero and not include any
        (MSD-Type, MSD-Value) pair in the SRv6-PCE-CAPABILITY
        sub-TLV in an outbound message to a PCC. Similarly, a PCC
        MUST ignore N, X flag and any (MSD-Type,MSD-Value) pair
        received from a PCE. If a PCE receives multiple
        SRv6-PCE-CAPABILITY sub-TLVs in an Open message, it
        processes only the first sub-TLV received.</t>
      </section>
      <!-- Exchanging the SRv6 Capability -->
      <section anchor="ERO-Processing"
               title="ERO Processing">
        <t>The ERO processing remains as per 
        <xref target='RFC5440' />and 
        <xref target='I-D.ietf-pce-segment-routing' />.</t>
        <section title="SRv6 ERO Validation ">
          <t>If a PCC does not support the SRv6 PCE Capability and
          thus cannot recognize the SRv6-ERO or SRv6-RRO
          subobjects, it will respond according to the rules for a
          malformed object per 
          <xref target='RFC5440' />.</t>
          <t>On receiving an SRv6-ERO, a PCC MUST validate that the
          Length field, the S bit, the F bit and the NT field are
          consistent, as follows.
          <list style="symbols">
            <t>If NT=0, the F bit MUST be 1, the S bit MUST be zero
            and the Length MUST be 24.</t>
            <t>If NT=2, the F bit MUST be zero. If the S bit is 1,
            the Length MUST be 24, otherwise the Length MUST be
            40.</t>
            <t>If NT=4, the F bit MUST be zero. If the S bit is 1,
            the Length MUST be 40, otherwise the Length MUST be
            56.</t>
            <t>If NT=6, the F bit MUST be zero. If the S bit is 1,
            the Length MUST be 48, otherwise the Length MUST be
            64.</t>
            <t>NT types (1, 3, and 5) are not valid for SRv6.</t>
          </list></t>
          <t>If a PCC finds that the NT field, Length field, S bit
          and F bit are not consistent, it MUST consider the entire
          ERO invalid and MUST send a PCErr message with Error-Type
          = 10 ("Reception of an invalid object") and Error-Value =
          11 ("Malformed object").</t>
          <t>If a PCEP speaker that does not recognize the NT value
          received in SRv6-ERO subobject, it would behave as per 
          <xref target='I-D.ietf-pce-segment-routing' />.</t>
          <t>In case a PCEP speaker receives the SRv6-ERO
          subobject, when the PST is not set to TBD2 or
          SRv6-PCE-CAPABILITY sub-TLV was not exchanged, it MUST
          send a PCErr message with Error-Type = 19 ("Invalid
          Operation") and Error-Value = TBD5 ("Attempted SRv6 when
          the capability was not advertised").</t>
          <t>If a PCC receives a list of SRv6 segments, and the
          number of SRv6 segments exceeds the SRv6 MSD that the PCC
          can impose on the packet (SRH), it MUST send a PCErr
          message with Error-Type = 10 ("Reception of an invalid
          object") and Error-Value = TBD ("Unsupported number of
          Segment ERO subobjects") as per 
          <xref target='I-D.ietf-pce-segment-routing' />.</t>
          <t>When a PCEP speaker detects that all subobjects of ERO
          are not of type TBD3, and if it does not handle such ERO,
          it MUST send a PCErr message with Error-Type = 10
          ("Reception of an invalid object") and Error-Value = TBD
          ("Non-identical ERO subobjects")as per 
          <xref target='I-D.ietf-pce-segment-routing' />.</t>
        </section>
        <section title="Interpreting the SRv6-ERO">
          <t>The SR-ERO contains a sequence of subobjects.
          According to 
          <xref target='I-D.ietf-spring-segment-routing-policy' />,
          each SRv6-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
          SR-ERO subobject represents the second segment, and so
          on.</t>
          <t>The PCC interprets the SRv6-ERO by converting it to an
          SRv6 SRH plus a next hop. The PCC sends packets along the
          segment routed path by prepending the SRH onto the
          packets and sending the resulting, modified packet to the
          next hop.</t>
        </section>
      </section>
      <!-- ERO Processing -->
      <section anchor="RRO-Processing"
               title="RRO Processing">
        <t>The syntax checking rules that apply to the SRv6-RRO
        subobject are identical to those of the SRv6-ERO subobject,
        except as noted below.</t>
        <t>If a PCEP speaker receives an SRv6-RRO subobject in
        which both SRv6 SID and NAI are absent, it MUST consider
        the entire RRO invalid and send a PCErr message with
        Error-Type = 10 ("Reception of an invalid object") and
        Error-Value = TBD6 ("Both SID and NAI are absent in
        SRv6-RRO subobject").</t>
        <t>If a PCE detects that the subobjects of an RRO are a
        mixture of SRv6-RRO subobjects and subobjects of other
        types, then it MUST send a PCErr message with Error-Type =
        10 ("Reception of an invalid object") and Error-Value =
        TBD7 ("RRO mixes SRv6-RRO subobjects with other subobject
        types").</t>
      </section>
      <!-- RRO Processing -->
    </section>
    <!-- Procedures -->
    <section anchor="Security-Considerations"
             title="Security Considerations">
      <t>The security considerations described in 
      <xref target='RFC5440' />, 
      <xref target='RFC8231' />and 
      <xref target='RFC8281' />, 
      <xref target='I-D.ietf-pce-segment-routing' />, are
      applicable to this specification. No additional security
      measure is required.</t>
    </section>
    <!-- Security Considerations -->
    <section anchor="IANA-Considerations"
             title="IANA Considerations">
      <section anchor="PCEP-ERO-and-RRO-subobjects"
               title="PCEP ERO and RRO subobjects">
        <t>This document defines a new subobject type for the PCEP
        explicit route object (ERO), and a new subobject type for
        the PCEP record route object (RRO). The code points for
        subobject types of these objects is maintained in the RSVP
        parameters registry, under the EXPLICIT_ROUTE and
        ROUTE_RECORD objects. IANA is requested to allocate
        code-points in the RSVP Parameters registry for each of the
        new subobject types defined in this document.</t>
        <figure>
          <artwork>
            <![CDATA[   
  Object                Subobject                  Subobject Type
  --------------------- -------------------------- ------------------
  EXPLICIT_ROUTE        SRv6-ERO (PCEP-specific)     TBD3
  ROUTE_RECORD          SRv6-RRO (PCEP-specific)     TBD4
                ]]>
</artwork>
        </figure>
      </section>
      <!-- PCEP ERO and RRO subobjects -->
      <section anchor="SRv6-ERO-flag"
               title="New SRv6-ERO Flag Registry">
        <t>IANA is requested to create a new sub-registry, named
        "SRv6-ERO Flag Field", within the "Path Computation Element
        Protocol (PCEP) Numbers" registry to manage the Flag field
        of the SRv6-ERO subobject. New values are to be assigned by
        Standards Action 
        <xref target='RFC8126' />. Each bit should be tracked with
        the following qualities:
        <list style="symbols">
          <t>Bit number (counting from bit 0 as the most
          significant bit)</t>
          <t>Capability description</t>
          <t>Defining RFC</t>
        </list></t>
        <t>The following values are defined in this document:</t>
        <figure>
          <artwork>
            <![CDATA[  
                Bit     Description            Reference
                -----   ------------------     --------------
                 0-9      Unassigned
                  10      NAI is absent (F)     This document
                  11      SID is absent (S)     This document
                ]]>
</artwork>
        </figure>
      </section>
      <section anchor="sub-TLV-Type-Indicators"
               title="PATH-SETUP-TYPE-CAPABILITY Sub-TLV Type Indicators">
               
        <t>IANA maintains a 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. IANA is requested to make
        the following assignment:</t>
        <figure>
          <artwork>
            <![CDATA[   
   Value     Meaning                     Reference
   -----     -------                     ---------
   TBD1      SRv6-PCE-CAPABILITY         This Document
   ]]>
</artwork>
        </figure>
      </section>
      <section anchor="SRv6-PCE-Capability-Flags"
               title="SRv6 PCE Capability Flags">
        <t>IANA is requested to create a new sub-registry, named
        "SRv6 Capability Flag Field", within the "Path Computation
        Element Protocol (PCEP) Numbers" registry to manage the
        Flag field of the SRv6-PCE-CAPABILITY sub-TLV. New values
        are to be assigned by Standards Action 
        <xref target='RFC8126' />. Each bit should be tracked with
        the following qualities:
        <list style="symbols">
          <t>Bit number (counting from bit 0 as the most
          significant bit)</t>
          <t>Capability description</t>
          <t>Defining RFC</t>
        </list></t>
        <t>The following values are defined in this document:</t>
        <figure>
          <artwork>
            <![CDATA[
                 Bit     Description           Reference

                 0-13    Unassigned
                  14     Node or Adjacency     This document
                         Identifier (NAI) is
                         supported (N)
                  15     Unlimited Maximum SID This document
                         Depth (X)    
]]>
</artwork>
        </figure>
      </section>
      <!-- TLV Type Indicators -->
      <section anchor="New-Path-Setup-Type"
               title="New Path Setup Type">
        <t>
        <xref target='RFC8408' />created a sub-registry within the
        "Path Computation Element Protocol (PCEP) Numbers" registry
        called "PCEP Path Setup Types". IANA is requested to
        allocate a new code point within this registry, as
        follows:</t>
        <figure>
          <artwork>
            <![CDATA[
Value             Description                  Reference
-----             -----------                  ---------
TBD2              Traffic engineering path is  This Document
                  setup using SRv6.                                                                   
   ]]>
</artwork>
        </figure>
      </section>
      <!-- New Path Setup Type -->
      <section anchor="ERROR-Objects"
               title="ERROR Objects">
        <t>IANA is requested to allocate code-points in the
        PCEP-ERROR Object Error Types and Values registry for the
        following new error-values:</t>
        <figure>
          <artwork>
            <![CDATA[   
   Error-Type   Meaning
   ----------   -------
   10           Reception of an invalid object
                Error-value = TBD5 (Missing 
                PCE-SRv6-CAPABILITY sub-TLV) 
                Error-value = TBD6 (Both SID and NAI are absent 
                in SRv6-RRO subobject)
                Error-value = TBD7 (RRO mixes SRv6-RRO subobjects 
                with other subobject types)       
   19           Invalid Operation
                Error-value = TBD5 (Attempted SRv6 when the 
                capability was not advertised)
                ]]>
</artwork>
        </figure>
      </section>
      <!-- ERROR Objects -->
    </section>
    <!-- IANA Considerations -->
    <section title="Acknowledgements">
      <t>The authors would like to thank Jeff Tentsura, Adrian
      Farrel and Khasanov Boris for valuable suggestions.</t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.3209"?>
      <?rfc include="reference.RFC.5440"?>
      <?rfc include="reference.RFC.5511"?>
      <?rfc include="reference.RFC.8126"?>
      <?rfc include="reference.RFC.8174"?>
      <?rfc include="reference.RFC.8231"?>
      <?rfc include="reference.RFC.8281"?>
      <?rfc include="reference.RFC.8402"?>
      <?rfc include="reference.RFC.8408"?>
      <?rfc include="reference.RFC.8491"?>
      <?rfc include="reference.I-D.ietf-pce-segment-routing"?>
      <?rfc include="reference.I-D.bashandy-isis-srv6-extensions"?>
      <?rfc include="reference.I-D.filsfils-spring-srv6-network-programming"?>
      </references>
    <references title="Informative References">
      <?rfc include="reference.RFC.4657"?>
      <?rfc include="reference.RFC.7855"?>
      <?rfc include="reference.RFC.8051"?>
      <?rfc include="reference.RFC.8354"?>
      <?rfc include="reference.I-D.ietf-6man-segment-routing-header"?>
      <?rfc include="reference.I-D.ietf-isis-segment-routing-extensions"?>
      <?rfc include="reference.I-D.ietf-ospf-ospfv3-segment-routing-extensions"?>
      <?rfc include="reference.I-D.ietf-spring-segment-routing-policy"?>
      <?rfc include="reference.I-D.li-ospf-ospfv3-srv6-extensions"?>
      <?rfc include="reference.I-D.dawra-idr-bgpls-srv6-ext"?>
      </references>
    <section title="Contributor">
      <t>The following persons contributed to this document:</t>
      <figure>
        <artwork>Dhruv Dhody Huawei Technologies Divyashree Techno
        Park, Whitefield Bangalore, Karnataka 560066 India EMail:
        dhruv.ietf@gmail.com Huang Wumin Huawei Technologies Huawei
        Building, No. 156 Beiqing Rd. Beijing 100095 China Email:
        huangwumin@huawei.com</artwork>
      </figure>
    </section>
  </back>
</rfc>
