<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc strict="no" ?>
<?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"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4364 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4364.xml">
<!ENTITY RFC4655 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4655.xml">
<!ENTITY RFC4657 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4657.xml">
<!ENTITY RFC4760 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4760.xml">
<!ENTITY RFC5088 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5088.xml">
<!ENTITY RFC5089 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5089.xml">
<!ENTITY RFC5440 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5440.xml">
<!ENTITY RFC5511 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5511.xml">
<!ENTITY RFC5886 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5886.xml">
<!ENTITY RFC6123 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6123.xml">
<!ENTITY RFC6952 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6952.xml">
<!ENTITY RFC7399 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7399.xml">
<!ENTITY RFC7942 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7942.xml">
<!ENTITY RFC8126 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8126.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8231 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8231.xml">
<!ENTITY RFC8232 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8232.xml">
<!ENTITY RFC8253 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8253.xml">
<!ENTITY RFC8281 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8281.xml">
<!ENTITY RFC8283 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8283.xml">
<!ENTITY RFC8664 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8664.xml">
<!ENTITY RFC8955 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8955.xml">
<!ENTITY RFC9168 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9168.xml">

]>

<rfc category="std" docName="draft-ietf-pce-pcep-l2-flowspec-10" ipr="trust200902" updates="9168">

<front>
<title abbrev="PCEP-L2-FlowSpec">PCEP Extension for Layer 2 (L2) Flow Specification</title>

<author surname="Dhody" initials="D." fullname="Dhruv Dhody">
  <organization>Huawei</organization>
  <address>
    <postal>
      <street></street>
      <city></city>
      <code></code>
      <country>India</country>
    </postal>
    <email>dhruv.ietf@gmail.com</email>
  </address>
</author>

<author surname="Farrel" initials="A." fullname="Adrian Farrel">
  <organization>Old Dog Consulting</organization>
  <address>
    <email>adrian@olddog.co.uk</email>
  </address>
</author>

<author surname="Li" initials="Z." fullname="Zhenbin Li">
  <organization>Huawei Technologies</organization>
  <address>
    <postal>
      <street>Huawei Bld., No.156 Beiqing Rd.</street>
      <city>Beijing</city>
      <code>100095</code>
      <country>China</country>
    </postal>
    <email>lizhenbin@huawei.com</email>
  </address>
</author>
<date />
    <area>Routing</area>
    <workgroup>PCE Working Group</workgroup>


<abstract>
 <t>The Path Computation Element (PCE) is a functional component capable of selecting
    paths through a traffic engineering (TE) network.  These paths may be supplied
    in response to requests for computation or may be unsolicited requests
    issued by the PCE to network elements.  Both approaches use the PCE Communication
    Protocol (PCEP) to convey the details of the computed path.</t>

 <t>Traffic flows may be categorized and described using "Flow Specifications".  RFC
    8955 defines the Flow Specification and describes how Flow Specification
    components are used to describe traffic flows.  RFC 8955 also defines how Flow
    Specifications may be distributed in BGP to allow specific traffic flows to be
    associated with routes.</t>

 <t>RFC 9168 specifies a set of extensions to PCEP to support the dissemination of
    Flow Specifications.  This allows a PCE to indicate what traffic should be placed
    on each path that it is aware of. This document updates RFC 9168 by updating the assignment policies for a range of Flow Specification TLV Type Indicators.</t>

 <t>The extensions defined in this document extend the support for Ethernet Layer 2
   (L2) and Layer 2 Virtual Private Network (L2VPN) traffic filtering
   rules either by themselves or in conjunction with Layer 3 (L3) flowspecs.</t>

</abstract>

</front>

<middle>

<section anchor="Intro" title="Introduction">

 <t><xref target="RFC4655"/> defines the Path Computation Element (PCE), as a functional component
    capable of computing paths for use in traffic engineering networks.  PCE was originally
    conceived for use in Multiprotocol Label Switching (MPLS) for traffic engineering (TE) networks
    to derive the routes of Label Switched Paths (LSPs).  However, the scope of PCE was quickly
    extended to make it applicable to networks controlled by Generalized MPLS (GMPLS), and more recent work
    has brought other traffic engineering technologies and planning applications into scope (for
    example, Segment Routing (SR) <xref target="RFC8664" />).</t>

 <t><xref target="RFC5440"/> describes the PCE Communication Protocol (PCEP).
    PCEP defines the communication between a Path Computation Client (PCC) and a PCE, or between
    PCE and PCE, enabling computation of the path for MPLS-TE LSPs.</t>

 <t>Stateful PCE <xref target="RFC8231"/> specifies a set of extensions to PCEP to enable control of
    TE-LSPs by a PCE that retains the state of the LSPs provisioned in the network (a stateful PCE).
    <xref target="RFC8281"/> describes the setup, maintenance, and teardown of LSPs initiated by a
    stateful PCE without the need for local configuration on the PCC, thus allowing for a dynamic
    network that is centrally controlled.  <xref target="RFC8283"/> introduces the architecture for PCE
    as a central controller and describes how PCE can be viewed as a component that performs computation
    to place "flows" within the network and decide how these flows are routed.</t>

 <t>The description of traffic flows by the combination of multiple Flow Specification components and
    their dissemination as traffic flow specifications (Flow Specifications) is described for BGP in
    <xref target="RFC8955" />.  In BGP, a Flow Specification is comprised of traffic
    filtering rules and is associated with actions to perform on the packets that match the Flow
    Specification.  The BGP routers that receive a Flow Specification can classify received packets
    according to the traffic filtering rules and can direct packets based on the associated actions. <xref target="I-D.ietf-idr-flowspec-v2"/> specifies version 2 of the BGP flow specification protocol that resolves some of the issues with version 1.</t>

 <t>When a PCE is used to initiate tunnels (such as TE-LSPs or SR paths) using PCEP, it is important
    that the head end of the tunnels understands what traffic to place on each tunnel.  The data flows
    intended for a tunnel can be described using Flow Specification components.  When PCEP is in
    use for tunnel initiation it makes sense for that same protocol to be used to distribute the Flow
    Specification components that describe what data is to flow on those tunnels.</t>

 <t><xref target="RFC9168"/> specifies a set of extensions to PCEP to support the dissemination of Flow Specification
    components.  It includes the creation, update, and withdrawal of Flow
    Specifications via PCEP. It can be applied to tunnels initiated by the PCE or to tunnels where
    control is delegated to the PCE by the PCC.  Furthermore, a PCC requesting a new path can include
    Flow Specifications in the request to indicate the purpose of the tunnel allowing the PCE to factor
    this into the path computation.</t>

    <t><xref target="I-D.ietf-idr-flowspec-l2vpn"/> defines a BGP flowspec extension to disseminate Ethernet Layer 2
   (L2) and Layer 2 Virtual Private Network (L2VPN) traffic filtering
   rules either by themselves or in conjunction with L3 flowspecs as per <xref target="I-D.ietf-idr-flowspec-v2"/>. This document extends the same support for PCEP by defining a new L2 Flow Filter TLV to be carried within the FLOWSPEC object. The context and the procedures for the use of Flow Specifications are as per <xref target="RFC9168"/>.</t>

</section>

<section title="Terminology">

 <t>This document uses the following terms defined in <xref target="RFC5440"/>: PCC, PCE, PCEP Peer.</t>

 <t>The following term from <xref target="RFC8955"/> is used frequently throughout this
    document:
    <list style="empty">

       <t>A Flow Specification is an n-tuple consisting of several matching criteria that can be
          applied to IP traffic.  A given IP packet is said to match the defined Flow Specification
          if it matches all the specified criteria.</t>

    </list></t>

 <t>Its usage in PCEP is further clarified in <xref target="RFC9168"/>.</t>

 <t>This document uses the terms "stateful PCE" and "active PCE" as advocated in <xref target="RFC7399" />.</t>

 <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
    "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted
    as described in BCP 14 <xref target="RFC2119" /> <xref target="RFC8174" /> when, and only when,
    they appear in all capitals, as shown here.</t>

</section>

<section title="L2 Flow Specifications">

	<t>As per <xref target="RFC9168"/>, to carry Flow Specifications in PCEP messages, a PCEP object called the
        PCEP FLOWSPEC object is defined. To describe a traffic flow, a PCEP TLV called the Flow Filter TLV is also defined. This document extends the support for L2 flow specifications by creating a new PCEP TLV called L2 Flow Filter TLV and updating the processing rules.</t>

       <t>The PCEP FLOWSPEC object carries a FlowSpec filter rule encoded in a TLV. To describe a traffic flow based on both L3 and L2 fields, a new L2 Flow Filter TLV is introduced by this document. The PCEP FLOWSPEC object could carry one of the following combinations of
        TLVs:
        <list style="symbols">
          <t>no TLV</t>
          <t>one Flow Filter TLV</t>
          <t>one L2 Flow Filter TLV</t>
          <t>both a Flow Filter TLV and an L2 Flow Filter TLV</t>
        </list></t>

    <t>At most one L2 Flow Filter TLV MAY be included in the PCEP FLOWSPEC object. The TLV is OPTIONAL when the R (remove) bit is set in the object. At least one Flow Filter TLV or one L2 Flow Filter TLV MUST be present when the R bit is clear.   If
    both TLVs are missing when the R bit is clear, the PCEP peer MUST respond with a PCErr message with
    error-type TBD1 (FlowSpec Error) and error-value 2 (Malformed FlowSpec).  A Flow Filter TLV and an L2
    Flow Filter TLV MAY be present when filtering is based on L3 and L2 fields.</t>

    <t>The TLV follows the format of all PCEP TLVs as defined
    in <xref target="RFC5440" />.  The Type field values come from the codepoint space for
    PCEP TLVs and has the value TBD2. The value field of L2 Flow Filter TLV contains one or more sub-TLVs (<xref target="L2-subtlv"/>, and they represent the complete
    definition of a Flow Specification for traffic to be placed on the tunnel. The set of Flow
    Specification TLVs and L2 Flow Filter TLVs in a single instance of a Flow Filter TLV are
    combined to indicate the specific Flow Specification.  Note that the PCEP FLOWSPEC object can
    include just one Flow Filter TLV, just one L2 Flow Filter TLV, or one of each TLV.</t>

	<t>The rest of the procedures are same as <xref target="RFC9168"/>.</t>


	<section title="L2 Flow Specification TLVs" anchor="L2-subtlv">

   <t>The L2 Flow Filter TLV carries one or more L2 Flow Specification TLV.  The L2 Flow Specification TLV
       follows the format of all PCEP TLVs as defined in <xref target="RFC5440" />.  However, the Type values
       are selected from a separate IANA registry (see <xref target="iana-2" />) rather than from the common
       PCEP TLV registry.</t>

    <t>Type values are chosen so that there can be commonality with L2 Flow Specifications defined for use
       with BGP <xref target="I-D.ietf-idr-flowspec-l2vpn"/>.  This is possible because the BGP Flow Spec
       encoding uses a single octet to encode the type whereas PCEP uses two octets.  Thus the space of
       values for the Type field is partitioned as shown in <xref target="L2-fspectlvs" />.</t>

    <figure title="L2 Flow Specification TLV Type Ranges" anchor="L2-fspectlvs">
      <artwork>
        <![CDATA[
   Range          |
   ---------------+-------------------------------------------------
   0 .. 255       | Per BGP registry defined by
                  | [I-D.ietf-idr-flowspec-l2vpn].
                  | Not to be allocated in this registry.
                  |
   256 ..   65535 | New PCEP Flow Specifications allocated according
                  | to the registry defined in this document.
        ]]>
      </artwork>
    </figure>

   <t><xref target="I-D.ietf-idr-flowspec-l2vpn"/> is the reference for the registry "L2 Flow Spec Component Types"
       and defines the allocations it contains.</t>

   <t>The content of the Value field in each TLV is specific to the type and describes the parameters
      of the Flow Specification.  The definition of the format of many of these Value fields is inherited
      from BGP specifications.  Specifically, the inheritance is from <xref target="I-D.ietf-idr-flowspec-l2vpn"/>, but may also be inherited from future BGP specifications.</t>

   <t>When multiple L2 Flow Specification TLVs are present in a single L2 Flow Filter TLV they are combined to
      produce a more detailed specification of a flow. Similarly, when both Flow Filter TLV and L2 Flow Filter TLV are present, they are combined to
      produce a more detailed specification of a flow.</t>

   <t>An implementation that receives a PCEP message carrying a L2 Flow Specification TLV with a type value
      that it does not recognize or does not support MUST respond with a PCErr message with error-type TBD1
      (FlowSpec Error), error-value 1 (Unsupported FlowSpec) and MUST NOT install the Flow Specification.</t>

   <t>All L2 Flow Specification TLVs with Types in the range 0 to 255 have their Values interpreted
      as defined for use in BGP (for example, in <xref target="I-D.ietf-idr-flowspec-l2vpn"/>) and are set using the BGP encoding,
      but without the type octet (the relevant information is in the
      Type field of the TLV).  The Value field is padded with trailing
      zeros to achieve 4-byte alignment.</t>

   <t>This document defines no new types.</t>

 </section>


</section>

<section title="BGP Flow Specification Version 2">
<t>As per <xref target="I-D.ietf-idr-flowspec-v2"/>, Flow Specification v2 allows the user to order the flow specification rules and the actions associated with a rule. Each FSv2 rule may have one or more match conditions and one or more associated actions. It further lists the rules and principles to keep filters in a deterministic order between FSv1 and FSv2.</t>
<t>Note that this document relies on the processing rules as per <xref target="RFC9168"/>. A future PCEP specification could consider updating rules to align to <xref target="I-D.ietf-idr-flowspec-v2"/> (FSv2 adds explicit "order" for instance).</t>
</section>

<section title="Update to RFC 9168">
<t><xref target="RFC9168"/> created the "PCEP Flow Specification
   TLV Type Indicators" registry and set the assignment policies for the range "256-64506" to "Specification Required". This memo changes the policy from Specification Required to IETF Review in alignment with the rest of the registries in the "Path Computation Element Protocol (PCEP) Numbers" registry group. </t>
   <t>Note that <xref target="RFC9168"/> did not follow the guidelines for "Specification Required" as per <xref target="RFC8126"/>.</t>
</section>

<section title="IANA Considerations">

 <t>IANA maintains the "Path Computation Element Protocol (PCEP) Numbers" registry.
    This document requests IANA actions to allocate code points for the protocol elements
    defined in this document.</t>

 <section title="PCEP TLV Type Indicators">

   <t>IANA maintains a registry called "PCEP TLV Type Indicators" under the "Path Computation Element Protocol (PCEP) Numbers" registry group.  IANA is requested to
      make an assignment from this registry as follows:</t>

   <figure>
     <artwork>
       <![CDATA[
Value   | Meaning                      | Reference
--------+------------------------------+-------------
 TBD2   | L2 FLOW FILTER TLV           | [This.I-D]
       ]]>
     </artwork>
   </figure>
 </section>



 <section title="L2 Flow Specification TLV Type Indicators" anchor="iana-2">

   <t>IANA is requested to create a new registry called the "PCEP L2 Flow Specification TLV Type Indicators" registry.</t>

   <t>Allocations from this registry are to be made according to the following assignment policies <xref target="RFC8126" />:</t>

   <figure>
     <artwork>
       <![CDATA[
 Range          | Assignment policy
 ---------------+---------------------------------------------------
 0 .. 255       | Reserved - must not be allocated.
                | Usage mirrors the BGP L2 FlowSpec registry
                | [I-D.ietf-idr-flowspec-l2vpn].
                |
 256 ..   64506 | IETF Review
                |
 64507 .. 65531 | First Come First Served
                |
 65532 .. 65535 | Experimental
       ]]>
     </artwork>
   </figure>
   <t>This document makes no allocations in the newly created registry.</t>

 </section>

 <section title="Flow Specification TLV Type Indicators" anchor="iana-3">

   <t><xref target="RFC9168"/> created the "PCEP Flow Specification
   TLV Type Indicators" registry. IANA is requested to update the assignment policies for the range "256-64506" from "Specification Required" to "IETF Review" <xref target="RFC8126" />.</t>

 </section>

</section>

<section title="Implementation Status" anchor="imps">

  <t>[NOTE TO RFC EDITOR : This whole section and the reference to RFC 7942
      is to be removed before publication as an RFC]</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>

  <t>At the time of posting the -05 version of this document, there are no known
     implementations of this mechanism.  It is believed that some vendors are
     considering prototype implementations, but these plans are too vague to
     make any further assertions.</t>

</section>

<section title="Security Considerations" anchor="Security">

 <t>We may assume that a system that utilizes a remote PCE is subject to a number of
    vulnerabilities that could allow spurious LSPs or SR paths to be established or that
    could result in existing paths being modified or torn down.  Such systems, therefore,
    apply security considerations as described in <xref target="RFC5440" />,
    Section 2.5 of <xref target="RFC6952" />, <xref target="RFC8253" />, and
    <xref target="RFC8955" />.</t>

 <t>As per <xref target="RFC9168"/>, the description of Flow Specifications associated with paths set up or controlled by a
    PCE add a further detail that could be attacked without tearing down LSPs or SR paths,
    but causing traffic to be misrouted within the network.  Therefore, the use of the security
    mechanisms for PCEP referenced above is important. It further lists the security considerations with respect to flow specifications which are applicable to L2 flowspec as well.</t>

</section>


    <section title="Manageability Considerations" toc="default">
      <section title="Control of Function and Policy" toc="default">
        <t><xref target="RFC9168"/> describe the management of multiple
        flowspecs as well as control via configurations and policies.
        This is applicable to the L2 flowspec defined in this document.</t>

      </section>

      <section title="Information and Data Models" toc="default">
        <t>As per <xref target="RFC9168"/>, the PCEP YANG module
        <xref target="I-D.ietf-pce-pcep-yang"/> would need to be augmented
        to cover flowspec include L2.</t>
      </section>

      <section title="Liveness Detection and Monitoring" toc="default">
        <t>Mechanisms defined in this document do not imply any new liveness
        detection and monitoring requirements in addition to those already
        listed in <xref target="RFC5440"/>.</t>
      </section>

      <section title="Verify Correct Operations" toc="default">
        <t>Mechanisms defined in this document do not imply any new operation
        verification requirements in addition to those already listed in <xref
        target="RFC9168"/>.</t>
      </section>

      <section title="Requirements On Other Protocols" toc="default">
        <t>Mechanisms defined in this document do not imply any new
        requirements on other protocols.</t>
      </section>

      <section title="Impact On Network Operations" toc="default">
        <t>The use of the features described in this document clearly has an
   important impact on network traffic since they cause traffic to be
   routed on specific paths in the network.  However, in practice, these
   changes make no direct changes to the network operation because
   traffic is already placed on those paths using some pre-existing
   configuration mechanism.  Thus, the significant change is the
   reduction in the mechanisms that have to be applied, rather than a change
   to how the traffic is passed through the network.</t>
      </section>
    </section>
<section title="Acknowledgements">
  <t>Thanks to Susan Hares for the discussion related to BGP Flowspec V2.</t>
</section>

</middle>

<back>

<references title="Normative References">
  &RFC2119;
  &RFC5440;
  &RFC8174;
  &RFC8231;
  &RFC8253;
  &RFC8281;
  &RFC8955;
  &RFC9168;
 <?rfc include='reference.I-D.ietf-idr-flowspec-l2vpn'?>
</references>

<references title="Informative References">
  &RFC4655;
  &RFC6952;
  &RFC7399;
  &RFC7942;
  &RFC8126;
  &RFC8283;
  &RFC8664;
  <?rfc include='reference.I-D.ietf-idr-flowspec-v2'?>
  <?rfc include='reference.I-D.ietf-pce-pcep-yang'?>
</references>

<section title="Contributors" toc="default">
  <figure title="" align="left" height="" width="" alt="" suppress-title="false">
    <artwork>
      <![CDATA[
Shankara
India

Email: shankara.odl@gmail.com

Qiandeng Liang
Huawei Technologies
101 Software Avenue,
Yuhuatai District
Nanjing
210012
China

Email: liangqiandeng@huawei.com

Cyril Margaria
Juniper Networks
200 Somerset Corporate Boulevard, Suite 4001
Bridgewater, NJ
08807
USA

Email: cmargaria@juniper.net

Colby Barth
Juniper Networks
200 Somerset Corporate Boulevard, Suite 4001
Bridgewater, NJ
08807
USA

Email: cbarth@juniper.net

Xia Chen
Huawei Technologies
Huawei Bld., No.156 Beiqing Rd.
Beijing
100095
China

Email: jescia.chenxia@huawei.com

Shunwan Zhuang
Huawei Technologies
Huawei Bld., No.156 Beiqing Rd.
Beijing
100095
China

Email: zhuangshunwan@huawei.com

Cheng Li
Huawei Technologies

Email: c.l@huawei.com

     ]]>
   </artwork>
 </figure>
</section>

</back>

</rfc>
