<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<rfc ipr="trust200902" docName="draft-ietf-pce-local-protection-enforcement-10" category="std" updates="5440">
    <front>
        <title abbrev="Protection Enforcement">Local Protection Enforcement in PCEP</title>
        <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>
                    <street>Eurovea Central 3.</street>
                    <street>Pribinova 10</street>
                    <city>Bratislava</city>
                    <code>811 09</code>
                    <country>Slovakia</country>
                </postal>
                <email>ssidor@cisco.com</email>
            </address>
        </author>
        <author fullname="Siva Sivabalan" initials="S." surname="Sivabalan">
            <organization>Ciena Coroporation</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="May" day="19"/>

        <abstract>
            <t>This document extends the base specification to clarify usage of the local protection desired bit signalled in the Path Computation Element Protocol (PCEP).
                This document also introduces a new flag for signalling protection strictness in PCEP.</t>
        </abstract>
    </front>
    <middle>
        <section title="Introduction" anchor="introduction" toc="default">
            <t>The Path Computation Element (PCE) Communication Protocol (PCEP) <xref target="RFC5440" /> enables the communication between a Path Computation Client (PCC) and a PCE, or between two PCEs based on the PCE architecture <xref target="RFC4655" />. </t>
            <t>PCEP <xref target="RFC5440" /> utilizes flags, values and concepts previously defined in RSVP-TE Extensions <xref target="RFC3209" /> and Fast Reroute Extensions to RSVP-TE <xref target="RFC4090" />.
                One such concept in PCEP is the 'Local Protection Desired' (L flag in the LSPA Object in <xref target="RFC5440" />),
                which was originally defined in the SESSION-ATTRIBUTE Object in RFC3209. 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 whether a downstream router will or will not protect a hop during its calculation.
                Therefore, a local protection desired does not require the transit router to satisfy protection in order to establish the RSVP signalled path.
                This flag is signalled in PCEP as an attribute of the LSP via the LSP Attributes object. </t>

            <t>PCEP Extensions for Segment Routing (<xref target="RFC8664" />) extends support in PCEP for Segment Routed paths. The path list is encoded with Segment Identifiers, each of which might offer local protection.
                The PCE may discover the protection eligibility for a Segment Identifier (SID) via BGP-LS <xref target="RFC9085" /> 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, or strictness of the protection requirement. </t>
            <t>This document updates <xref target="RFC5440" /> by further describing the behaviour with the Local Protection Desired Flag (L flag) and extends on it with the introduction of the Enforcement Flag (E flag).</t>
            <t>The document contains reference notes for Segment Routing, however the content described is path setup type and data plane technology agnostic.</t>
        </section>
        <section title="Requirements Language" anchor="requirements-language">
            <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 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when,
                they appear in all capitals, as shown here.</t>
        </section>
        <section title="Terminology" anchor="terminology">
            <t>This document uses the following terminology:</t>
            <t>   PROTECTION MANDATORY: The Path MUST have protection eligibility on all links.</t>
            <t>   UNPROTECTED MANDATORY: The Path MUST NOT have protection eligibility on all links.</t>
            <t>   PROTECTION PREFERRED: The Path should have protection eligibility on all links but might contain links which do not have protection eligibility.</t>
            <t>   UNPROTECTED PREFERRED: The Path should not have protection eligibility on all links but might contain links which have protection eligibility.</t>
            <t>   PCC:  Path Computation Client.  Any client application requesting a
                path computation to be performed by a Path Computation Element.</t>
            <t>   PCE:  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.</t>
            <t>   PCEP:  Path Computation Element Protocol.</t>
            <t>   LSPA: LSP Attributes Object in PCEP, defined in RFC5440</t>
        </section>
        <section title="Motivation" anchor="motivation" toc="default">
            <section title="Implementation differences" anchor="implementation-differences" toc="default">
                <t>As defined in <xref target="RFC5440" /> 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" and the use case originated from the RSVP.
                    For RSVP signalled paths, local protection is not within control of the PCE. However, <xref target="RFC5440" /> does state "When set, this means that the computed path must include links protected with Fast Reroute as defined in [RFC4090]."
                    Implementations of <xref target="RFC5440" /> have either interpreted the L flag as PROTECTION MANDATORY or PROTECTION PREFERRED, leading to operational differences. </t>
            </section>
            <section title="SLA Enforcement" anchor="sla-enforcement" toc="default">
                <t> The boolean bit L flag is unable to distinguish between the different options of PROTECTION MANDATORY, UNPROTECTED MANDATORY, PROTECTION PREFERRED and UNPROTECTED PREFERRED.
                    Selecting one of the options is typically dependent on the service
                    level agreement the operator wishes to impose on the LSP. A network
                    may be providing transit to multiple service agreement 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 where an operator may need the LSP to follow a path which has local protection provided along the full path, ensuring that
                    if there is a failure anywhere along the path that traffic will be fast re-routed at the point. </t>
                <t> For example, UNPROTECTED MANDATORY is when 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 with
                    path protection via a secondary diverse LSP. Each LSP is
                    traffic engineered to follow specific traffic engineered criteria
                    computed by the PCE to satisfy SLA. Upon a failure, if local protection
                    is invoked on the active LSP traffic, the traffic may temporarily
                    traverse links which 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 be not feasible for the PCE to reroute the LSP while
                    respecting the TE requirements which include path diversity,
                    resulting in the LSP being torn down and switched to the
                    protected path anyways. In such scenarios its desirable for
                    the LSP to be simply torn down immediately and not re-routed
                    through local protection, so that traffic
                    may be forwarded through an already established
                    traffic-engineered secondary path. </t>
                <t>
                    Both 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
                    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, PCE chooses the unprotected SID. Alternatively, if the PROTECTED PREFERRED option is selected, PCE chooses the protected SID
                </t>
            </section>
        </section>
        <section title="Protection Enforcement Flag (E flag)" anchor="protection-enforcement-flag--e-flag-" toc="default">
            <t>Section 7.11 in Path Computation Element Protocol <xref target="RFC5440" /> describes the encoding of the Local Protection Desired (L flag).
                A Protection Enforcement flag "E" is specified below, extending the L flag.</t>
            <t>[RFC Editor Note: The text below assumes the E bit remains the early allocation value 6. Please adjust if this changes and remove this note before publication.]</t>
            <figure>
                <artwork><![CDATA[Codespace of the Flag field (LSPA Object)

     Bit      Description                      Reference

      7    Local Protection Desired             RFC5440

      6    Local Protection Enforcement        This document]]></artwork>
            </figure>
            <t>The format of the LSPA Object as defined in <xref target="RFC5440" /> is:</t>
            <figure>
                <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Exclude-any                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Include-any                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Include-all                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Setup Prio   |  Holding Prio |     Flags |E|L|   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   //                     Optional TLVs                           //
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
            </figure>
            <t>   Flags (8 bits)</t>
            <t>
                <list style="symbols">
                    <t>
                        L Flag: As defined in
                        <xref target="RFC5440" />
                        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.
                    </t>
                    <t>E Flag (Protection Enforcement): This flag controls the strictness in which the PCE must apply the L flag.
                        When set to 1, the value of the L flag MUST be respected during resource selection by the PCE.
                        When E flag is set to 0, the value of the L flag SHOULD be respected as selection criteria; however, the PCE is permitted to relax or ignore the L flag when computing a path. The statements below indicate preference when E flag is set to 0 in combination with the L flag value.</t>
                </list>
            </t>
            <t>When both the L flag and E flag are set to 1, then the PCE MUST 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 MUST consider the protection eligibility as a PROTECTION PREFERRED constraint.</t>
            <t>  When both L flag and E flag are set to 0, then the PCE SHOULD
                consider the protection eligibility as an UNPROTECTED PREFERRED
                constraint but MAY consider 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’s interacting with a legacy PCC that expects
                the legacy behavior.</t>
            <t>When L flag is set to 0 and E flag is set to 1, then the PCE MUST 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 MAY use local policy to define protected status assumptions.

                When computing a Segment Routed path, It is RECOMMENDED that a PCE assume a Node SID is protected. It is also RECOMMENDED that a PCE assume an Adjacency SID is protected if the backup flag advertised with the Adjacency SID is set.
            </t>

            <section title="Backwards Compatibility" anchor="compatibility" toc="default">

                <t>Considerations in the message passing between the PCC and the PCE for the E flag bit which are not supported by the entity are outlined in this section, with requirements for the PCE and the PCC implementing this document described at the end.</t>

                <t>For a PCC or PCE which does not yet support this document, the E flag is ignored and set to zero in PCRpt and/or PCUpd as per <xref target="RFC5440" /> for PCC-initiated or as per <xref target="RFC8281" /> for PCE-initiated LSPs. It is important to note that <xref target="RFC8231" /> and <xref target="RFC8281" /> permit the LSP Attribute Object to be included in PCUpd messages for PCC-initiated and PCE-initiated LSPs.
                </t>
                <t>
                    For PCC-initiated LSPs, PCUpd E flag (and L flag) is an echo from the previous PCRpt however the bit value is ignored on the PCE from the previous PCRpt, therefore the E flag value set in the PCUpd is zero.
                    A PCE which does not support this document sends PCUpd messages with the E flag set to 0 for PCC-initated LSPs even if set to 1 in the prior PCReq or PCRpt.
                </t>
                <t>
                    A PCC which 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.
                </t>

                <t>For a PCC which does support this document, it MAY set the E flag to 1 depending on local configuration.
                    If communicating with a PCE which does not yet support this document, the PCE follows the behaviour specified in <xref target="RFC5440" /> and will ignore the E flag.
                    Thus, a computed path might not respect the enforcement constraint.</t>

                <t>For PCC-initiated LSPs, the PCC SHOULD ignore the E flag value received from the PCE in a PCUpd message as it may be communicating with a PCE which does not support this document.</t>
                <t>For PCE-initiated LSPs, the PCC MAY process the E flag value received from the PCE in a PCUpd message. The PCE SHOULD ignore the E flag value received from the PCC in a PCRpt message as it may be communicating with a PCC
                which does not support this document. </t>

            </section>

        </section>

        <section anchor="Imp" title="Implementation Status" toc="default">
            <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
                catalogue 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 title="Nokia Implementation" toc="default">
                <t>
                    <list style="symbols">
                        <t>Organization: Nokia</t>
                        <t>Implementation: NSP PCE and SROS PCC.</t>
                        <t>Description: Implementation for calculation and conveying intention described in this document</t>
                        <t>Maturity Level: Demo</t>
                        <t>Coverage: Full</t>
                        <t>Contact: andrew.stone@nokia.com </t>
                    </list>
                </t>
            </section>

            <section title="Cisco Implementation" toc="default">
                <t>
                    <list style="symbols">
                        <t>Organization: Cisco Systems, Inc.</t>
                        <t>Implementation: IOS-XR PCE and PCC.</t>
                        <t>Description: Implementation for calculation and conveying intention described in this document</t>
                        <t>Maturity Level: Demo</t>
                        <t>Coverage: Full</t>
                        <t>Contact: ssidor@cisco.com </t>
                    </list>
                </t>
            </section>
        </section>

        <section title="Security Considerations" anchor="security-considerations" toc="default">
            <t>This document clarifies the behaviour of an existing flag and introduces a new flag to provide further control of that existing behaviour. The introduction of this new flag and behaviour clarification does 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" />, as per the recommendations and best current practices in <xref target="RFC7525" /> is RECOMMENDED.</t>
        </section>
        <section title="IANA Considerations" anchor="iana-considerations" toc="default">
                <t>[RFC Editor Note: The text below assumes the E bit remains the early allocation value 6. Please adjust if this changes and remove this note before publication.]</t>
                <t>This document defines a new bit value in the sub-registry "LSPA Object Flag Field" in the "Path Computation Element Protocol (PCEP) Numbers" registry. IANA has made the following codepoint allocation.</t>
                <figure>
                    <artwork>
                        <![CDATA[
            Bit    Name                         Reference

             6     Protection Enforcement       This document]]>
                    </artwork>
                </figure>
        </section>
    </middle>
    <back>
        <references title="Normative References">
            <?rfc include="reference.RFC.2119.xml" ?>
            <?rfc include="reference.RFC.8174.xml" ?>
            <?rfc include="reference.RFC.5440.xml" ?>
            <?rfc include="reference.RFC.3209.xml" ?>
            <?rfc include="reference.RFC.4090.xml" ?>
            <?rfc include="reference.RFC.8253.xml" ?>
            <?rfc include="reference.RFC.8231.xml" ?>
            <?rfc include="reference.RFC.8281.xml" ?>
            <?rfc include="reference.RFC.7525.xml" ?>
        </references>

        <references title="Informative References">
            <?rfc include="reference.RFC.4655.xml" ?>
            <?rfc include="reference.RFC.7942.xml" ?>
            <?rfc include="reference.RFC.8664.xml" ?>
            <?rfc include="reference.RFC.9085.xml" ?>
        </references>

        <section title="Acknowledgements" anchor="Acknowledgements" numbered="false" toc="default">
            <t>Thanks to Dhruv Dhody, Mike Koldychev, and John Scudder for reviewing and providing very valuable feedback and discussions on this document.</t>
            <t>Thanks to Julien Meuric for shepherding this document. </t>
        </section>

    </back>
</rfc>