<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-pce-local-protection-enforcement-11" number="9488" submissionType="IETF" category="std" consensus="true" updates="5440" obsoletes="" xml:lang="en" tocInclude="true" sortRefs="true" symRefs="true" version="3">

  <front>
    <title abbrev="Local Protection Enforcement in PCEP">Local Protection Enforcement in the Path Computation Element Communication Protocol (PCEP)</title>
    <seriesInfo name="RFC" value="9488"/>
    <author fullname="Andrew Stone" initials="A." surname="Stone">
      <organization>Nokia</organization>
      <address>
        <postal>
          <street>600 March Road</street>
          <city>Kanata</city>
          <region>Ontario</region>
          <code>K2K 2T6</code>
          <country>Canada</country>
        </postal>
        <email>andrew.stone@nokia.com</email>
      </address>
    </author>
    <author fullname="Mustapha Aissaoui" initials="M." surname="Aissaoui">
      <organization>Nokia</organization>
      <address>
        <postal>
          <street>600 March Road</street>
          <city>Kanata</city>
          <region>Ontario</region>
          <code>K2K 2T6</code>
          <country>Canada</country>
        </postal>
        <email>mustapha.aissaoui@nokia.com</email>
      </address>
    </author>
    <author fullname="Samuel Sidor" initials="S." surname="Sidor">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <extaddr>Eurovea Central 3</extaddr>
          <street>Pribinova 10</street>
          <city>Bratislava</city>
          <code>811 09</code>
          <country>Slovakia</country>
        </postal>
        <email>ssidor@cisco.com</email>
      </address>
    </author>
    <author fullname="Siva Sivabalan" initials="S." surname="Sivabalan">
      <organization>Ciena Corporation</organization>
      <address>
        <postal>
          <street>385 Terry Fox Drive</street>
          <city>Kanata</city>
          <region>Ontario</region>
          <code>K2K 0L1</code>
          <country>Canada</country>
        </postal>
        <email>ssivabal@ciena.com</email>
      </address>
    </author>
    <date year="2023" month="October"/>
    <area>rtg</area>
    <workgroup>pce</workgroup>

<keyword>segment routing</keyword>
<keyword>adjacency sid</keyword>
<keyword>sla</keyword>
<keyword>fast reroute</keyword>
<keyword>ti-lfa</keyword>

      <abstract>
      <t>This document updates RFC 5440 to clarify usage of the Local Protection Desired bit signaled in the Path Computation Element Communication Protocol (PCEP).
                This document also introduces a new flag for signaling protection enforcement in PCEP.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction" toc="default" numbered="true">
      <name>Introduction</name>
      <t>The Path Computation Element Communication Protocol (PCEP) <xref target="RFC5440" format="default"/> enables the communication between a Path Computation Client (PCC) and a PCE or between two PCEs based on the PCE architecture <xref target="RFC4655" format="default"/>. </t>


      <t>PCEP <xref target="RFC5440" format="default"/> utilizes flags,
      values, and concepts previously defined in RSVP-TE Extensions <xref
      target="RFC3209" format="default"/> and Fast Reroute Extensions to
      RSVP-TE <xref target="RFC4090" format="default"/>.  One such concept in
      PCEP is the Local Protection Desired (L) flag in the LSP
      Attributes (LSPA) object in <xref target="RFC5440" format="default"/>, which
      was originally defined in the Session Attribute object in <xref
      target="RFC3209" format="default"/>. In RSVP, this flag signals to
      downstream routers that they may use a local repair mechanism.  The
      headend router calculating the path does not know if a downstream
      router will or will not protect a hop during its calculation.
      Therefore, the L flag does not require the transit
      router to satisfy protection in order to establish the RSVP-signaled
      path.  This flag is signaled in PCEP as an attribute of the Label Switched Path (LSP) via the
      LSPA object. </t>
      <t>PCEP Extensions for Segment Routing <xref target="RFC8664"
      format="default"/> extends support in PCEP for Segment Routing paths. The
      path list is encoded with Segment Identifiers (SIDs), each of which
      might offer local protection.  The PCE may discover the protection
      eligibility for a SID via the Border Gateway Protocol - Link State (BGP-LS)
      <xref target="RFC9085" format="default"/> and take the protection into
      consideration as a path constraint.
      </t>
      <t>It is desirable for an operator to be able to define the enforcement of the protection requirement. </t>
      <t>This document updates <xref target="RFC5440" format="default"/> by further describing the behavior of the Local Protection Desired (L) flag and extends on it with the introduction of the Protection Enforcement (E) flag.</t>

      <t>The document contains descriptions in the context of Segment Routing; however, the content described is agnostic in regard to path setup type and data plane technology.</t>
    </section>
    <section anchor="requirements-language" 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"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    <section anchor="terminology" numbered="true" toc="default">
      <name>Terminology</name>
      <t>This document uses the following terminology:</t>
<dl newline="false" spacing="normal">
      <dt>PROTECTION MANDATORY:</dt><dd>The path <bcp14>MUST</bcp14> have protection eligibility on all links.</dd>
      <dt>UNPROTECTED MANDATORY:</dt><dd>The path <bcp14>MUST NOT</bcp14> have protection eligibility on all links.</dd>
      <dt>PROTECTION PREFERRED:</dt><dd>The path should have protection eligibility on all links but might contain links that do not have protection eligibility.</dd>
      <dt>UNPROTECTED PREFERRED:</dt><dd>The path should not have protection eligibility on all links but might contain links that have protection eligibility.</dd>
      <dt>PCC:</dt><dd>Path Computation Client.  Any client application requesting a
                path computation to be performed by a Path Computation Element.</dd>
      <dt>PCE:</dt><dd>Path Computation Element.  An entity (component, application,
                or network node) that is capable of computing a network path or
                route based on a network graph and applying computational
                constraints.</dd>
      <dt>PCEP:</dt><dd>Path Computation Element Communication Protocol</dd>
      <dt>LSPA:</dt><dd>LSP Attributes object <xref target="RFC5440" format="default"/></dd>
</dl>
    </section>
    <section anchor="motivation" toc="default" numbered="true">
      <name>Motivation</name>
      <section anchor="implementation-differences" toc="default" numbered="true">
        <name>Implementation Differences</name>

      <t>As defined in <xref target="RFC5440" format="default"/>, the mechanism to signal protection enforcement in PCEP is the previously mentioned L flag defined in the LSPA object.
                    The name of the flag uses the term "Desired", which by definition means "strongly wished for or intended". The use case for this flag originated in RSVP.
                    For RSVP-signaled paths, local protection is not within control of the PCE. However, <xref target="RFC5440" format="default"/> does state that "[w]hen set, this means that the computed path must include links protected with Fast Reroute as defined in <xref target="RFC4090" />."
                    Implementations that use PCEP <xref target="RFC5440" format="default"/> have interpreted the L flag as either PROTECTION MANDATORY or PROTECTION PREFERRED, leading to operational differences. </t>
      </section>
      <section anchor="sla-enforcement" toc="default" numbered="true">
        <name>SLA Enforcement</name>

          <t> The L flag is a boolean bit and thus unable to distinguish between the different
            options of PROTECTION MANDATORY, UNPROTECTED MANDATORY, PROTECTION
            PREFERRED, and UNPROTECTED PREFERRED.
                    Selecting one of these options is typically dependent on the Service
                    Level Agreement (SLA) the operator wishes to impose on the LSP. A network
                    may be providing transit to multiple SLA definitions against
                    the same base topology network, whose behavior could vary, such as
                    wanting local protection to be invoked on some LSPs and not wanting
                    local protection on others. When enforcement is used, the resulting shortest path calculation is impacted.</t>

		    <t> For example, PROTECTION MANDATORY is for use cases in which an operator may need the LSP to follow a path that has local protection provided along the full path, ensuring that
                    traffic will be fast rerouted at the point if there is a failure anywhere along the path. </t>

		    <t> As another example, UNPROTECTED MANDATORY is for use cases in which an operator may
                    intentionally prefer an LSP to not be locally protected
                    and thus would rather local failures cause the LSP to go down.
                    An example scenario is one where an LSP is protected via a secondary diverse LSP.
                    Each LSP is traffic engineered to follow specific traffic-engineered criteria
                    computed by the PCE to satisfy the SLA. Upon a failure, if local protection
                    is invoked on the active LSP traffic, the traffic may temporarily
                    traverse links that violate the TE requirements and could negatively
                    impact the resources being traversed (e.g., insufficient bandwidth).
                    In addition, depending on the network topological scenario,
                    it may not be feasible for the PCE to reroute the LSP while
                    respecting the TE requirements, which include path diversity; this results
                    in the LSP being torn down and switched to the
                    protected path anyways. In such scenarios, it is desirable for
                    the LSP to be simply torn down immediately and not rerouted
                    through local protection, so that traffic
                    may be forwarded through an already-established
                    traffic-engineered secondary path. </t>
        <t>
                    Both the UNPROTECTED PREFERRED and PROTECTED PREFERRED options provide a relaxation of the protection constraint.
                    These options can be used when an operator does not require protection enforcement. Regardless of the option selected, the protection status of a
                    resource does not influence whether the link must be pruned during a path calculation. Furthermore, the selection of either option indicates a priority selection to the
                    PCE when there is an option to choose a protected or unprotected instruction associated with a resource, ensuring consistent PCE behavior across different implementations.
        </t>
        <t>When used with Segment Routing, an adjacency may have both a protected SID and an unprotected SID.
                    If the UNPROTECTED PREFERRED option is selected, the PCE chooses the unprotected SID. Alternatively, if the PROTECTED PREFERRED option is selected, the PCE chooses the protected SID.
        </t>
      </section>
    </section>
    <section anchor="protection-enforcement-flag--e-flag-" toc="default" numbered="true">
      <name>Protection Enforcement Flag (E Flag)</name>
      <t><xref target="RFC5440" section="7.11" sectionFormat="of"></xref> describes the encoding of the Local Protection Desired (L) flag.
                The Protection Enforcement (E) flag, which extends the L flag, is specified below.</t>
		<table anchor="flagfieldtable" align="left"> 
  <name>Codespace of the Flag Field (LSPA Object)</name>    
  <thead>
    <tr>
      <th>Bit</th>   
      <th>Description</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>
      <tr>
          <td>6</td>
          <td>Protection Enforcement</td>
          <td>RFC 9488</td>
      </tr>
    <tr>
      <td>7</td>
      <td>Local Protection Desired</td>
      <td>RFC 5440</td>
    </tr>
  </tbody>
</table>

      <t>The following shows the format of the LSPA object as defined in <xref target="RFC5440" format="default"/> with the addition of the E flag defined in this document:</t>
      <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Exclude-any                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Include-any                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Include-all                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Setup Prio   |  Holding Prio |     Flags |E|L|   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   //                     Optional TLVs                           //
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

      <dl newline="true" spacing="normal">
	<dt>Flags (8 bits):</dt><dd>
	<dl newline="false" spacing="normal">
<dt>L (Local Protection Desired):</dt><dd>This flag is defined in <xref target="RFC5440" format="default"/>
and further updated by this document. When set to 1, protection is
desired. When set to 0, protection is not desired. The enforcement of the
protection is identified via the E flag.</dd>
<dt>E (Protection Enforcement):</dt><dd>This flag controls the strictness
with which the PCE must apply the L flag.  When set to 1, the value of the L
flag needs to be respected during resource selection by the PCE.  When the E flag
is set to 0, an attempt to respect the value of the L flag is made; however,
the PCE could relax or ignore the L flag when computing a path.  The
statements below indicate preference when the E flag is set to 0 in
combination with the L flag value.
</dd>
	</dl>
      </dd>
      </dl>

      <t>When both the L flag and E flag are set to 1, then the PCE <bcp14>MUST</bcp14> consider the protection eligibility as a PROTECTION MANDATORY constraint.</t>
      <t>When the L flag is set to 1 and the E flag is set to 0, then the PCE <bcp14>MUST</bcp14> consider the protection eligibility as a PROTECTION PREFERRED constraint.</t>
      <t>  When both the L flag and E flag are set to 0, then the PCE <bcp14>SHOULD</bcp14>
                consider the protection eligibility as an UNPROTECTED PREFERRED
                constraint but <bcp14>MAY</bcp14> consider the protection eligibility as an UNPROTECTED
                MANDATORY constraint. An example of when the latter behavior might
                be chosen is if the PCE has some means (outside the scope of this
                document) to detect that it is interacting with a legacy PCC that expects
                the legacy behavior.</t>
      <t>When the L flag is set to 0 and the E flag is set to 1, then the PCE <bcp14>MUST</bcp14> consider the protection eligibility as an UNPROTECTED MANDATORY constraint.</t>
      <t>
                If a PCE is unable to infer the protection status of a resource, the PCE <bcp14>MAY</bcp14> use local policy to define protected status assumptions.

                When computing a Segment Routing path, it is <bcp14>RECOMMENDED</bcp14> that a PCE assume a Node SID is protected. It is also <bcp14>RECOMMENDED</bcp14> that a PCE assume an Adjacency SID is protected if the backup flag advertised with the Adjacency SID is set.
      </t>
      <section anchor="compatibility" toc="default" numbered="true">
        <name>Backwards Compatibility</name>
        <t>This section outlines considerations for the E flag bit in the message
            passing between the PCC and the PCE that are not supported by the entity.
            The requirements for the PCE and the PCC implementing this document are described
            at the end.</t>
        <t>For a PCC or PCE that does not yet support this document, the E flag is ignored and set to 0 in PCRpt and/or PCUpd messages as per <xref target="RFC5440" format="default"/> for PCC-initiated LSPs or as per <xref target="RFC8281" format="default"/> for PCE-initiated LSPs. It is important to note that <xref target="RFC8231" format="default"/> and <xref target="RFC8281" format="default"/> permit the LSPA object <xref target="RFC5440" format="default"/> to be included in PCUpd messages for PCC-initiated and PCE-initiated LSPs.
        </t>
        <t>
            For PCC-initiated LSPs, the E flag (and L flag) in a PCUpd message is an echo from the
            previous PCRpt message; however, the bit value is ignored on the PCE from the
            previous PCRpt message, so the E flag value set in the PCUpd message is 0.
                    A PCE that does not support this document sends PCUpd messages with the E flag set to 0 for PCC-initiated LSPs even if set to 1 in the prior PCReq or PCRpt message.
        </t>
        <t>
                    A PCC that does not support this document sends PCRpt messages with the E flag set to 0 for PCE-initiated LSPs even if set to 1 in the prior PCInitiate or PCUpd message.
        </t>
        <t>For a PCC that does support this document, the E flag <bcp14>MAY</bcp14> be set to 1 depending on local configuration.
                    If communicating with a PCE that does not yet support this document, the PCE follows the behavior specified in <xref target="RFC5440" format="default"/> and ignores the E flag.
                    Thus, a computed path might not respect the enforcement constraint.</t>
        <t>For PCC-initiated LSPs, the PCC <bcp14>SHOULD</bcp14> ignore the E flag value received from the PCE in a PCUpd message as it may be communicating with a PCE that does not support this document.</t>
        <t>For PCE-initiated LSPs, the PCC <bcp14>MAY</bcp14> process the E flag value received from the PCE in a PCUpd message. The PCE <bcp14>SHOULD</bcp14> ignore the E flag value received from the PCC in a PCRpt message as it may be communicating with a PCC
                that does not support this document. </t>
      </section>
    </section>
    <section anchor="security-considerations" toc="default" numbered="true">
      <name>Security Considerations</name>
      <t>This document clarifies the behavior of an existing flag and introduces a new flag to provide further control of that existing behavior. The introduction of this new flag and the behavior clarification do not create any new sensitive information. No additional security measure is required.</t>
      <t>Securing the PCEP session using Transport Layer Security (TLS) <xref target="RFC8253" format="default"/>, as per the recommendations and best current practices in <xref target="RFC9325" format="default"/>, is <bcp14>RECOMMENDED</bcp14>.</t>
    </section>
    <section anchor="iana-considerations" toc="default" numbered="true">
      <name>IANA Considerations</name>
      <t>This document defines a new bit value in the subregistry "LSPA Object Flag Field" in the "Path Computation Element Protocol (PCEP) Numbers" registry. IANA has made the following codepoint allocation.</t>

<table anchor="prot-enforce-iana-table" align="left"> 
  <name>Addition to LSPA Object Flag Field Registry</name>    
  <thead>
    <tr>
      <th>Bit</th>    
      <th>Description</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>          
    <tr>
      <td>6</td>
      <td>Protection Enforcement</td>
      <td>RFC 9488</td>
    </tr>
  </tbody>
</table>

    </section>
  </middle>
  <back>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5440.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3209.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4090.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8253.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8231.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8281.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9325.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4655.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8664.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9085.xml"/>
      </references>
    </references>
    <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>Thanks to <contact fullname="Dhruv Dhody"/>, <contact fullname="Mike Koldychev"/>, and <contact fullname="John Scudder"/> for reviewing and providing very valuable feedback and discussions on this document.</t>
      <t>Thanks to <contact fullname="Julien Meuric"/> for shepherding this document. </t>
    </section>
  </back>
</rfc>
