<?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-02" category="std" updates="5440">
    <front>
        <title abbrev="I-D">Local Protection Enforcement in PCEP</title>
        <author fullname="Andrew Stone" initials="A." surname="Stone">
            <organization>Nokia</organization>
            <address>
                <email>andrew.stone@nokia.com</email>
            </address>
        </author>
        <author fullname="Mustapha Aissaoui" initials="M." surname="Aissaoui">
            <organization>Nokia</organization>
            <address>
                <email>mustapha.aissaoui@nokia.com</email>
            </address>
        </author>
        <author fullname="Samuel Sidor" initials="S." surname="Sidor">
            <organization>Cisco Systems, Inc.</organization>
            <address>
                <email>ssidor@cisco.com</email>
            </address>
        </author>
        <author fullname="Siva Sivabalan" initials="S." surname="Sivabalan">
            <organization>Ciena Coroporation</organization>
            <address>
                <email>ssivabal@ciena.com</email>
            </address>
        </author>
        <date year="2021" month="February" day="3"/>

        <abstract>
            <t>This document updates <xref target="RFC5440" /> to clarify usage of the local protection desired bit signalled in 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>Path Computation Element (PCE) Communication Protocol (PCEP) <xref target="RFC5440" /> enables the communication between a Path Computation Client (PCC) and a Path Control Element (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 RFC5440), which was originally defined in the SESSION-ATTRIBUTE Object in RFC3209. In RSVP, this flag signals to downstream routers that local protection is desired, which indicates to transit 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 it's 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 (draft-ietf-pce-segment-routing) extends support in PCEP for Segment Routed LSPs (SR-LSPs) as defined in the Segment Routing Architecture <xref target="RFC8402" />. As per the Segment Routing Architecture, Adjacency Segment Identifiers(Adj-SID) may be eligible for protection (using IPFRR or MPLS-FRR). The protection eligibility is advertised into IGP (draft-ietf-ospf-segment-routing-extensions and draft-ietf-isis-segment-routing-extensions) as the B-Flag part of the Adjacency SID sub-tlv and can be discovered by a PCE via BGP-LS <xref target="RFC7752" /> using the BGP-LS Segment Routing Extensions (draft-ietf-idr-bgp-ls-segment-routing-ext). An Adjacency SID may or may not have protection eligibility and for a given adjacency between two routers there may be multiple Adjacency SIDs, some of which are protected and some which are not. </t>
            <t>A Segment Routed path calculated by PCE may contain various types of segments, as defined in <xref target="RFC8402" /> such as Adjacency, Node or Binding. The protection eligibility for Adjacency SIDs can be discovered by PCE, so therefore the PCE can take the protection eligibility into consideration as a path constraint. If a path is calculated to include other segment identifiers which are not applicable to having their protection state advertised, as they may only be locally significant for each router processing the SID such as Node SIDs, it may not be possible for PCE to include the protection constraint as part of the path calculation. </t>
            <t>It is desirable for an operator to define the enforcement, or strictness of the protection requirement when it can be applied. </t>
            <t>This document updates <xref target="RFC5440" /> by further describing the behaviour with Local Protection Desired Flag (L-Flag) and extends on it with the introduction of Enforcement Flag (E-Flag).</t>
        </section>
        <section title="Requirements Language" anchor="requirements-language">
            <t>In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in BCP 14, <xref target="RFC2119" />.</t>
        </section>
        <section title="Terminology" anchor="terminology">
            <t>This document uses the following terminology:</t>
            <t>   PROTECTION MANDATORY: path MUST have protection eligibility on all links.</t>
            <t>   UNPROTECTED MANDATORY: path MUST NOT have protection eligibility on all links.</t>
            <t>   PROTECTION PREFERRED: path SHOULD have protection eligibility on all links but MAY contain links which do not have protection eligibility.</t>
            <t>   UNPROTECTED PREFERRED: path SHOULD NOT have protection eligibility on all links but MAY 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>
        </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 with 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 is rooted in the RSVP use case. For RSVP, this 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 flag is unable to distinguish between the different options of PROTECTION MANDATORY, UNPROTECTED MANDATORY, PROTECTION PREFERRED and UNPROTECTED PREFERRED. The selection of the options are typically dependent on the service level agreement the operator wishes to impose on the LSP. 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 anywhere along the path that traffic will be fast re-routed at the point of failure. </t>
                <t> For another example, UNPROTECTED MANDATORY is when an operator may intentionally prefer an LSP to not be locally protected, and thus would rather local failures to cause the LSP to go down and/or rely on other protection mechanisms such as a secondary diverse path. </t>
                <t> There are also use cases where there is simply no requirement to enforce protection or no protection along a path. This can be considered as "do not care to enforce". This is a relaxation of the protection constraint. The path calculation is permitted the use of any SID which is available along the calculated path. The SID backup availability does not impact the shortest path computation. Since links may have both protected and unprotected SIDs available, the option PROTECTION PREFERRED or UNPROTECTED PREFERRED is used to instruction PCE a preference on which SID to select, as the behaviour of the LSP would differ during a local failure depending on which SID is selected.</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 new flag is proposed in this document in the LSP Attributes Object which extends the L-Flag to identify the protection enforcement.</t>
            <t>Bit 6 has been early allocated by IANA as the Protection Enforcement flag.</t>
            <figure>
                <artwork><![CDATA[Codespace of the Flag field (LSPA Object)

     Bit      Description                      Reference

      7    Local Protection Desired             RFC5440

      6    Local Protection Enforcement        This I-D]]></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, protection is desired. When not set, protection is not desired. The enforcement of the protection is identified via the E-Flag.
                    </t>
                    <t>E flag (Protection Enforcement): When set, the value of the L-Flag MUST be treated as a MUST constraint where applicable, when protection state of a SID is known. When E flag is not set, the value of the L-Flag MUST be treated as a MAY constraint.</t>
                </list>
            </t>
            <t>When L-flag is set and E-flag is set then PCE MUST consider the protection eligibility as PROTECTION MANDATORY constraint.</t>
            <t>When L-flag is set and E-flag is not set then PCE MUST consider the protection eligibility as PROTECTION PREFERRED constraint.</t>
            <t>When L-flag is not set and E-flag is not set then PCE SHOULD consider the protection eligibility as UNPROTECTED PREFERRED but MAY consider protection eligibility as UNPROTECTED MANDATORY constraint.</t>
            <t>When L-flag is not set and E-flag is set then PCE MUST consider the protection eligibility as UNPROTECTED MANDATORY constraint.</t>
            <t>UNPROTECTED PREFERRED and PROTECTED PREFERRED may seem similar but they indicate the preference of selection of a SID if PCE has an option of either protected or unprotected available on a link. When presented with either option, PCE SHOULD select the SID which has a protection state matching the state of the L-Flag.</t>
            <t>The protection enforcement constraint can only be applied to resource selection in which the protection state is known to PCE. A PCE calculating a path that includes resources which does not support the protection state being known to PCE (such as Node SID), then the protection state MAY ignore the protection enforcement constraint.</t>

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

                <t>Considerations in the message passing between PCC and PCE for the E-Flag bit which are not supported by the entity are outlined in this section, with requirements for PCE and 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 bit 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's important to note that <xref target="RFC8231" /> and <xref target="RFC8281" /> permit LSP Attribute Object to be included in PCUpd messages for PCC-initiated and PCE-initiated LSPs.
                    For PCC-initiated LSPs, PCUpd E-Flag (and L-Flag) are an echo from the previous PCRpt however the bit value is ignored on 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 unset for PCC-initated LSPs even if set in the prior PCReq or PCRpt.
                    A PCC which does not support this document sends PCRpt messages with the E-Flag unset for PCE-initiated LSPs even if set in the prior PCInitiate or PCUpd.
                </t>

                <t>For a PCC which does support this document, it MAY set E-Flag bit 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 bit
                    thus it will not compute a path respecting the enforcement constraint.</t>

                <t>For PCC-initiated LSPs, PCC SHOULD ignore the E-Flag value received from PCE in a PCUpd message.</t>
                <t>For PCE-initiated LSPs, PCC MAY process the E-Flag value received from PCE in a PCUpd message. PCE SHOULD ignore the E-Flag value received from PCC in a PCRpt message.</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">
            <section title="LSPA Object" anchor="lsp-attributes-protection-enforcement-flag">
                <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 is requested to confirm the early-allocated codepoint.</t>
                <figure>
                    <artwork>
                        <![CDATA[
            Bit    Name                         Reference

             6     Protection Enforcement       This I-D]]>
                    </artwork>
                </figure>
            </section>
        </section>
    </middle>
    <back>
        <references title="Normative References">
            <?rfc include="reference.RFC.2119.xml" ?>
            <?rfc include="reference.RFC.4655.xml" ?>
            <?rfc include="reference.RFC.8402.xml" ?>
            <?rfc include="reference.RFC.5440.xml" ?>
            <?rfc include="reference.RFC.3209.xml" ?>
            <?rfc include="reference.RFC.4090.xml" ?>
            <?rfc include="reference.RFC.7752.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.7942.xml" ?>
        </references>

        <section title="Acknowledgements" anchor="Acknowledgements" numbered="false" toc="default">
            <t>Thanks to Dhruv Dhody for comments and discussions on this document and Mike Koldychev for reviews.</t>
        </section>

    </back>
</rfc>