<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc docName="draft-sidor-pce-lsp-state-reporting-extensions-06" ipr="trust200902" submissionType="IETF" category="std">
  <front>
    <title abbrev="STATE-REPORTING-EXTENSIONS">LSP State Reporting Extensions in Path Computation Element Communication Protocol (PCEP)</title>
    <author fullname="Samuel Sidor" initials="S." surname="Sidor">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Eurovea Central 3</street>
          <street>Pribinova 10</street>
          <city>Bratislava</city>
          <code>811 09</code>
          <country>Slovakia</country>
        </postal>
        <email>ssidor@cisco.com</email>
      </address>
    </author>
    <author fullname="Zafar Ali" initials="Z." surname="Ali">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <email>zali@cisco.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>
        <email>c.l@huawei.com</email>
      </address>
    </author>
    <author fullname="Mike Koldychev" initials="M." surname="Koldychev">
      <organization>Ciena Corporation</organization>
      <address>
        <postal>
          <street>385 Terry Fox Dr.</street>
          <city>Kanata</city>
          <region>Ontario</region>
          <code>K2K 0L1</code>
          <country>Canada</country>
        </postal>
        <email>mkoldych@proton.me</email>
      </address>
    </author>
    <author fullname="Andrew Stone" initials="A." surname="Stone">
      <organization>Nokia</organization>
      <address>
        <email>andrew.stone@nokia.com</email>
     </address>
    </author>
    <date/>
    <area>Routing</area>
    <workgroup>PCE Working Group</workgroup>
    <abstract>
      <t>
        The Path Computation Element Communication Protocol (PCEP) is defined in multiple RFCs for enabling communication between Path Computation Elements (PCEs) and Path Computation Clients (PCCs).
      </t>
      <t>
        Although PCEP defines various Label Switched Path (LSP) identifiers, attributes, and constraints, there are operational attributes available on the PCC that can enhance path computation and improve the debugging experience, which are not currently supported in PCEP.
      </t>
      <t>
        This document defines extensions to PCEP to include:
      </t>
      <t>
        <ul spacing="compact">
          <li>Support for explicit or dynamic path types</li>
          <li>Mechanisms to mark LSPs as eligible for use as transit LSPs</li>
        </ul>
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction">
      <t>
        A Stateful Path Computation Element (PCE) maintains comprehensive information on the current network state, including computed Label Switched Paths (LSPs), reserved network resources, and the pending path computation requests. This information is critical for computing paths for traffic-engineering LSPs and any associated or dependent LSPs.
      </t>
      <t>
        This document introduces the ability to encode information regarding whether a path included in an Explicit Route Object (ERO) was specified explicitly or was the result of dynamic path computation executed by a PCE or PCC. Such information can aid debuggability and can be used by other PCEs in the network to avoid triggering unnecessary path computations for LSPs where it is not intended (e.g., PCE-initiated LSPs with an explicit path).
      </t>
      <t>
        Additionally, this document specifies a set of extensions to PCEP to enhance the accuracy of path computations by considering LSP transit eligibility, for example, as described in the case of LSP stitching in <xref target="I-D.ietf-pce-stateful-interdomain"/>.
      </t>
      <t>
        The Explicit Path mechanism described in this document is applicable to all path setup types. The Transit Eligible mechanism described in this document is applicable to LSPs that have an associated Binding Label/SID as defined in <xref target="RFC9604"/>.
      </t>
      <section anchor="Language" title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP
      14 <xref target="RFC2119"></xref> <xref target="RFC8174"></xref> when,
      and only when, they appear in all capitals, as shown here.</t>
    </section>
    </section>
    <section title="Terminology">
      <t>The following terms are used in this document:
        <ul spacing="compact">
          <li>Binding Label/SID: A Binding Segment Identifier (SID) or Binding Label associated with an SR Policy or SR-TE LSP, as defined in <xref target="RFC9604"/>.</li>
          <li>CP: Candidate Path, one of the candidate paths of an SR Policy.</li>
          <li>ERO: Explicit Route Object.</li>
          <li>LSP: Label Switched Path.</li>
          <li>PCC: Path Computation Client.</li>
          <li>PCE: Path Computation Element.</li>
          <li>PCEP: Path Computation Element Protocol.</li>
          <li>SL: Segment List, a sequence of segments describing a path through the network.</li>
          <li>Transit LSP: An LSP whose Binding Label/SID is used as a segment (hop) in the path computed for another LSP. By referring to the Binding Label/SID of the Transit LSP as a single segment, the head-end of the outer LSP can steer traffic along the inner LSP's path without having to encode all of its individual hops. This technique is used, for example, in inter-domain LSP stitching as described in <xref target="I-D.ietf-pce-stateful-interdomain"/>.</li>
        </ul>
      </t>
    </section>
    <section title="Protocol Extensions">
      <section anchor="STATEFUL-PCE-CAPABILITY" title="STATEFUL-PCE-CAPABILITY TLV">
        <t>
          New flags are defined for the STATEFUL-PCE-CAPABILITY TLV, originally defined in <xref format="default" section="5.4" sectionFormat="of" target="RFC8231"/>.
        </t>
        <t>
          <ul spacing="compact">
            <li>T (TRANSIT-ELIGIBLE-CAPABILITY): If set, indicates that the PCEP peer supports the advertisement of the Transit Eligible flag in the LSP-EXTENDED-FLAG as described in <xref target="LSP-Eligibility"/>.</li>
            <li>X (EXPLICIT-PATH-CAPABILITY): If set, indicates that the PCEP peer supports the advertisement of the Explicit flag in the LSP-EXTENDED-FLAG.</li>
          </ul>
        </t>
      </section>
      <section title="LSP-EXTENDED-FLAG TLV">
        <t>
          New flags are introduced in the LSP-EXTENDED-FLAG TLV, which was initially defined in <xref format="default" section="3.1" sectionFormat="of" target="RFC9357"/>.
        </t>
        <t>
          <ul spacing="compact">
            <li>X (Explicit): If set, indicates that the path encoded in the ERO is explicitly specified and not dynamically computed by the PCEP peer.</li>
            <li>T (Transit Eligible): If set, indicates that the Binding Label/SID <xref target="RFC9604"/> of the LSP can be used in paths computed for other LSPs.</li>
          </ul>
        </t>
      </section>
    </section>
    <section title="Operation">
      <section title="Explicit or Dynamic Path">
        <t>
          The X flag in the LSP-EXTENDED-FLAG TLV MUST NOT be set unless the EXPLICIT-PATH-CAPABILITY is supported by both PCEP peers.
        </t>
        <t>
          If a PCEP peer receives the X flag set in the LSP-EXTENDED-FLAG TLV without having negotiated EXPLICIT-PATH-CAPABILITY, it MUST send a PCErr message with Error-Type 10 and Error-Value TBA5 (see <xref target="PCEP-ERROR-IANA"/>) and MUST ignore the flag.
        </t>
        <t>
          If the EXPLICIT-PATH-CAPABILITY is not advertised, the PCE implementation MAY use a local policy to determine the type of path.
        </t>
        <t>
          For instance, if an operator requests the creation of a PCE-initiated Candidate Path with an explicit path, then such a path will be encoded in the ERO object of the PCInitiate message sent to the PCC. If the delegation of such LSP is transferred to another PCE, the new PCE will not know whether the path of the LSP was computed dynamically or explicitly specified by the operator.
        </t>
        <t>
          Even if a similar problem does not exist for LSPs originated on the PCC, information about the type of path may be valuable for other purposes, such as debuggability.
        </t>
        <t>
          For PCC-initiated LSPs, the X flag value is initially set by the PCC in the PCRpt message, and the PCE MUST set the flag value in PCUpd messages for such LSPs based on the last reported state.
        </t>
        <t>
          For PCE-initiated LSPs, the X flag value is initially set by the PCE in the PCInitiate message but MAY be modified in subsequent PCUpd messages. The PCC MUST set the flag value in PCRpt messages for such LSPs based on the value received from the last PCInitiate or PCUpd message.
        </t>
        <t>
          It is important to note that the Explicit/Dynamic path type is a path-level property indicating the origin of the path decision (operator-defined vs. algorithmically computed), while strict and loose subobjects are hop-level properties defined per ERO subobject in <xref target="RFC5440"/> that describe how precisely each individual hop must be followed. Both explicitly specified and dynamically computed paths can contain a mix of strict and loose subobjects:
        </t>
        <t>
          <ul spacing="compact">
            <li>For an Explicitly Specified Path (X flag set): An operator might define a path that explicitly specifies certain hops (strict) but allows the forwarding plane to select the exact route for other segments (loose). For example, "go strictly through Router A, then loosely to Network B, then strictly through Router C."</li>
            <li>For a Dynamically Computed Path (X flag not set): A PCE, when computing a path, might generate an ERO that includes strict hops (e.g., to satisfy specific constraints like avoiding certain links) and loose hops (e.g., where flexibility is allowed to optimize for metrics like shortest path).</li>
          </ul>
        </t>
        <t>
          The following example illustrates the distinction. Consider the topology below:
        </t>
        <figure>
          <artwork><![CDATA[
    +----+     +----+     +----+     +----+
    | R1 |-----| R2 |-----| R3 |-----| R4 |
    +----+     +----+  \  +----+     +----+
                        \                 |
                       +----+        +----+
                       | R5 |--------| R6 |
                       +----+        +----+
          ]]></artwork>
        </figure>
        <t>
          An operator wishes to create an LSP from R1 to R4 and explicitly requires that traffic passes through R2 (e.g., for policy reasons). The operator does not prescribe the exact route beyond R2. The resulting ERO would contain R2 as a strict subobject followed by R4 as a loose subobject. Because the overall path was defined by the operator, the X flag is set (Explicit Path), even though one of the hops is loose. The forwarding plane may choose either R2->R3->R4 or R2->R5->R6->R4 to reach R4.
        </t>
        <t>
          By contrast, consider a PCE that computes a path R1->R2->R3->R4 using all strict subobjects to satisfy a specific bandwidth constraint. Because the path was computed algorithmically by the PCE, the X flag is not set (Dynamic Path), even though every hop is strict.
        </t>
        <t>
          This distinction is operationally significant: a downstream PCE that receives delegation for an LSP can use the X flag to determine whether it should attempt to recompute the path. For a PCE-initiated LSP with X flag set, the PCE SHOULD NOT recompute the path unless explicitly instructed to do so, as the explicit path reflects operator intent.
        </t>
        <t>
          For LSPs with multiple Segment Lists (SLs) per Candidate Path (CP), the path type (explicit or dynamic) is advertised only once per Candidate Path. Therefore, it is not possible to mix dynamic and explicit Segment Lists within a single Candidate Path.
        </t>
      </section>
      <section anchor="LSP-Eligibility" title="LSP Transit Eligibility">
        <t>
          The T flag in the LSP-EXTENDED-FLAG TLV MUST NOT be set unless the TRANSIT-ELIGIBLE-CAPABILITY is supported by both PCEP peers.
        </t>
        <t>
          If a PCEP peer receives the T flag set in the LSP-EXTENDED-FLAG TLV without having negotiated TRANSIT-ELIGIBLE-CAPABILITY, it MUST send a PCErr message with Error-Type 10 and Error-Value TBA6 (see <xref target="PCEP-ERROR-IANA"/>) and MUST ignore the flag.
        </t>
        <t>
          If the TRANSIT-ELIGIBLE-CAPABILITY is not advertised, the PCE implementation MAY use a local policy to determine the value of the Transit Eligible flag.
        </t>
        <t>
          For PCC-initiated LSPs, the T flag value is initially set by the PCC in the PCRpt message. The PCE MUST set the flag value in PCUpd messages for these LSPs based on the last reported state.
        </t>
        <t>
          For PCE-initiated LSPs, the T flag value is initially set by the PCE in the PCInitiate message but MAY be modified in subsequent PCUpd messages. The PCC MUST set the flag value in PCRpt messages for these LSPs based on the value received from the latest PCInitiate or PCUpd message.
        </t>
        <t>
          The following example illustrates the use of the T flag. Consider an inter-domain topology where a PCE is responsible for computing an end-to-end LSP across two domains:
        </t>
        <figure>
          <artwork><![CDATA[
       Domain 1              Domain 2
  +-----------------+   +-----------------+
  |                 |   |                 |
  |  R1----R2----R3-+---+-R3----R4----R5  |
  |        |        |   |                 |
  |       R6        |   |                 |
  |                 |   |                 |
  +-----------------+   +-----------------+

  LSP_B: R1 -> R3  (Binding SID: BS1, T flag set)
  LSP_C: R3 -> R5  (Binding SID: BS2, T flag set)
          ]]></artwork>
        </figure>
        <t>
          LSP_B is an intra-domain LSP within Domain 1, traversing R1->R2->R3, with a Binding SID BS1 assigned to it. LSP_C is an intra-domain LSP within Domain 2, traversing R3->R4->R5, with a Binding SID BS2 assigned to it. Both LSP_B and LSP_C have the T flag set in their LSP-EXTENDED-FLAG TLV, indicating to the PCE that their respective Binding SIDs may be used as segments in paths computed for other LSPs.
        </t>
        <t>
          When an operator requests an end-to-end LSP_A from R1 to R5, the PCE can leverage the T flag information to construct the path. Instead of computing a full explicit path enumerating every hop across both domains, the PCE can use BS1 and BS2 as single-hop segments in the ERO for LSP_A. The resulting ERO for LSP_A would be: {BS1 (strict), BS2 (strict)}, stitching the two intra-domain LSPs together. Without the T flag, the PCE would have no standardized way to know which LSPs have Binding SIDs available and are eligible for use in this manner, potentially leading to suboptimal path computation or requiring out-of-band coordination.
        </t>
      </section>
    </section>
    <section title="Manageability Considerations" numbered="true" toc="default">
      <t>All manageability requirements and considerations listed in <xref target="RFC5440"/> and <xref target="RFC8231"/> apply to the PCEP extensions defined in this document. In addition, requirements and considerations listed in this section apply.</t>
      <section title="Control of Function and Policy" numbered="true" toc="default">
        <t>A PCE or PCC implementation MAY allow the capability of supporting PCEP extensions introduced in this document to be enabled or disabled as part of the global configuration.</t>
      </section>
      <section title="Information and Data Models" numbered="true" toc="default">
        <t>An implementation SHOULD allow the operator to view the capability defined in this document. It is expected that a future version of the PCEP YANG module <xref target="RFC9826"/> will be extended to include the capability introduced in <xref target="STATEFUL-PCE-CAPABILITY"/> for the PCEP peer.</t>
        </section>
      <section title="Verify Correct Operations" numbered="true" toc="default">
        <t>Operation verification requirements already listed in <xref target="RFC5440"/> and <xref target="RFC8231"/> are applicable to mechanisms defined in this document.</t>
      </section>
      <section title="Impact on Network Operations" numbered="true" toc="default">
        <t>The mechanisms defined in <xref target="RFC5440"/> and <xref target="RFC8231"/> also apply to the PCEP extensions defined in this document.</t>
      </section>
    </section>
    <section  title="Implementation Status">
      <t>[Note to the RFC Editor - remove this section before publication, as
      well as remove the reference to RFC 7942.]</t>

      <t>This section records the status of known implementations of the
      protocol defined by this specification at the time of posting of this
      Internet-Draft, and is based on a proposal described in <xref
      target="RFC7942"/>. The description of implementations in this section
      is intended to assist the IETF in its decision processes in progressing
      drafts to RFCs. Please note that the listing of any individual
      implementation here does not imply endorsement by the IETF. Furthermore,
      no effort has been spent to verify the information presented here that
      was supplied by IETF contributors. This is not intended as, and must not
      be construed to be, a catalog of available implementations or their
      features. Readers are advised to note that other implementations may
      exist.</t>


      <t>According to <xref target="RFC7942"/>, "this will allow reviewers and
      working groups to assign due consideration to documents that have the
      benefit of running code, which may serve as evidence of valuable
      experimentation and feedback that have made the implemented protocols
      more mature. It is up to the individual working groups to use this
      information as they see fit".</t>
    </section>

    <section title="Security Considerations">
      <t>
        The security considerations described in <xref target="RFC8231"/> and <xref target="RFC5440"/> are applicable to this document.
      </t>
      <t>
        The X (Explicit) flag defined in this document reveals operator intent regarding how a path was determined -- whether it was hand-crafted by an operator or dynamically computed. In networks where this distinction is sensitive, an attacker with access to PCEP messages could use this information to infer network management policies. The security mechanisms defined in <xref target="RFC5440"/> (TCP-AO) and <xref target="RFC8231"/> (PCEPS with TLS) are sufficient to protect the confidentiality and integrity of this information.
      </t>
      <t>
        The T (Transit Eligible) flag defined in this document indicates that the Binding Label/SID of an LSP may be used in paths computed for other LSPs (e.g., for LSP stitching). A misconfigured or malicious node setting this flag without authorization could cause traffic to be steered through unintended paths, potentially leading to policy violations or routing loops. Implementations SHOULD enforce capability negotiation as described in <xref target="LSP-Eligibility"/> and MAY apply local policies to restrict the use of LSPs for transit, regardless of the flag value.
      </t>
      <t>
        These extensions do not introduce any new authentication or encryption requirements beyond those already specified in <xref target="RFC5440"/> and <xref target="RFC8231"/>.
      </t>
    </section>
    <section title="IANA Considerations">
     <section anchor="PCE-CAPABILITY-FLAG-IANA" title="STATEFUL-PCE-CAPABILITY TLV Flag">
      <t>
        IANA maintains a registry, named "STATEFUL-PCE-CAPABILITY TLV Flag Field", within the "Path Computation Element Protocol (PCEP) Numbers" registry group to manage the Flags field of the STATEFUL-PCE-CAPABILITY TLV. The registration policy for this registry is Standards Action <xref target="RFC8126"/>. IANA is requested to make the following assignments:
      </t>
      <texttable>
        <ttcol>Bit</ttcol>
        <ttcol>Description</ttcol>
        <ttcol>Reference</ttcol>
        <c>TBA1</c>
        <c>T (TRANSIT-ELIGIBLE-CAPABILITY)</c>
        <c>This document</c>
        <c>TBA2</c>
        <c>X (EXPLICIT-PATH-CAPABILITY)</c>
        <c>This document</c>
      </texttable>
     </section>
     <section anchor="LSP-EXTENDED-FLAG" title="LSP-EXTENDED-FLAG TLV Flags">
      <t>
        IANA maintains a registry, named "LSP-EXTENDED-FLAG TLV Flag Field", within the "Path Computation Element Protocol (PCEP) Numbers" registry group to manage the Flags field of the LSP-EXTENDED-FLAG TLV. The registration policy for this registry is Standards Action <xref target="RFC8126"/>. IANA is requested to make the following assignments:
      </t>
      <texttable>
        <ttcol>Bit</ttcol>
        <ttcol>Description</ttcol>
        <ttcol>Reference</ttcol>
        <c>TBA3</c>
        <c>X (Explicit)</c>
        <c>This document</c>
        <c>TBA4</c>
        <c>T (Transit Eligible)</c>
        <c>This document</c>
      </texttable>
     </section>
     <section anchor="PCEP-ERROR-IANA" title="PCEP Error Object Error Types and Values">
      <t>
        IANA maintains a registry, named "PCEP-ERROR Object Error Types and Values",
        within the "Path Computation Element Protocol (PCEP) Numbers" registry group.
        The registration policy for this registry is IETF Review <xref target="RFC8126"/>.
        IANA is requested to make the following assignments under
        Error-Type 10 "Reception of an invalid object" <xref target="RFC5440"/>:
      </t>
      <texttable>
        <ttcol>Error-Type</ttcol>
        <ttcol>Error-Value</ttcol>
        <ttcol>Description</ttcol>
        <ttcol>Reference</ttcol>
        <c>10</c>
        <c>TBA5</c>
        <c>X flag set in LSP-EXTENDED-FLAG TLV without EXPLICIT-PATH-CAPABILITY negotiated</c>
        <c>This document</c>
        <c>10</c>
        <c>TBA6</c>
        <c>T flag set in LSP-EXTENDED-FLAG TLV without TRANSIT-ELIGIBLE-CAPABILITY negotiated</c>
        <c>This document</c>
      </texttable>
     </section>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.8126"?>
      <?rfc include="reference.RFC.8174"?>
      <?rfc include="reference.RFC.5440"?>
      <?rfc include="reference.RFC.8231"?>
      <?rfc include="reference.RFC.9357"?>
      <?rfc include="reference.RFC.9604"?>
    </references>
    <references title="Informative References">
      <?rfc include="reference.RFC.7942"?>
      <?rfc include="reference.RFC.9826"?>
      <?rfc include="reference.I-D.ietf-pce-stateful-interdomain"?>
    </references>
    <section title="Acknowledgements">
      <t>The authors would like to thank Rajesh Melarcode Venkateswaran for their contributions to this document.</t>
    </section>
  </back>
</rfc>