<?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" docName="draft-ietf-pce-pcep-flowspec-12" number="9168" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" category="std" consensus="true" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">

  <front>
    <title abbrev="PCEP Flow Spec">Path Computation Element Communication Protocol (PCEP) Extension for Flow Specification</title>
    <seriesInfo name="RFC" value="9168"/>
    <author surname="Dhody" initials="D." fullname="Dhruv Dhody">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street>Divyashree Techno Park, Whitefield</street>
	  <city>Bangalore</city>
	  <region>Karnataka</region>
          <code>560066</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 Bldg., No. 156 Beiqing Rd.</street>
          <city>Beijing</city>
          <code>100095</code>
          <country>China</country>
        </postal>
        <email>lizhenbin@huawei.com</email>
      </address>
    </author>
    <date year="2022" month="January" />
    <area>Routing</area>
    <workgroup>PCE</workgroup>

    <keyword>PCE</keyword>
    <keyword>FlowSpec</keyword>
    <keyword>Flow Spec</keyword>
    
    <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>This document specifies a set of extensions to PCEP to support dissemination of
    Flow Specifications.  This allows a PCE to indicate what traffic should be placed
    on each path that it is aware of.</t>
      <t>The extensions defined in this document include the creation, update, and withdrawal of Flow
    Specifications via PCEP and can be applied to tunnels initiated by the PCE or to tunnels where
    control is delegated to the PCE by the Path Computation Client (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>

    </abstract>
  </front>
  <middle>
    <section anchor="Intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="RFC4655" format="default"/> defines the Path Computation Element (PCE), 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" format="default"/>).</t>
      <t><xref target="RFC5440" format="default"/> 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" format="default"/> specifies a set of extensions to PCEP to enable control of
    TE-LSPs by a PCE that retains state about the LSPs provisioned in the network (a stateful PCE).
    <xref target="RFC8281" format="default"/> 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" format="default"/> 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" format="default"/>.  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.</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>This document specifies a set of extensions to PCEP to support dissemination of Flow Specification
    components.  We term the description of a traffic flow using Flow Specification components as a
    "Flow Specification".  This term is conceptually the same as the term used in
    <xref target="RFC8955" format="default"/>; however, no mechanism is provided to distribute an action
    associated with the Flow Specification because there is only one action that is applicable in the
    PCEP context (that is, directing the matching traffic to the identified LSP).</t>
      <t>The extensions defined in this document include the creation, update, and withdrawal of Flow
    Specifications via PCEP and 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>Flow Specifications are carried in TLVs within a new object called the FLOWSPEC object defined
    in this document.  The flow filtering rules indicated by the Flow Specifications are mainly
    defined by BGP Flow Specifications.</t>
      <t>Note that PCEP-installed Flow Specifications are intended to be installed only at the head end of
    the LSP to which they direct traffic.  It is acceptable (and potentially desirable) that other
    routers in the network have Flow Specifications installed that match the same traffic but direct
    it onto different routes or to different LSPs.  Those other Flow Specifications may be installed
    using the PCEP extensions defined in this document, distributed using BGP per
    <xref target="RFC8955" format="default"/>, or configured using manual operations.  Since
    this document is about PCEP-installed Flow Specifications, those other Flow Specifications at
    other routers are out of scope.  In this context, however, it is worth noting that changes to the
    wider routing system (such as the distribution and installation of BGP Flow Specifications, or
    fluctuations in the IGP link state database) might mean that traffic matching the PCEP Flow Specification
    never reaches the head end of the LSP at which the PCEP Flow Specification has been installed.  This may
    or may not be desirable according to the operator's traffic engineering and routing policies and is
    particularly applicable at LSPs that do not have their head ends at the ingress edge of the network, but
    it is not an effect that this document seeks to address.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Terminology</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 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and only when,
    they appear in all capitals, as shown here.</t>
      <t>This document uses the following terms defined in <xref target="RFC5440" format="default"/>: PCC, PCE, and PCEP Peer.</t>
      <t>The following term from <xref target="RFC8955" format="default"/> is used frequently throughout this
    document:
      </t>
      
        <blockquote>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.</blockquote>
	
      <t><xref target="RFC8955" format="default"/> also states that "[a] given Flow Specification may be
    associated with a set of attributes" and that "...attributes can be used to encode a set of
    predetermined actions."  However, in the context of this document, no action is explicitly
    specified as associated with the Flow Specification since the action of forwarding all matching traffic
    onto the associated path is implicit.</t>
      <t>How an implementation decides to filter traffic that matches a Flow Specification does not form
    part of this specification, but a flag is provided to indicate whether the sender of a PCEP
    message that includes a Flow Specification intends it to be installed as a Longest Prefix Match (LPM) route or as a Flow Specification policy.</t>
      <t>This document uses the terms "stateful PCE" and "active PCE" as advocated in <xref target="RFC7399" format="default"/>.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Procedures for PCE Use of Flow Specifications</name>
      <section numbered="true" toc="default">
        <name>Context for PCE Use of Flow Specifications</name>
        <t>In the PCE architecture, there are five steps in the setup and use of LSPs:
        </t>
        <ol spacing="normal" type="1"><li>Decide which LSPs to set up.  The decision may be made by a user, by a PCC, or by the PCE.
           There can be a number of triggers for this, including user intervention and dynamic response
           to changes in traffic demands.</li>
          <li>Decide what properties to assign to an LSP.  This can include bandwidth reservations, priorities,
           and the Differentiated Services Code Point (DSCP) (i.e., MPLS Traffic Class field).  This function is also determined by user configuration
           or in response to predicted or observed traffic demands.</li>
          <li>Decide what traffic to put on the LSP.  This is effectively determining which traffic flows to
           assign to which LSPs; practically, this is closely linked to the first two decisions listed
           above.</li>
          <li>Cause the LSP to be set up and modified to have the right characteristics.  This will usually
           involve the PCE advising or instructing the PCC at the head end of the LSP, and the PCC will
           then signal the LSP across the network.</li>
          <li>Tell the head end of the LSP what traffic to put on the LSP.  This may happen after or at the
           same time as the LSP is set up.  This step is the subject of this document.</li>
        </ol>
      </section>
      <section numbered="true" toc="default">
        <name>Elements of the Procedure</name>
        <t>There are three elements in the procedure:

        </t>
        <ol spacing="normal">
          <li>A PCE and a PCC must be able to indicate whether or not they support the use of Flow
            Specifications.</li>
            <li>A PCE or PCC must be able to include Flow Specifications in PCEP messages with a clear
            understanding of the applicability of those Flow Specifications in each case.  This includes
            whether the use of such information is mandatory, constrained, or optional and how
            overlapping Flow Specifications will be resolved.</li>
          <li>Flow Specification information/state must be synchronized between PCEP peers so that,
            on recovery, the peers have the same understanding of which Flow Specifications apply
            just as is required in the case of stateful PCE and LSP delegation (see <xref section="5.6" target="RFC8231" sectionFormat="of"/>).</li>
        </ol>
        <t>The following subsections describe these points.</t>
        <section numbered="true" toc="default">
          <name>Capability Advertisement</name>
          <t>As with most PCEP capability advertisements, the ability to support Flow Specifications can be
        indicated in the PCEP Open message or in IGP PCE capability advertisements.</t>
          <section anchor="open" numbered="true" toc="default">
            <name>PCEP Open Message</name>
	    
            <t>During PCEP session establishment, a PCC or PCE that supports the procedures described in
          this document announces this fact by including the PCE FlowSpec Capability TLV (described in
          <xref target="cap" format="default"/>) in the OPEN object carried in the PCEP Open message.</t>
            <t>The presence of the PCE FlowSpec Capability TLV in the OPEN object in a PCE's Open message
          indicates that the PCE can distribute FlowSpecs to PCCs and can receive FlowSpecs in messages
          from PCCs.</t>
            <t>The presence of the PCE FlowSpec Capability TLV in the OPEN object in a PCC's Open message
          indicates that the PCC supports the FlowSpec functionality described in this document.</t>
            <t>If either one of a pair of PCEP peers does not include the PCE FlowSpec Capability TLV in the
          OPEN object in its Open message, then the other peer <bcp14>MUST NOT</bcp14> include a FLOWSPEC object in any
          PCEP message sent to the peer.  If a FLOWSPEC object is received when support has not been indicated,
          the receiver will respond with a PCErr message reporting the objects containing the FlowSpec as described
          in <xref target="RFC5440" format="default"/>: that is, it will use "Unknown Object" if it does not support this
          specification and "Not supported object" if it supports this specification but has not chosen
          to support FLOWSPEC objects on this PCEP session.</t>
          </section>
          <section numbered="true" toc="default">
            <name>IGP PCE Capabilities Advertisement</name>
            <t>The ability to advertise support for PCEP and PCE features in IGP advertisements is provided
          for OSPF in <xref target="RFC5088" format="default"/> and for IS-IS in <xref target="RFC5089" format="default"/>.  The mechanism
          uses the PCE Discovery TLV, which has a PCE-CAP-FLAGS sub-TLV containing bit flags, each of which
          indicates support for a different feature.</t>
            <t>This document defines a new PCE-CAP-FLAGS sub-TLV bit, the FlowSpec Capable flag (bit number 16).
          Setting the bit indicates that an advertising PCE supports the procedures defined in this document.</t>
            <t>Note that while PCE FlowSpec capability may be advertised during discovery, PCEP speakers that wish to
          use Flow Specification in PCEP <bcp14>MUST</bcp14> negotiate PCE FlowSpec capability during PCEP session setup, as
          specified in <xref target="open" format="default"/>.  A PCC <bcp14>MAY</bcp14> initiate PCE FlowSpec capability negotiation at PCEP
          session setup even if it did not receive any IGP PCE capability advertisement, and a PCEP peer that
          advertised support for FlowSpec in the IGP is not obliged to support these procedures on any given
          PCEP session.</t>
          </section>
        </section>
        <section numbered="true" toc="default">
          <name>Dissemination Procedures</name>
          <t>This section describes the procedures to support Flow Specifications in PCEP messages.</t>
          <t>The primary purpose of distributing Flow Specification information is to allow a PCE to indicate to
        a PCC what traffic it should place on a path (such as an LSP or an SR path).  This means that the
        Flow Specification may be included in:
          </t>
          <ul spacing="normal">
            <li>PCInitiate messages so that an active PCE can indicate the traffic to place on a path at the time
              that the PCE instantiates the path.</li>
            <li>PCUpd messages so that an active PCE can indicate or change the traffic to place on a path
              that has already been set up.</li>
            <li>PCRpt messages so that a PCC can report the traffic that the PCC will place on the path.</li>
            <li>PCReq messages so that a PCC can indicate what traffic it plans to place on a path when it
              requests that the PCE perform a computation in case that information aids the PCE in its work.</li>
            <li>PCRep messages so that a PCE that has been asked to compute a path can suggest which traffic
              could be placed on a path that a PCC may be about to set up.</li>
            <li>PCErr messages so that issues related to paths and the traffic they carry can be reported to the
              PCE by the PCC and problems with other PCEP messages that carry Flow Specifications can
              be reported.</li>
          </ul>
          <t>To carry Flow Specifications in PCEP messages, this document defines a new PCEP object called the
        "PCEP FLOWSPEC object".  The object is <bcp14>OPTIONAL</bcp14> in the messages described above and <bcp14>MAY</bcp14> appear more
        than once in each message.</t>
          <t>To describe a traffic flow, the PCEP FLOWSPEC object carries a Flow Filter TLV.</t>
     
          <t>The inclusion of multiple PCEP FLOWSPEC objects allows multiple traffic flows to be placed on a single
        path.</t>
          <t>Once a PCE and PCC have established that they can both support the use of Flow Specifications in PCEP
        messages, such information may be exchanged at any time for new or existing paths.</t>
          <t>The application and prioritization of Flow Specifications are described in <xref target="priorities" format="default"/>.</t>
          <t>As per <xref target="RFC8231" format="default"/>, any attributes of the path received from a PCE are subject to the PCC's
        local policy.  This holds true for the Flow Specifications as well.</t>
       </section>
        <section numbered="true" toc="default">
          <name>Flow Specification Synchronization</name>
          <t>The Flow Specifications are carried along with the LSP state information as per <xref target="RFC8231" format="default"/>,
        making the Flow Specifications part of the LSP database (LSP-DB).  Thus, the synchronization of the Flow
        Specification information is done as part of LSP-DB synchronization.  This may be achieved using normal
        state synchronization procedures as described in <xref target="RFC8231" format="default"/> or enhanced state synchronization
        procedures as defined in <xref target="RFC8232" format="default"/>.</t>
          <t>The approach selected will be implementation and deployment specific and will depend on issues such as
        how the databases are constructed and what level of synchronization support is needed.</t>
        </section>
      </section>
    </section>
    <section anchor="cap" numbered="true" toc="default">
      <name>PCE FlowSpec Capability TLV</name>
      <t>The PCE-FLOWSPEC-CAPABILITY TLV is an optional TLV that can be carried in the OPEN object
    <xref target="RFC5440" format="default"/> to exchange the PCE FlowSpec capabilities of the PCEP speakers.</t>
      <t>The format of the PCE-FLOWSPEC-CAPABILITY TLV follows the format of all PCEP TLVs
    as defined in <xref target="RFC5440" format="default"/> and is shown in <xref target="capfig" format="default"/>.</t>
      <figure anchor="capfig">
        <name>PCE-FLOWSPEC-CAPABILITY TLV Format</name>
        <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Type=51               |          Length=2             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Value=0             |          Padding              |
+---------------------------------------------------------------+  
   ]]></artwork>
      </figure>
      <t>The type of the PCE-FLOWSPEC-CAPABILITY TLV is 51, and it has a fixed length of 2 octets.
    The Value field <bcp14>MUST</bcp14> be set to 0 and <bcp14>MUST</bcp14> be ignored on receipt.  The two bytes of padding
    <bcp14>MUST</bcp14> be set to zero and ignored on receipt.</t>
      <t>The inclusion of this TLV in an OPEN object indicates that the sender can perform FlowSpec handling
    as defined in this document.</t>
    </section>
    <section numbered="true" toc="default">
      <name>PCEP FLOWSPEC Object</name>
      <t>The PCEP FLOWSPEC object defined in this document is compliant with the PCEP object format
      defined in <xref target="RFC5440" format="default"/>.

      It is <bcp14>OPTIONAL</bcp14> in the PCReq, PCRep, PCErr, PCInitiate,
    PCRpt, and PCUpd messages and <bcp14>MAY</bcp14> be present zero, one, or more times.  Each instance of the
    object specifies a separate traffic flow.</t>
      <t>The PCEP FLOWSPEC object <bcp14>MAY</bcp14> carry a FlowSpec filter rule encoded in a Flow Filter TLV as defined in <xref target="tlv" format="default"/>.</t>
      <t>The FLOWSPEC Object-Class is 43 (to be assigned by IANA).</t>
      <t>The FLOWSPEC Object-Type is 1.</t>
      <t>The format of the body of the PCEP FLOWSPEC object is shown in <xref target="FlowSpecFig" format="default"/>.</t>
      <figure anchor="FlowSpecFig">
        <name>PCEP FLOWSPEC Object Body Format</name>
        <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            FS-ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         AFI                   |  Reserved     |   Flags   |L|R|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
//                             TLVs                            //
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    
   ]]></artwork>
      </figure>
     
      <dl>
      <dt>FS-ID (32 bits):</dt>
      <dd> A PCEP-specific identifier for the FlowSpec information.  A PCE
    or PCC creates an FS-ID for each FlowSpec that it originates, and the value is
    unique within the scope of that PCE or PCC and is constant for the lifetime of a
    PCEP session.  All subsequent PCEP messages can identify the FlowSpec using the
    FS-ID.  The values 0 and 0xFFFFFFFF are reserved and <bcp14>MUST NOT</bcp14> be used.  Note
    that <xref target="I-D.gont-numeric-ids-sec-considerations" format="default"/> gives advice on
    assigning transient numeric identifiers such as the FS-ID so as to minimize
    security risks.</dd>
    <dt>AFI (16 bits):</dt>
    <dd> Address Family Identifier as used in BGP <xref target="RFC4760" format="default"/>
    (AFI=1 for IPv4 or VPNv4, AFI=2 for IPv6 and VPNv6 as per
      <xref target="RFC8956" format="default"/>).</dd>
      
	<dt>Reserved (8 bits):</dt>
	<dd> <bcp14>MUST</bcp14> be set to zero on transmission and ignored on receipt.</dd>
	<dt>Flags (8 bits):</dt>
	<dd><t>Two flags are currently assigned: </t>
	
	<dl>
         <dt>R bit:</dt>
	<dd>The Remove bit is set when a PCEP FLOWSPEC object is included in a PCEP
        message to indicate removal of the Flow Specification from the associated tunnel.
        If the bit is clear, the Flow Specification is being added or modified.</dd>
        <dt>L bit:</dt>
	<dd>The Longest Prefix Match (LPM) bit is set to indicate that the Flow
        Specification is to be installed as a route subject to LPM
        forwarding.  If the bit is clear, the Flow Specification described by the
        Flow Filter TLV (see <xref target="tlv" format="default"/>) is to be installed as a Flow
        Specification.  If the bit is set, only Flow Specifications that describe
        IPv4 or IPv6 destinations are meaningful in the Flow Filter TLV, and others are ignored.

	If the L
        is set and the receiver does not support the use of Flow Specifications that
        are present in the Flow Filter TLV for the installation of a route subject to
        LPM forwarding, then the PCEP peer <bcp14>MUST</bcp14> respond with a PCErr
        message with Error-Type 30 (FlowSpec Error) and Error-value 5 (Unsupported
        LPM Route).</dd>
	</dl>
	</dd>
      </dl>
      
        <t>Unassigned bits <bcp14>MUST</bcp14> be set to zero on transmission and ignored on receipt.
      </t>
      <t>If the PCEP speaker receives a message with the R bit set in the FLOWSPEC object and the Flow Specification
    identified with an FS-ID does not exist, it <bcp14>MUST</bcp14> generate a PCErr with Error-Type 30 (FlowSpec Error) and Error-value 4 (Unknown FlowSpec). </t>
      <t>If the PCEP speaker does not understand or support the AFI in the FLOWSPEC message, the PCEP peer
    <bcp14>MUST</bcp14> respond with a PCErr message with Error-Type 30 (FlowSpec Error) and Error-value 2
    (Malformed FlowSpec).</t>
      <t>The following TLVs can be used in the FLOWSPEC object:
      </t>    

      <dl>
        <dt>Speaker Entity Identifier TLV:</dt>

	<dd> As specified in <xref target="RFC8232" format="default"/>, the SPEAKER-ENTITY-ID TLV
        encodes a unique identifier for the node that does not change during the lifetime of the PCEP
        speaker. This is used to uniquely identify the FlowSpec originator and thus is used in conjunction
        with the FS-ID to uniquely identify the FlowSpec information. This TLV <bcp14>MUST</bcp14> be included.  If the TLV
        is missing, the PCEP peer <bcp14>MUST</bcp14> respond with a PCErr message with Error-Type 30 (FlowSpec Error) and
        Error-value 2 (Malformed FlowSpec).  If more than one instance of this TLV is present, the first <bcp14>MUST</bcp14> be
        processed, and subsequent instances <bcp14>MUST</bcp14> be ignored.</dd>
        <dt>Flow Filter TLV (variable):</dt>
	<dd> One TLV <bcp14>MAY</bcp14> be included. The Flow Filter TLV is <bcp14>OPTIONAL</bcp14> when the R bit
        is set.</dd>
      </dl>
      
      <t>The Flow Filter TLV <bcp14>MUST</bcp14> be present when the R bit is clear. If the
    TLV is missing when the R bit is clear, the PCEP peer <bcp14>MUST</bcp14> respond with a PCErr message with
      Error-Type 30 (FlowSpec Error) and Error-value 2 (Malformed FlowSpec).</t>
<t>Filtering based on the L2 fields is out of scope of this document.</t>
    </section>
    <section anchor="tlv" numbered="true" toc="default">
      <name>Flow Filter TLV</name>
      <t>One new PCEP TLV is defined to convey Flow Specification filtering rules that specify
    what traffic is carried on a path.  The TLV follows the format of all PCEP TLVs as defined
    in <xref target="RFC5440" format="default"/>.  The Type field values come from the code point space for
    PCEP TLVs and has the value 52 for Flow Filter TLV.</t>
      <t>The Value field of the TLV contains one or more sub-TLVs (the Flow Specification TLVs) as defined in <xref target="subtlv" format="default"/>, and they represent the complete
    definition of a Flow Specification for traffic to be placed on the tunnel.  This tunnel is
    indicated by the PCEP message in which the PCEP FLOWSPEC object is carried.  The set of Flow
    Specification TLVs in a single instance of a Flow Filter TLV is
    combined to indicate the  specific Flow Specification.  Note that the PCEP FLOWSPEC object can
    include just one Flow Filter TLV.</t>
      <t>Further Flow Specifications can be included in a PCEP message by including additional
    FLOWSPEC objects.</t><t> In the future, there may be a desire to add support for L2 Flow
   Specifications (such as described in <xref target="I-D.ietf-idr-flowspec-l2vpn"/>).</t>
    </section>
    <section anchor="subtlv" numbered="true" toc="default">
      <name>Flow Specification TLVs</name>
      <t>The Flow Filter TLV carries one or more Flow Specification TLVs.  The Flow Specification TLV
    follows the format of all PCEP TLVs as defined in <xref target="RFC5440" format="default"/>.  However, the Type values
    are selected from a separate IANA registry (see <xref target="iana" format="default"/>) rather than from the common
    PCEP TLV registry.</t>
      <t>Type values are chosen so that there can be commonality with Flow Specifications defined for use
    with BGP <xref target="RFC8955" format="default"/> <xref target="RFC8956" format="default"/>.  This
    is possible because the BGP Flow Spec encoding uses a single octet to encode the type, whereas PCEP uses
      2 octets.  Thus, the space of values for the Type field is partitioned as shown in <xref target="fspectlvs" format="default"/>.</t>
     
      <table anchor="fspectlvs">
	<name>Flow Specification TLV Type Ranges</name>
	<thead>
	    <tr>     
	      <th>Range</th>
	      <th>Description</th>
	    </tr>
	  </thead>
	  <tbody>
	    <tr> 
	      <td>0-255</td>
	      <td><t>Per BGP Flow Spec registry defined by
               <xref target="RFC8955"/> and
               <xref target="RFC8956"/>.</t>
              <t> Not to be allocated in this registry.</t></td>
	    </tr>
	    <tr>
	       <td>256-65535</td>
	       <td>New PCEP Flow Specifications allocated according
               to the registry defined in this document.</td>
	    </tr>
	  </tbody>	  
	</table>
      <t><xref target="RFC8955" format="default"/> is the reference for the "Flow Spec Component Types" registry and defines the allocations it contains.  <xref target="RFC8956" format="default"/> requested the creation of the "Flow Spec IPv6 Component Types" registry, as well as its initial allocations.  If the AFI (in the
    FLOWSPEC object) is set to IPv4, the range 0..255 is as per "Flow Spec Component Types"
    <xref target="RFC8955" format="default"/>; if the AFI is set to IPv6, the range 0..255 is as per "Flow
    Spec IPv6 Component Types" <xref target="RFC8956" format="default"/>.</t>

    <t>The content of the Value field in each TLV is specific to the type/AFI 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="RFC8955" format="default"/> and
    <xref target="RFC8956" format="default"/>, but it may also be inherited from future BGP specifications.</t>

    <t>When multiple Flow Specification TLVs are present in a single Flow Filter TLV, they are combined to
    produce a more detailed specification of a flow.  For examples and rules about how this is achieved,
    see <xref target="RFC8955" format="default"/>.  As described in <xref target="RFC8955" format="default"/>,
    where it says "A given component type <bcp14>MAY</bcp14> (exactly once) be present in the Flow Specification", a Flow
    Filter TLV <bcp14>MUST NOT</bcp14> contain more than one Flow Specification TLV of the same type: an implementation
    that receives a PCEP message with a Flow Filter TLV that contains more than one Flow Specification TLV
    of the same type <bcp14>MUST</bcp14> respond with a PCErr message with Error-Type 30 (FlowSpec Error) and Error-value 2
    (Malformed FlowSpec) and <bcp14>MUST NOT</bcp14> install the Flow Specification.</t>
      <t>An implementation that receives a PCEP message carrying a Flow Specification TLV with a type value
    that it does not recognize or support <bcp14>MUST</bcp14> respond with a PCErr message with Error-Type 30
    (FlowSpec Error) and Error-value 1 (Unsupported FlowSpec) and <bcp14>MUST NOT</bcp14> install the Flow Specification.</t>
      <t>When used in other protocols (such as BGP), these Flow Specifications are also associated with actions
    to indicate how traffic matching the Flow Specification should be treated.  In PCEP, however, the only
    action is to associate the traffic with a tunnel and to forward matching traffic onto that path, so
    no encoding of an action is needed.</t>
      <t><xref target="priorities" format="default"/> describes how overlapping Flow Specifications are prioritized and
    handled.</t>
      <t>All Flow Specification TLVs with Types in the range 0 to 255 have values defined
    for use in BGP (for example, in <xref target="RFC8955" format="default"/> and
    <xref target="RFC8956" format="default"/>) 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 the following new types:

</t>
<table align="left" anchor="tlvFigthis">
  <name>Flow Specification TLV Types Defined in this Document</name>
  <thead>
    <tr>
      <th> Type </th>
      <th> Description</th>
      <th> Value Defined In</th>
    </tr>
  </thead>
  <tbody>
    <tr>
	      
      <td>256</td>
      <td>Route Distinguisher</td>
      <td>RFC 9168</td>
    </tr>
    <tr>
      
      <td>257</td>
      <td>IPv4 Multicast Flow</td>
      <td>RFC 9168</td>
    </tr>
    <tr>
      
      <td>258</td>
      <td>IPv6 Multicast Flow</td>
      <td>RFC 9168</td>
    </tr>
  </tbody>
</table>
      <t>To allow identification of a VPN in PCEP via a Route Distinguisher (RD) <xref target="RFC4364" format="default"/>,
      a new TLV, ROUTE-DISTINGUISHER TLV, is defined in this document.  A Flow Specification TLV with
      Type 256 (ROUTE-DISTINGUISHER TLV) carries an RD value, which is used to identify that other flow filter
      information (for example, an IPv4 destination prefix) is associated with a specific VPN identified
      by the RD.  See <xref target="vpn-id" format="default"/> for further discussion of VPN identification.</t>
      <figure anchor="rdtlv">
        <name>The Format of the ROUTE-DISTINGUISHER TLV</name>
        <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Type=256            |           Length=8            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                     Route Distinguisher                       |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+       
      ]]></artwork>
      </figure>
      <t>The format of the RD is as per <xref target="RFC4364" format="default"/>.</t>
      <t>Although it may be possible to describe a multicast Flow Specification from the
    combination of other Flow Specification TLVs with specific values, it is more convenient
    to use a dedicated Flow Specification TLV.  Flow Specification TLVs with Type
    values 257 and 258 are used to identify a multicast flow for IPv4 and IPv6, respectively.
    The Value field is encoded as shown in <xref target="mcastfig" format="default"/>.</t>
      <figure anchor="mcastfig">
        <name>Multicast Flow Specification TLV Encoding</name>
        <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Reserved           |S|G|  Src Mask Len | Grp Mask Len  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                        Source Address                         ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                   Group multicast Address                     ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     
   ]]></artwork>
      </figure>

      <t>The address fields and address mask lengths of the two Multicast Flow Specification TLVs
    contain source and group prefixes for matching against packet flows. Note that the two address
    fields are 32 bits for an IPv4 Multicast Flow and 128 bits for an IPv6 Multicast Flow.</t>
      <t>The Reserved field <bcp14>MUST</bcp14> be set to zero and ignored on receipt.</t>
      <t>Two bit flags (S and G) are defined to describe the multicast wildcarding in use.
    If the S bit is set, then source wildcarding is in use, and the values in the Source Mask Length
    and Source Address fields <bcp14>MUST</bcp14> be ignored.  If the G bit is set, then group wildcarding is in
    use, and the values in the Group Mask Length and Group multicast Address fields <bcp14>MUST</bcp14> be ignored.
    The G bit <bcp14>MUST NOT</bcp14> be set unless the S bit is also set: if a Multicast Flow Specification TLV
    is received with S bit = 0 and G bit = 1, the receiver <bcp14>MUST</bcp14> respond with a PCErr with Error-Type 30 (FlowSpec Error) and Error-value 2 (Malformed FlowSpec).</t>
      <t>The three multicast mappings may be achieved as follows:
      </t>
<ul empty="true">
      <li>(S, G) - S bit = 0, G bit = 0, the Source Address and Group multicast Address prefixes are
      both used to define the multicast flow.</li>
      <li>(*, G) - S bit = 1, G bit = 0, the Group multicast Address prefix is used to define the
      multicast flow, but the Source Address prefix is ignored.</li>
      <li>(*, *) - S bit = 1, G bit = 1, the Source Address and Group multicast Address prefixes are
      both ignored.</li>
</ul>	  
    </section>
    <section anchor="detailed" numbered="true" toc="default">
      <name>Detailed Procedures</name>
      <t>This section outlines some specific detailed procedures for using the protocol extensions
    defined in this document.</t>
      <section anchor="default" numbered="true" toc="default">
        <name>Default Behavior and Backward Compatibility</name>
        <t>The default behavior is that no Flow Specification is applied to a tunnel.  That is,
       the default is that the FLOWSPEC object is not used, as is the case in all systems
       before the implementation of this specification.</t>
        <t>In this case, it is a local matter (such as through configuration) how tunnel head ends
       are instructed in terms of what traffic to place on a tunnel.</t>
        <t><xref target="RFC5440" format="default"/> describes how receivers respond when they see unknown PCEP
       objects.</t>
      </section>
      <section anchor="composite" numbered="true" toc="default">
        <name>Composite Flow Specifications</name>
        <t>Flow Specifications may be represented by a single Flow Specification TLV or may require a
      more complex description using multiple Flow Specification TLVs.  For example, a flow
      indicated by a source-destination pair of IPv6 addresses would be described by the
      combination of Destination IPv6 Prefix and Source IPv6 Prefix Flow Specification TLVs.</t>
      </section>
      <section anchor="modify" numbered="true" toc="default">
        <name>Modifying Flow Specifications</name>
        <t>A PCE may want to modify a Flow Specification associated with a tunnel, or a PCC may
      want to report a change to the Flow Specification it is using with a tunnel.</t>
        <t>It is important to identify the specific Flow Specification so it is clear that
      this is a modification of an existing flow and not the addition of a new flow as described
      in <xref target="multiple" format="default"/>.  The FS-ID field of the PCEP FLOWSPEC object is used to
      identify a specific Flow Specification in the context of the content of the Speaker Entity
      Identifier TLV.</t>
        <t>When modifying a Flow Specification, all Flow Specification TLVs for the intended specification
      of the flow <bcp14>MUST</bcp14> be included in the PCEP FLOWSPEC object. The FS-ID <bcp14>MUST</bcp14> be retained from the
      previous description of the flow, and the same Speaker Entity Identifier TLV <bcp14>MUST</bcp14> be used.</t>
      </section>
      <section anchor="multiple" numbered="true" toc="default">
        <name>Multiple Flow Specifications</name>
        <t>It is possible that traffic from multiple flows will be placed on a single tunnel.  In some cases,
      it is possible to define these within a single PCEP FLOWSPEC object by widening the scope of a Flow
      Specification TLV: for example, traffic to two destination IPv4 prefixes might be captured by a single
      Flow Specification TLV with type "Destination" with a suitably adjusted prefix.  However, this is
      unlikely to be possible in most scenarios, and it must be recalled that it is not permitted to include
      two Flow Specification TLVs of the same type within one Flow Filter TLV.</t>
        <t>The normal procedure, therefore, is to carry each Flow Specification in its own PCEP FLOWSPEC object.
      Multiple objects may be present on a single PCEP message, or multiple PCEP messages may be used.</t>
      </section>
      <section anchor="addremove" numbered="true" toc="default">
        <name>Adding and Removing Flow Specifications</name>
        <t>The Remove bit in the PCEP FLOWSPEC object is left clear when a Flow Specification is being
       added or modified.</t>
        <t>To remove a Flow Specification, a PCEP FLOWSPEC object is included with the FS-ID matching the
       one being removed, and the R bit is set to indicate removal.  In this case, it is not necessary to
       include any Flow Specification TLVs.</t>
        <t>If the R bit is set and Flow Specification TLVs are present, an implementation <bcp14>MAY</bcp14> ignore them.  If
       the implementation checks the Flow Specification TLVs against those recorded for the FS-ID and Speaker
       Entity Identifier of the Flow Specification being removed and finds a mismatch, the Flow Specification matching the FS-ID
       <bcp14>MUST</bcp14> still be removed, and the implementation <bcp14>SHOULD</bcp14> record a local exception or log.</t>
      </section>
      <section anchor="vpn-id" numbered="true" toc="default">
        <name>VPN Identifiers</name>
        <t>VPN instances are identified in BGP using RDs <xref target="RFC4364" format="default"/>.  These
      values are not normally considered to have any meaning outside of the network, and they are not encoded
      in data packets belonging to the VPNs.  However, RDs provide a useful way of identifying VPN instances
      and are often manually or automatically assigned to VPNs as they are provisioned.</t>
        <t>Thus, the RD provides a useful way to indicate that traffic for a particular VPN should be placed on a
      given tunnel.  The tunnel head end will need to interpret this Flow Specification not as a filter on
      the fields of data packets but rather using the other mechanisms that it already uses to identify VPN traffic.
      These mechanisms could be based on the incoming port (for port-based VPNs) or may leverage knowledge of the VPN Routing and Forwarding (VRF) that
      is in use for the traffic.</t>
      </section>
      <section anchor="priorities" numbered="true" toc="default">
        <name>Priorities and Overlapping Flow Specifications</name>
        <t>Flow Specifications can overlap.  For example, two different Flow Specifications may be identical except
      for the length of the prefix in the destination address.  In these cases, the PCC must determine how to
      prioritize the Flow Specifications so as to know which path to assign packets that match both Flow Specifications.  That is, the PCC must assign a precedence to the Flow Specifications so that it checks
	each incoming packet for a match in a predictable order.</t>
	
        <t>The processing of BGP Flow Specifications is described in
        <xref target="RFC8955" format="default"/>.  Section <xref target="RFC8955" section="5.1" sectionFormat="bare"/> of
        that document explains the order of traffic filtering rules to
        be executed by an implementation of that specification.</t>
        <t>PCCs <bcp14>MUST</bcp14> apply the same ordering rules as defined in <xref target="RFC8955" format="default"/>.</t>
        <t>Furthermore, it is possible that Flow Specifications will be distributed
      by BGP as well as by PCEP as described in this document.  In such
      cases, implementations supporting both approaches <bcp14>MUST</bcp14> apply the
      prioritization and ordering rules as set out in <xref target="RFC8955" format="default"/>
      regardless of which protocol distributed the Flow Specifications.
      However, implementations <bcp14>MAY</bcp14> provide a configuration control to
      allow one protocol to take precedence over the other; this may be
      particularly useful if the Flow Specifications make identical matches
      on traffic but have different actions.  It is <bcp14>RECOMMENDED</bcp14> that  a message be
      logged for the operator to understand the behavior when
      two Flow Specifications distributed by different protocols overlap,
      especially when one acts to replace another.</t>
        <t><xref target="mg-mxfspec" format="default"/> of this document covers manageability considerations relevant to the
      prioritized ordering of Flow Specifications.</t>
        <t>An implementation that receives a PCEP message carrying a Flow Specification that it cannot resolve
      against other Flow Specifications already installed (for example, because the new Flow Specification has
      irresolvable conflicts with other Flow Specifications that are already installed) <bcp14>MUST</bcp14> respond with a PCErr
      message with Error-Type 30 (FlowSpec Error) and Error-value 3 (Unresolvable Conflict) and <bcp14>MUST NOT</bcp14> install the
      Flow Specification.</t>
      </section>
    </section>
    <section anchor="messages" numbered="true" toc="default">
      <name>PCEP Messages</name>
      <t>This section describes the format of messages that contain FLOWSPEC objects.  The
    only difference from previous message formats is the inclusion of that object.</t>
      <t>The figures in this section use the notation defined in <xref target="RFC5511" format="default"/>.</t>
      <t>The FLOWSPEC object is <bcp14>OPTIONAL</bcp14> and <bcp14>MAY</bcp14> be carried in the PCEP messages.</t>
      <t>The PCInitiate message is defined in <xref target="RFC8281" format="default"/> and updated
    as below:</t>
      <sourcecode type="rbnf"><![CDATA[
<PCInitiate Message> ::= <Common Header>
                         <PCE-initiated-lsp-list>

Where:
   <PCE-initiated-lsp-list> ::= <PCE-initiated-lsp-request>
                                [<PCE-initiated-lsp-list>]

   <PCE-initiated-lsp-request> ::=
                                 ( <PCE-initiated-lsp-instantiation>|
                                   <PCE-initiated-lsp-deletion> )

   <PCE-initiated-lsp-instantiation> ::= <SRP>
                                         <LSP>
                                         [<END-POINTS>]
                                         <ERO>
                                         [<attribute-list>]
                                         [<flowspec-list>]

   Where:
      <flowspec-list> ::= <FLOWSPEC> [<flowspec-list>]
   ]]></sourcecode>
      <t>The PCUpd message is defined in <xref target="RFC8231" format="default"/> and
    updated as below:</t>
      <sourcecode type="rbnf"><![CDATA[  
<PCUpd Message> ::= <Common Header>
                    <update-request-list>

Where:
   <update-request-list> ::= <update-request>
                             [<update-request-list>]

   <update-request> ::= <SRP>
                        <LSP>
                        <path>
                        [<flowspec-list>]

   Where:
      <path>::= <intended-path><intended-attribute-list>

      <flowspec-list> ::= <FLOWSPEC> [<flowspec-list>]
   ]]></sourcecode>
      <t>The PCRpt message is defined in <xref target="RFC8231" format="default"/> and
    updated as below:</t>
      <sourcecode type="rbnf"><![CDATA[
<PCRpt Message> ::= <Common Header>
                    <state-report-list>

Where:
   <state-report-list> ::= <state-report>[<state-report-list>]

   <state-report> ::= [<SRP>]
                      <LSP>
                      <path>
                      [<flowspec-list>]

    Where:
      <path>::= <intended-path>
                [<actual-attribute-list><actual-path>]
                <intended-attribute-list>

      <flowspec-list> ::= <FLOWSPEC> [<flowspec-list>]
   ]]></sourcecode>
      <t>The PCReq message is defined in <xref target="RFC5440" format="default"/> and updated in <xref target="RFC8231" format="default"/>;
    it is further updated below for a Flow Specification:</t>
   <sourcecode type="rbnf"><![CDATA[
<PCReq Message>::= <Common Header>
                   [<svec-list>]
                   <request-list>

Where:
   <svec-list>::= <SVEC>[<svec-list>]

   <request-list>::= <request>[<request-list>]

   <request>::= <RP>
                <END-POINTS>
                [<LSP>]
                [<LSPA>]
                [<BANDWIDTH>]
                [<metric-list>]
                [<RRO>[<BANDWIDTH>]]
                [<IRO>]
                [<LOAD-BALANCING>]
                [<flowspec-list>]

   Where:
      <flowspec-list> ::= <FLOWSPEC> [<flowspec-list>]
   ]]></sourcecode>
      <t>The PCRep message is defined in <xref target="RFC5440" format="default"/> and updated in
    <xref target="RFC8231" format="default"/>; it is further updated below for a Flow
    Specification:</t>
       <sourcecode type="rbnf"><![CDATA[
<PCRep Message> ::= <Common Header>
                    <response-list>

Where:
   <response-list>::=<response>[<response-list>]

   <response>::=<RP>
               [<LSP>]
               [<NO-PATH>]
               [<attribute-list>]
               [<path-list>]
               [<flowspec-list>]

   Where:
      <flowspec-list> ::= <FLOWSPEC> [<flowspec-list>] 
   ]]></sourcecode>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document requests that IANA allocate code points for the protocol elements
    defined in this document.</t>
      <section numbered="true" toc="default">
        <name>PCEP Objects</name>
        <t>IANA maintains a subregistry called "PCEP Objects" within the "Path Computation Element Protocol
   (PCEP) Numbers" registry. Each PCEP object has an Object-Class and an Object-Type, and IANA has allocated new code points in this subregistry as follows:</t>
      <table align="left">
	<name>PCEP Objects Subregistry Additions</name>
	<thead>
	  <tr>	    
	    <th>Object-Class Value</th>
	    <th>Name</th>
	    <th>Object-Type</th>
	    <th>Reference</th>
	  </tr>
	</thead>
	<tbody>
	  <tr>	    
	    <td rowspan="2">43</td>
	    <td rowspan="2">FLOWSPEC</td>
	    <td>0: Reserved</td>
	    <td>RFC 9168</td>
	  </tr>
	  <tr>
	    <td>1: Flow Specification</td>
	    <td>RFC 9168</td>
	  </tr>
	</tbody>	           
      </table>
      <section numbered="true" toc="default">
          <name>PCEP FLOWSPEC Object Flag Field</name>
          <t>This document requests that a new subregistry, "FLOWSPEC Object
        Flag Field", be created within the "Path Computation Element Protocol
        (PCEP) Numbers" registry to manage the Flag field of the FLOWSPEC
        object.  New values are to be assigned by Standards Action <xref target="RFC8126" format="default"/>.
        Each bit should be tracked with the following qualities:

          </t>
          <ul spacing="normal">
            <li>Bit number (counting from bit 0 as the most significant bit)</li>
            <li>Capability description</li>
            <li>Defining RFC</li>
          </ul>
          <t>The initial population of this registry is as follows:</t>
          <table align="left">
	    <name>Initial Contents of the FLOWSPEC Object Flag Field Registry</name>
	    <thead>
	      <tr>
		<th>Bit</th>
		<th>Description</th>
		<th>Reference</th>
	      </tr>
	    </thead>
	    <tbody>
	    <tr>
	      <td>0-5</td>
	      <td>Unassigned</td>
	    <td></td>
	      </tr>
	      <tr>   
	      <td>6</td>
	      <td>LPM (L bit)</td>
	      <td>RFC 9168</td>
	    </tr>
	    <tr>
	      <td>7</td>
	      <td> Remove (R bit)</td>
	      <td>RFC 9168</td>
	    </tr>
	    </tbody>
	  </table>
	  
        </section>
      </section>
      <section numbered="true" toc="default">
        <name>PCEP TLV Type Indicators</name>
        <t>IANA maintains a subregistry called "PCEP TLV Type Indicators" within the "Path Computation Element Protocol (PCEP) Numbers" registry.  IANA has made the following allocations in this subregistry:</t>
	
<table align="left">
  <name>PCEP TLV Type Indicators Subregistry Additions</name>
	<thead>
	  <tr>
	    <th>Value</th>
	    <th>Description</th>
	    <th> Reference</th>
	  </tr>
	</thead>
	<tbody>
	<tr>
	    <td>51</td>
	    <td>PCE-FLOWSPEC-CAPABILITY TLV</td>
	    <td>RFC 9168</td>
	  </tr>
	  <tr>
	    <td>52</td>
	    <td>FLOW FILTER TLV</td>
	    <td>RFC 9168</td>
	  </tr>
	</tbody>
      </table>
      
      </section>
      <section anchor="iana" numbered="true" toc="default">
        <name>Flow Specification TLV Type Indicators</name>
        <t>IANA has created a new subregistry called "PCEP Flow Specification TLV Type Indicators" within the "Path Computation Element Protocol (PCEP) Numbers" registry.</t>
        <t>Allocations from this registry are to be made according to the following assignment policies <xref target="RFC8126" format="default"/>:</t>

	 <table align="left">
	  <name>Registration Procedures for the PCEP Flow Specification TLV Type Indicators Subregistry</name>
	  <thead>
	    <tr>
       	      <th>Range</th>
	      <th>Registration Procedures</th>
	    </tr>
	  </thead>
	  <tbody>
	    <tr>
	      <td>0-255</td>
	      <td><t>Reserved - must not be allocated.</t>
              <t>Usage mirrors the BGP Flow Spec registry
              <xref target="RFC8955"/> <xref target="RFC8956"/>.</t></td>
	    </tr>
	    <tr>
	      
              <td>256-64506</td>
	      <td>Specification Required</td>
	    </tr>
	    <tr>
              
	      <td>64507-65531</td>
	      <td>First Come First Served</td>
	    </tr>
	    <tr>
              
	      <td>65532-65535</td>
	      <td>Experimental Use</td>
	    </tr>
	  </tbody>
	 </table>

	<t>IANA has populated this registry with values defined in this
      document as follows, taking the new values from the range 256 to 64506:</t>
      <table align="left">
	<name>Initial Contents of the PCEP Flow Specification TLV Type Indicators Subregistry</name>
	  <thead>
	    <tr>    
<th>Value</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
  
<td>256</td>
<td>Route Distinguisher</td>
</tr>
<tr>
  
<td>257</td>
<td> IPv4 Multicast</td>
</tr>
<tr>
<td>258</td>
<td>IPv6 Multicast</td>
</tr>
</tbody>
</table>

      </section>
      <section numbered="true" toc="default">
        <name>PCEP Error Codes</name>
        <t>IANA maintains a subregistry called "PCEP-ERROR Object Error Types and Values" within the "Path Computation Element Protocol (PCEP) Numbers" registry.  Entries
      in this subregistry are described by Error-Type and Error-value.  IANA has added the following assignment to this subregistry:</t>
      <table align="left">
	<name>PCEP-ERROR Object Error Types and Values Subregistry Additions</name>
	<thead>
	  <tr>
	    <th>Error-Type</th>
	    <th>Meaning</th>
	    <th>Error-value</th>
            <th>Reference</th>
	  </tr>
	</thead>
	<tbody>
	  <tr>
	    <td rowspan="7">30</td>
	    <td rowspan="7">FlowSpec error</td>
	    <td>0: Unassigned</td>
	    <td>RFC 9168</td>
	  </tr>
	  <tr>
            <td>1: Unsupported FlowSpec</td>
	    <td>RFC 9168</td>
	  </tr>
	  <tr>
            <td>2: Malformed FlowSpec</td>
	    <td>RFC 9168</td>
	     </tr>
	  <tr>
	    
            <td>3: Unresolvable Conflict</td>
	    <td>RFC 9168</td>
	     </tr>
	  <tr>
            <td>4: Unknown FlowSpec</td>
	    <td>RFC 9168</td>
	     </tr>
	  <tr>
            <td>5: Unsupported LPM Route</td>
	    <td>RFC 9168</td>
	     </tr>
	  <tr>
            <td>6-255: Unassigned</td>
	    <td>RFC 9168</td>
	     </tr>
	</tbody>
      </table>
      
      </section>
      <section numbered="true" toc="default">
        <name>PCE Capability Flag</name>
        <t>IANA has registered a new capability bit in the OSPF Parameters "Path Computation Element (PCE) Capability Flags" registry as follows:</t>
	<table align="left">
	  <name>Path Computation Element (PCE) Capability Flags Registry Additions</name>
	<thead>
	  <tr>
	    <th>Bit</th>
	    <th>Capability Description</th>
	    <th>Reference</th>
	  </tr>
	</thead>
	<tbody>
	<tr>
	  <td>16</td>
	  <td>FlowSpec</td>
	  <td>RFC 9168</td>
	</tr>
      </tbody>       
     </table>
      </section>
    </section>
    <section anchor="Security" numbered="true" toc="default">      
      <name>Security Considerations</name>
      <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" format="default"/>,
    <xref target="RFC6952" section="2.5" sectionFormat="of"/>, <xref target="RFC8253" format="default"/>, and
      <xref target="RFC8955" format="default"/>.</t>
      <t>The description of Flow Specifications associated with paths set up or controlled by a
    PCE adds a further detail that could be attacked without tearing down LSPs or SR paths
    but causes traffic to be misrouted within the network.  Therefore, the use of the security
    mechanisms for PCEP referenced above is important.</t>
      <t>Visibility into the information carried in PCEP does not have direct privacy concerns for
    end users' data; however, knowledge of how data is routed in a network may make that
    data more vulnerable.  Of course, the ability to interfere with the way data is routed also
    makes the data more vulnerable.  Furthermore, knowledge of the connected endpoints (such as
    multicast receivers or VPN sites) is usually considered private customer information.  Therefore,
    implementations or deployments concerned with protecting privacy <bcp14>MUST</bcp14> apply the mechanisms described
    in the documents referenced above, in particular, to secure the PCEP session using IPsec per Sections
    <xref target="RFC5440"  section="10.4" sectionFormat="bare"/> to <xref target="RFC5440" section="10.6" sectionFormat="bare"/> of <xref target="RFC5440"/> or TLS per <xref target="RFC8253" format="default"/>.  Note that TCP-MD5
    security as originally suggested in <xref target="RFC5440" format="default"/> does not provide sufficient security
    or privacy guarantees and <bcp14>SHOULD NOT</bcp14> be relied upon.</t>
      <t>Experience with Flow Specifications in BGP systems indicates that they can become complex and
    that the overlap of Flow Specifications installed in different orders can lead to unexpected
    results.  Although this is not directly a security issue per se, the confusion and unexpected
    forwarding behavior may be engineered or exploited by an attacker.  Furthermore, this complexity
    might give rise to a situation where the forwarding behaviors might create gaps in the monitoring
    and inspection of particular traffic or provide a path that avoids expected mitigations.  Therefore,
    implementers and operators <bcp14>SHOULD</bcp14> pay careful attention to the manageability considerations described
    in <xref target="Manage" format="default"/> and familiarize themselves with the careful explanations in
    <xref target="RFC8955" format="default"/>.</t>
    </section>
    <section anchor="Manage" numbered="true" toc="default">
      <name>Manageability Considerations</name>
      <t>The feature introduced by this document enables operational manageability of networks operated in
     conjunction with a PCE and using PCEP.  In the case of a stateful active
     PCE or with PCE-initiated services, in the absence of this feature, additional manual configuration is needed to tell the head ends
     what traffic to place on the network services (LSPs, SR paths, etc.).</t>
      <t>This section follows the advice and guidance of <xref target="RFC6123" format="default"/>.</t>
      <section anchor="mg-mxfspec" numbered="true" toc="default">
        <name>Management of Multiple Flow Specifications</name>
        <t>Experience with Flow Specification in BGP suggests that there can be a lot of complexity when
       two or more Flow Specifications overlap.  This can arise, for example, with addresses indicated
       using prefixes and could cause confusion about what traffic should be placed on which path.  Unlike
       the behavior in a distributed routing system, it is not important to the routing stability and consistency
       of the network that each head-end implementation applies the same rules to disambiguate overlapping Flow
       Specifications, but it is important that:
        </t>
        <ul spacing="normal">
          <li>a network operator can easily find out what traffic is being placed on which path and why.  This
            will facilitate analysis of the network and diagnosis of faults.</li>
          <li>a PCE be able to correctly predict the effect of instructions it gives to a PCC.  This will
            ensure that traffic is correctly placed on the network without causing congestion or other
            network inefficiencies and that traffic is correctly delivered.</li>
        </ul>
        <t>To that end, a PCC <bcp14>MUST</bcp14> enable an operator to view the Flow Specifications that it has installed,
       and these <bcp14>MUST</bcp14> be presented in order of precedence such that when two Flow Specifications overlap,
       the one that will be serviced with higher precedence is presented to the operator first.</t>
        <t>A discussion of precedence ordering for Flow Specifications is found in <xref target="priorities" format="default"/>.</t>
      </section>
      <section anchor="mg-control" numbered="true" toc="default">
        <name>Control of Function through Configuration and Policy</name>
        <t>Support for the function described in this document implies that a functional element that
       is capable of requesting that a PCE compute and control a path is also able to configure the
       specification of what traffic should be placed on that path.  Where there is a human involved
       in this action, configuration of the Flow Specification must be available through an interface
       (such as a graphical user interface or a Command Line Interface).  Where a distinct software
       component (i.e., one not co-implemented with the PCE) is used, a protocol mechanism will be
       required that could be PCEP itself or a data model, such as extensions to the YANG
       model for requesting path computation <xref target="I-D.ietf-teas-yang-path-computation" format="default"/>.</t>
        <t>Implementations <bcp14>MAY</bcp14> be constructed with a configurable switch to indicate whether they support
       the functions defined in this document.  Otherwise, such implementations <bcp14>MUST</bcp14> indicate
       that they support the function as described in <xref target="cap" format="default"/>.  If an implementation
       allows configurable support of this function, that support <bcp14>MAY</bcp14> be configurable per peer or
       once for the whole implementation.</t>
        <t>As mentioned in <xref target="mg-mxfspec" format="default"/>, a PCE implementation <bcp14>SHOULD</bcp14> provide a mechanism
       to configure variations in the precedence ordering of Flow Specifications per PCC.</t>
      </section>
      <section anchor="mg-model" numbered="true" toc="default">
        <name>Information and Data Models</name>
        <t>The YANG model in <xref target="I-D.ietf-pce-pcep-yang" format="default"/> can be used to model and monitor
       PCEP states and messages.  To make that YANG model useful for the extensions described in
       this document, it would need to be augmented to cover the new protocol elements.</t>
        <t>Similarly, as noted in <xref target="mg-control" format="default"/>, the YANG model defined in
       <xref target="I-D.ietf-teas-yang-path-computation" format="default"/> could be extended to allow the specification
       of Flow Specifications.</t>
        <t>Finally, as mentioned in <xref target="mg-mxfspec" format="default"/>, a PCC implementation <bcp14>SHOULD</bcp14> provide
       a mechanism to allow an operator to read the Flow Specifications from a PCC and to
       understand in what order they will be executed.  This could be achieved using a new YANG
       model.</t>
      </section>
      <section anchor="mg-monitor" numbered="true" toc="default">
        <name>Liveness Detection and Monitoring</name>
        <t>The extensions defined in this document do not require any additional liveness detection
       and monitoring support.  See <xref target="RFC5440" format="default"/> and <xref target="RFC5886" format="default"/> for
       more information.</t>
      </section>
      <section anchor="mg-verify" numbered="true" toc="default">
<name>Verifying Correct Operation</name>
     <t>The chief element of operation that needs to be verified (in addition to the operation
       of the protocol elements as described in <xref target="RFC5440" format="default"/>) is the installation,
       precedence, and correct operation of the Flow Specifications at a PCC.</t>
        <t>In addition to the YANG model, for reading Flow Specifications described in <xref target="mg-model" format="default"/>,
       tools may be needed to inject Operations and Management (OAM) traffic at the PCC that matches
       specific criteria so that it can be monitored while traveling along the desired path.  Such tools are
       outside the scope of this document.</t>
      </section>
      <section anchor="mg-reqs" numbered="true" toc="default">
        <name>Requirements for Other Protocols and Functional Components</name>
        <t>This document places no requirements on other protocols or components.</t>
      </section>
      <section anchor="mg-impact" numbered="true" toc="default">
        <name>Impact on Network Operation</name>
        <t>The use of the features described in this document clearly have 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 mechanisms
       that have to be applied rather than a change to how the traffic is passed through
       the network.</t>
      </section>

</section>
  </middle>
  <back>
<displayreference target="I-D.ietf-idr-flowspec-l2vpn" to="BGP-L2VPN"/>
<displayreference target="I-D.gont-numeric-ids-sec-considerations" to="NUMERIC-IDS-SEC"/>
<displayreference target="I-D.ietf-pce-pcep-yang" to="PCE-PCEP-YANG"/>
<displayreference target="I-D.ietf-teas-yang-path-computation" to="TEAS-YANG-PATH"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4364.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4760.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5440.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5511.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8231.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8232.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8253.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8281.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8955.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8956.xml"/>

      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4655.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5088.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5089.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5886.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6123.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6952.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7399.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8283.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8664.xml"/>

        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.gont-numeric-ids-sec-considerations.xml"/>

	
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-pce-pcep-yang.xml"/>

	

        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-teas-yang-path-computation.xml"/>

	

	  <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-idr-flowspec-l2vpn.xml"/>

      </references>
    </references>
    <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>Thanks to <contact fullname="Julian Lucek"/>, <contact fullname="Sudhir Cheruathur"/>, <contact fullname="Olivier Dugeon"/>, <contact fullname="Jayant Agarwal"/>, <contact fullname="Jeffrey Zhang"/>,
     <contact fullname="Acee Lindem"/>, <contact fullname="Vishnu Pavan Beeram"/>, <contact fullname="Julien Meuric"/>, <contact fullname="Deborah Brungard"/>, <contact fullname="Éric Vyncke"/>, <contact fullname="Erik Kline"/>,
     <contact fullname="Benjamin Kaduk"/>, <contact fullname="Martin Duke"/>, <contact fullname="Roman Danyliw"/>, and <contact fullname="Alvaro Retana"/> for useful discussions and
     comments.</t>
    </section>

    <section toc="default" numbered="false">
      <name>Contributors</name>
          
<contact fullname="Shankara">
<organization>Huawei Technologies</organization>
<address>
<postal>
<street>Divyashree Techno Park, Whitefield</street>
<extaddr></extaddr>
<city>Bangalore</city>
<region>Karnataka</region>
<code>560066</code>
<country>India</country>
</postal>

<email>shankara@huawei.com</email>
</address>
</contact>

<contact fullname="Qiandeng Liang">
  <organization>Huawei Technologies</organization>
  <address>
<postal>
<street>101 Software Avenue,</street>
<extaddr>Yuhuatai District</extaddr>
<region>Nanjing</region><code>210012</code>
<country>China</country>
</postal>

<email>liangqiandeng@huawei.com</email>
</address>
</contact>

<contact fullname="Cyril Margaria">
  <organization>Juniper Networks</organization>
  <address>
<postal>
<street>200 Somerset Corporate Boulevard, Suite 4001</street>
<region>Bridgewater, NJ</region><code>08807</code>
<country>USA</country>
</postal>

<email>cmargaria@juniper.net</email>
</address>
</contact>

<contact fullname="Colby Barth">
  <organization>Juniper Networks</organization>
  <address>
<postal>
<street>200 Somerset Corporate Boulevard, Suite 4001</street>
<region>Bridgewater, NJ</region>
<code>08807</code>
<country>USA</country>
</postal>

<email>cbarth@juniper.net</email>
</address>
</contact>

<contact fullname="Xia Chen">
  <organization>Huawei Technologies</organization>
  <address>
<postal>
<street>Huawei Bld., No. 156 Beiqing Rd.</street>
<region>Beijing</region>
<code>100095</code>
<country>China</country>
</postal>

<email>jescia.chenxia@huawei.com</email>
</address>
</contact>

<contact fullname="Shunwan Zhuang">
  <organization>Huawei Technologies</organization>
  <address>
<postal>
<street>Huawei Bld., No. 156 Beiqing Rd.</street>
<region>Beijing</region>
<code>100095</code>
<country>China</country>
</postal>

<email>zhuangshunwan@huawei.com</email>
</address>
</contact>

<contact fullname="Cheng Li">
  <organization>Huawei Technologies</organization>
  <address>
<postal>
<street>Huawei Campus, No. 156 Beiqing Rd.</street>
<region>Beijing</region><code>100095</code>
<country>China</country>
</postal>

<email>c.l@huawei.com</email>
</address>
</contact>
    </section>
  </back>
</rfc>
