<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<!-- vi: set et smarttab sw=2 tabstop=4: -->
<?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"?>
<rfc category="std" docName="draft-ietf-pce-stateful-pce-19" ipr="trust200902">
  <front>
    <title abbrev="PCEP Extensions for Stateful PCE">
    PCEP Extensions for Stateful PCE</title>

    <author fullname="Edward Crabbe" initials="E." surname="Crabbe">
      <organization>Oracle</organization>
        <address>
      <postal>
          <street>1501 4th Ave, suite 1800</street>
          <city>Seattle</city>
          <region>WA</region>
          <code>98101</code>
          <country>US</country>
        </postal>
        <email>edward.crabbe@oracle.com</email>
      </address>
    </author>

 <author fullname="Ina Minei" initials="I." surname="Minei">
      <organization>Google, Inc.</organization>
      <address>
        <postal>
          <street>1600 Amphitheatre Parkway</street>
          <city>Mountain View</city>
          <region>CA</region>
          <code>94043</code>
          <country>US</country>
        </postal>
        <email>inaminei@google.com</email>
      </address>
    </author>

    <author fullname="Jan Medved" initials="J." surname="Medved">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>170 West Tasman Dr.</street>
          <city>San Jose</city>
          <region>CA</region>
          <code>95134</code>
          <country>US</country>
        </postal>
        <email>jmedved@cisco.com</email>
      </address>
    </author>

    <author fullname="Robert Varga" initials="R." surname="Varga">
      <organization>Pantheon Technologies SRO</organization>
      <address>
        <postal>
          <street>Mlynske Nivy 56</street>
          <city>Bratislava</city>
          <code>821 05</code>
          <country>Slovakia</country>
        </postal>
        <email>robert.varga@pantheon.tech</email>
      </address>
    </author>
    <date day="17" month="May" year="2017" />

    <workgroup>PCE Working Group</workgroup>

    <abstract>
      <t>The Path Computation Element Communication Protocol (PCEP) provides
      mechanisms for Path Computation Elements (PCEs) to perform path
      computations in response to Path Computation Clients (PCCs) requests.</t>

      <t>Although PCEP explicitly makes no assumptions regarding the information
      available to the PCE, it also makes no provisions for
      PCE control of timing and sequence of path computations within and across
      PCEP sessions. This document describes a set of extensions to PCEP to
      enable stateful control of MPLS-TE and GMPLS LSPs via PCEP.</t>

    </abstract>


  </front>

  <middle>
    <section title="Introduction">
      <t><xref target="RFC5440"/> describes the Path Computation Element
      Communication Protocol (PCEP).  PCEP defines the communication between a Path Computation
      Client (PCC) and a Path Computation Element (PCE), or between PCEs,
      enabling computation of Multiprotocol Label Switching (MPLS) for Traffic
      Engineering Label Switched Path (TE LSP) characteristics. Extensions for
      support of Generalized MPLS (GMPLS) in PCEP are defined in <xref
      target='I-D.ietf-pce-gmpls-pcep-extensions'></xref> </t>

      <t>This document specifies a set of extensions to PCEP to enable stateful
      control of LSPs within and across PCEP sessions in compliance with
      <xref target="RFC4657"/>.  It includes mechanisms to effect Label Switched
      Path (LSP) state
      synchronization between PCCs and PCEs, delegation of control over LSPs to
      PCEs, and PCE control of timing and sequence of path computations within
      and across PCEP sessions.</t>

      <t>The extensions that this document describes do not permit the
      PCE to drive creation of an LSP.  The companion document
      <xref target='I-D.ietf-pce-pce-initiated-lsp'></xref> specifies PCE-initiated LSP creation.</t>

    <section title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref target="RFC2119"/>.
      </t>
    </section > <!--Requirements language-->
  </section> <!--introduction-->

    <section title="Terminology">
      <t>This document uses the following terms defined in <xref
      target="RFC5440"/>: PCC, PCE, PCEP Peer, PCEP Speaker.</t>

      <t>This document uses the following terms defined in <xref
      target="RFC4655"/>: TED.</t>

      <t>This document uses the following terms defined in <xref
      target="RFC3031"/>: LSP.</t>

      <t> This document uses the following terms defined in
      <xref target="RFC8051"></xref>:
      Stateful PCE, Passive Stateful PCE, Active Stateful PCE,
      Delegation, LSP State Database. </t>

      <t>The following terms are defined in this document:

      <list style="hanging">

        <t hangText="Revocation:">an operation performed by a PCC on a
        previously delegated LSP. Revocation revokes the rights granted to the
        PCE in the delegation operation. </t>

        <t hangText="Redelegation Timeout Interval:">the period of time
    a PCC waits
    for, when a PCEP session is terminated, before revoking LSP delegation
    to a PCE and attempting to redelegate LSPs associated with the
    terminated
    PCEP session to an alternate PCE. The Redelegation
        Timeout Interval is a PCC-local value that can be either
        operator-configured or dynamically computed by the PCC based on local
        policy. </t>

        <t hangText="State Timeout Interval:">the period of time a PCE waits
    for,
    when a PCEP session is terminated, before flushing LSP state associated
    with that PCEP session and reverting to operator-defined default
    parameters or behaviors. The State
        Timeout Interval is a PCC-local value that can be either
        operator-configured or dynamically computed by the PCC based on local
        policy. </t>

        <t hangText="LSP State Report:">an operation to send LSP state
        (Operational / Admin Status, LSP attributes configured at the
    PCC and set by a PCE,
        etc.) from a PCC to a PCE. </t>

        <t hangText="LSP Update Request:">an operation where an Active
    Stateful PCE requests a
        PCC to update one or more attributes of an LSP and to re-signal the LSP
        with updated attributes.</t>

    <t hangText="SRP-ID-number:">a number used to correlate errors and
    LSP State Reports to LSP Update Requests. It is carried in the
    SRP (Stateful PCE Request Parameters) Object described in
    <xref target="SRP-Object-Format"/>.
    </t>

      </list>
      </t>

      <t> Within this document, PCEP communications are described through
      PCC-PCE relationship. The PCE architecture also supports the PCE-PCE
      communication, by having the requesting PCE fill the role of a PCC, as usual. </t>

      <t>The message formats in this document are specified using Routing
      Backus-Naur Format (RBNF) encoding as specified in <xref
      target="RFC5511"/>.</t>

    </section><!--terminology-->

    <section anchor="Motivation-And-Objectives" title="Motivation and Objectives for Stateful PCE">


      <section anchor="Motivation" title="Motivation">

        <t><xref target="RFC8051"></xref> presents several use cases,
        demonstrating scenarios that benefit from the deployment of a stateful
        PCE. The scenarios apply equally to MPLS-TE and GMPLS deployments.
        </t>

        <section anchor="Background" title="Background">

          <t> Traffic engineering has been a goal of the MPLS architecture since
          its inception (<xref target="RFC3031"/>, <xref target="RFC2702"/>,
          <xref target="RFC3346"/>).  In the traffic engineering system provided
          by <xref target="RFC3630"/>, <xref target="RFC5305"/>, and <xref
          target="RFC3209"/> information about network resources utilization is
          only available as total reserved capacity by traffic class on a per
          interface basis; individual LSP state is available only locally on
          each LER for its own LSPs. In most cases, this makes good sense, as
          distribution and retention of total LSP state for all LERs within in
          the network would be prohibitively costly.</t>

          <t>Unfortunately, this visibility in terms of global LSP state may
          result in a number of issues for some demand patterns, particularly
          within a common setup and hold priority. This issue affects online
          traffic engineering systems.</t>

          <t>A sufficiently over-provisioned system will by definition have no
          issues routing its demand on the shortest path. However, lowering the
          degree to which network over-provisioning is required in order to run
          a healthy, functioning network is a clear and explicit promise of MPLS
          architecture. In particular, it has been a goal of MPLS to provide
          mechanisms to alleviate congestion scenarios in which "traffic streams
          are inefficiently mapped onto available resources; causing subsets of
          network resources to become over-utilized while others remain
          underutilized" (<xref target="RFC2702"/>).</t>
        </section>

        <section anchor="Why-Stateful-PCE" title="Why a Stateful PCE?">

          <t><xref target="RFC4655"/> defines a stateful PCE to be one in which
          the PCE maintains "strict synchronization between the PCE and not only
          the network states (in term of topology and resource information), but
          also the set of computed paths and reserved resources in use in the
          network." <xref target="RFC4655"/> also expressed a number of concerns
          with regard to a stateful PCE, specifically:

          <list style="symbols">
            <t>Any reliable synchronization mechanism would result in
            significant control plane overhead</t>

            <t>Out-of-band TED synchronization would be complex and prone to
            race conditions</t>

            <t>Path calculations incorporating total network state would be
            highly complex</t>
          </list>
          </t>

          <t>In general, stress on the control plane will be directly
          proportional to the size of the system being controlled and the
          tightness of the control loop, and indirectly proportional to the
          amount of over-provisioning in terms of both network capacity and
          reservation overhead.</t>

          <t>Despite these concerns in terms of implementation complexity and
          scalability, several TE algorithms exist today that have been
          demonstrated to be extremely effective in large TE systems, providing
          both rapid convergence and significant benefits in terms of optimality
          of resource usage <xref target="MXMN-TE"/>. All of these systems share
          at least two common characteristics: the requirement for both global
          visibility of a flow (or in this case, a TE LSP) state and for ordered
          control of path reservations across devices within the system being
          controlled. While some approaches have been suggested in order to
          remove the requirements for ordered control (See <xref
          target="MPLS-PC"/>), these approaches are highly dependent on traffic
          distribution, and do not allow for multiple simultaneous LSP
          priorities representing diffserv classes.</t>

          <t>The use cases described in <xref target="RFC8051"></xref>
          demonstrate a need for visibility into
          global inter-PCC LSP state in PCE path computations, and for PCE
          control of sequence and timing in altering LSP path characteristics
          within and across PCEP sessions. </t>
        </section>

        <section anchor="Protocol-Configuration" title="Protocol vs. Configuration">

          <t>Note that existing configuration tools and protocols can be used to
          set LSP state, such as a Command Line Interface (CLI) tool. However,
          this solution has several shortcomings:

          <list style="symbols">
            <t>Scale &amp; Performance: configuration operations often have
            transactional semantics which are typically heavyweight and often
        require
            processing of additional configuration portions beyond the state
            being directly acted upon, with corresponding cost in CPU cycles,
            negatively impacting both PCC stability LSP update rate
            capacity. </t>

            <t>Security: when a PCC opens a configuration channel allowing a PCE
        to send configuration, a malicious PCE may take advantage of this ability to
        take over the PCC. In contrast, the PCEP extensions described in
            this document only allow a PCE control over a very limited set of
            LSP attributes.</t>

            <t>Interoperability: each vendor has a proprietary information model
            for configuring LSP state, which limits interoperability of a
        stateful PCE
            with PCCs from different vendors. The PCEP extensions described in
            this document allow for a common information model for LSP state for
            all vendors. </t>

            <t>Efficient State Synchronization: configuration channels may be
            heavyweight and unidirectional, therefore efficient state
            synchronization between a PCC and a PCE may be a problem.</t>
          </list>
          </t>
        </section>
      </section>

      <section anchor="Objectives" title="Objectives">
        <t>The objectives for the protocol extensions to support stateful PCE
        described in this document are as follows:

        <list style="symbols">
          <t>Allow a single PCC to interact with a mix of stateless and stateful
          PCEs simultaneously using the same protocol, i.e. PCEP.</t>

          <t>Support efficient LSP state synchronization between the PCC and one
          or more active or passive stateful PCEs.</t>

          <t>Allow a PCC to delegate control of its LSPs to an active stateful
          PCE such that a given LSP is under the control of a single PCE at any
          given time.
            <list style="symbols">
              <t>A PCC may revoke this delegation at any time during the
              lifetime of the LSP. If LSP delegation is revoked while the PCEP
              session is up, the PCC MUST notify the PCE about the revocation.</t>
              <t>A PCE may return an LSP delegation at any point during the lifetime of the
              PCEP session. If LSP delegation is returned by the PCE while the PCEP
              session is up, the PCE MUST notify the PCC about the returned delegation.</t>
            </list>
          </t>

          <t>Allow a PCE to control computation timing and update timing across
          all LSPs that have been delegated to it.</t>

          <t>Enable uninterrupted operation of PCC's LSPs in the event of a PCE
          failure or while control of LSPs is being transferred between
          PCEs.</t>
        </list>
        </t>
      </section>

    </section>

    <section anchor="Functions" title="New Functions to Support Stateful PCEs">
      <t>Several new functions are required in PCEP to support stateful
      PCEs. A function can be initiated either from a PCC towards a PCE (C-E) or
      from a PCE towards a PCC (E-C). The new functions are:

      <list style="hanging">
        <t hangText="Capability advertisement (E-C,C-E):"> both the PCC and the
        PCE must announce during PCEP session establishment that they support
        PCEP Stateful PCE extensions defined in this document.</t>

        <t hangText="LSP state synchronization (C-E):"> after the session
        between the PCC and a stateful PCE is initialized, the PCE must learn
        the state of a PCC's LSPs before it can perform path computations or
        update LSP attributes in a PCC.
        </t>

        <t hangText="LSP Update Request (E-C):"> a PCE requests modification of
        attributes on a PCC's LSP.</t>

        <t hangText="LSP State Report (C-E):"> a PCC sends an LSP state report
        to a PCE whenever the state of an LSP changes.</t>

        <t hangText="LSP control delegation (C-E,E-C):"> a PCC grants to a PCE
        the right to update LSP attributes on one or more LSPs; the PCE becomes
        the authoritative source of the LSP's attributes as long as the
        delegation is in effect (See <xref target="Delegation"/>); the PCC may
        withdraw the delegation or the PCE may give up the delegation at any
        time. </t>
      </list>
      </t>

      <t> Similarly to <xref target="RFC5440"/>, no assumption is made about the
      discovery method used by a PCC to discover a set of PCEs (e.g., via static
      configuration or dynamic discovery) and on the algorithm used to select a PCE.
      </t>

    </section>

    <section anchor="Overview" title="Overview of Protocol Extensions">

      <section anchor="State-Ownership" title="LSP State Ownership">

        <t>In  PCEP (defined in <xref target="RFC5440"/>), LSP state
        and operation are under the control of a PCC (a PCC may be an LSR or a
        management station). Attributes received from a PCE are subject to PCC's
        local policy. The PCEP extensions described in this document do
        not change this behavior.</t>

        <t>An active stateful PCE may have control of a PCC's LSPs that were delegated
        to it, but the LSP state ownership is retained by the PCC. In
        particular, in addition to specifying values for LSP's attributes, an
        active stateful PCE also decides when to make LSP modifications.</t>

        <t>Retaining LSP state ownership on the PCC allows for:

        <list style="symbols">
          <t>a PCC to interact with both stateless and stateful PCEs at the same
          time</t>

          <t>a stateful PCE to only modify a small subset of LSP parameters,
          i.e. to set only a small subset of the overall LSP state; other
          parameters may be set by the operator, for example
      through command line interface (CLI) commands</t>

          <t>a PCC to revert delegated LSP to an operator-defined default or to
          delegate the LSPs to a different PCE, if the PCC get disconnected from
          a PCE with currently delegated LSPs</t>
        </list>
        </t>
      </section>

      <section anchor="Mapping" title="New Messages">
        <t>In this document, we define the following new PCEP messages:
        <list style="hanging">
          <t hangText="Path Computation State Report (PCRpt):"> a PCEP message
          sent by a PCC to a PCE to report the status of one or more LSPs. Each
          LSP State Report in a PCRpt message MAY contain the actual LSP's
          path, bandwidth, operational and administrative status, etc. An LSP
          Status Report carried on a PCRpt message is also used in delegation or
          revocation of control of an LSP to/from a PCE. The PCRpt message is
          described in <xref target="PCRpt"/>.</t>

          <t hangText="Path Computation Update Request (PCUpd):"> a PCEP message
          sent by a PCE to a PCC to update LSP parameters, on one or more LSPs.
          Each LSP Update Request on a PCUpd message MUST contain all LSP
          parameters that a PCE wishes to be set for a given LSP. An LSP Update
          Request carried on a PCUpd message is also used to return LSP
          delegations if at any point PCE no longer desires control of an LSP.
          The PCUpd message is described in <xref target="PCUpd"/>.</t>
        </list>
        </t>

        <t>The new functions defined in <xref target="Functions"/> are mapped
        onto the new messages as shown in the following table. </t>

        <texttable anchor="function-mapping"
                   title="New Function to Message Mapping">
          <ttcol align="left" width="60%">Function</ttcol>
          <ttcol align="left">Message</ttcol>
          <c>Capability Advertisement (E-C,C-E)</c><c>Open</c>
          <c>State Synchronization (C-E)</c><c>PCRpt</c>
          <c>LSP State Report (C-E)</c><c>PCRpt</c>
          <c>LSP Control Delegation (C-E,E-C)</c><c>PCRpt, PCUpd</c>
          <c>LSP Update Request (E-C)</c><c>PCUpd</c>
        </texttable>
      </section>

      <section anchor="Error-reporting" title="Error Reporting">
    <t>
     Error reporting is done using the procedures defined in
     <xref target="RFC5440"/>, and reusing the applicable error types
     and error values
     of <xref target="RFC5440"/> wherever appropriate. The current document
     defines new error values for several error types to cover failures
     specific to stateful PCE.
    </t>

      </section>

      <section anchor="Capability" title="Capability Advertisement">
        <t>During PCEP Initialization Phase, PCEP Speakers (PCE or PCC)
        advertise their support of stateful PCEP extensions. A PCEP Speaker includes
        the "Stateful PCE Capability" TLV, described in <xref
        target="Capability-TLV"/>, in the OPEN Object to advertise its support
        for PCEP stateful extensions. The Stateful Capability TLV includes the
        'LSP Update' Flag that indicates whether the PCEP Speaker supports LSP
        parameter updates.</t>

        <t>The presence of the Stateful PCE Capability TLV in PCC's OPEN Object
        indicates that the PCC is willing to send LSP State Reports whenever LSP
        parameters or operational status changes.</t>

        <t>The presence of the Stateful PCE Capability TLV in PCE's OPEN message
        indicates that the PCE is interested in receiving LSP State Reports
        whenever LSP parameters or operational status changes.</t>

        <t>The PCEP extensions for stateful PCEs MUST NOT be used if
        one or both PCEP Speakers have not included the Stateful PCE Capability
        TLV in their respective OPEN message. If the PCEP Speaker on the PCC supports the
        extensions of this draft but did not advertise this capability, then upon receipt
    of PCUpd message from the PCE, it MUST generate a PCErr with
        error-type 19 (Invalid Operation), error-value 2 (Attempted LSP Update Request if
        the stateful PCE capability was not advertised)(see <xref
        target="PCEP-Error-Object"/>) and it SHOULD terminate the PCEP session. If the PCEP
    Speaker on the PCE supports the extensions of this draft but did not
    advertise this capability,
        then upon receipt of a PCRpt message from the PCC, it MUST generate a PCErr
    with error-type 19
    (Invalid Operation), error-value 5 (Attempted LSP State Report if
    stateful PCE capability was
    not advertised) (see <xref target="PCEP-Error-Object"/>) and it SHOULD
    terminate the PCEP session.</t>

        <t>LSP delegation and LSP update operations defined in this document may
        only be used if both PCEP Speakers set the LSP-UPDATE-CAPABILITY Flag in the
        "Stateful Capability" TLV to 'Updates Allowed (U Flag = 1)'. If this is
        not the case and LSP delegation or LSP update operations are attempted,
        then a PCErr with error-type 19 (Invalid Operation) and error-value 1 (Attempted
        LSP Update Request for a non-delegated LSP) (see <xref
        target="PCEP-Error-Object"/>) MUST be generated. Note that, even if one of
        the PCEP speakers does not set the LSP-UPDATE-CAPABILITY flag in its "Stateful Capability" TLV,
        a PCE can still operate as a passive stateful PCE by accepting LSP
        State Reports from the PCC in order to build and maintain an up to date view of
        the state of the PCC's LSPs.</t>

      </section>

      <section anchor="PCE-discovery"
       title="IGP Extensions for Stateful PCE Capabilities Advertisement ">

    <t>
      When PCCs are LSRs participating in the IGP (OSPF or IS-IS), and PCEs
      are either LSRs or servers also participating in the IGP, an
      effective mechanism for PCE discovery within an IGP routing domain
      consists of utilizing IGP advertisements.  Extensions for the advertisement
      of PCE Discovery Information are defined for OSPF and for
      IS-IS  in <xref target="RFC5088"/> and
      <xref target="RFC5089"/> respectively.
    </t>

    <t>
      The PCE-CAP-FLAGS sub-TLV, defined in [RFC5089],
      is an optional sub-TLV used to advertise
      PCE capabilities.  It MAY be present within the PCED sub-TLV carried
      by OSPF or IS-IS. <xref target="RFC5088"/> and
      <xref target="RFC5089"/> provide the description
      and processing rules for this sub-TLV when carried within OSPF and
      IS-IS, respectively.
    </t>

    <t>
      The format of the PCE-CAP-FLAGS sub-TLV is included below for easy reference:

          <list style= "hanging">
            <t hangText="Type:">5 </t>
        <t hangText="Length:">Multiple of 4.</t>
        <t hangText="Value:">This contains an array of units of
          32 bit flags with the most significant bit as 0.
          Each bit represents one PCE capability.</t>
          </list>

    </t>
    <t>
      PCE capability bits are defined in [RFC5088].  This document defines
      new capability bits for the stateful PCE as follows:
    </t>

      <texttable anchor="PCE-cap-flags" style="none" suppress-title="true">
            <ttcol align="left" width='30%'>Bit</ttcol>
            <ttcol align="left" width='70%'>Capability </ttcol>

            <c>11</c><c>&nbsp;Active Stateful PCE capability</c>
            <c>12</c><c>&nbsp;Passive Stateful PCE capability</c>
          </texttable>

    <t>
      Note that while active and passive stateful PCE capabilities may be
      advertised during discovery, PCEP Speakers that wish to use stateful
      PCEP MUST negotiate stateful PCEP capabilities during PCEP session
      setup, as specified in the current document.
      A PCC MAY initiate stateful PCEP capability negotiation at PCEP
      session setup even if it did not receive any IGP PCE capability
      advertisements.
    </t>


      </section>

      <section anchor="Synchronization" title="State Synchronization">
        <t>The purpose of State Synchronization is to provide a
        checkpoint-in-time state replica of a PCC's LSP state in a PCE. State
        Synchronization is performed immediately after the Initialization phase
        (<xref target="RFC5440"/>). </t>

        <t>During State Synchronization, a PCC first takes a snapshot of the
        state of its LSPs state, then sends the snapshot to a PCE in a sequence
        of LSP State Reports. Each LSP State Report sent during State
        Synchronization has the SYNC Flag in the LSP Object set to 1. The set of
        LSPs for which state is synchronized with a PCE is determined by
        the PCC's local configuration (see more details in <xref target="Ctl-Function-Policy"/>)
        and MAY also be determined by stateful PCEP capabilities defined
        in other documents, such as <xref target="I-D.ietf-pce-stateful-sync-optimizations"/>.</t>

        <t> The end of synchronization marker is a PCRpt message with the SYNC
        Flag set to 0 for an LSP Object with PLSP-ID equal to the reserved value
        0 (see <xref target="LSP-Object-Format"/>).
    In this case, the LSP Object SHOULD NOT include the
    SYMBOLIC-PATH-NAME TLV and SHOULD include the LSP-IDENTIFIERS TLV
    with the special value of all zeroes. The PCRpt message  MUST include
    an empty ERO as its intended path and SHOULD NOT include the
    optional RRO object for its actual path.
        If the PCC has no state to synchronize, it SHOULD only send the
        end of synchronization marker. </t>

        <t>A PCE SHOULD NOT send PCUpd messages to a PCC before State
        Synchronization is complete. A PCC SHOULD NOT send PCReq messages to a
        PCE before State Synchronization is complete. This is to allow the PCE
        to get the best possible view of the network before it starts computing
        new paths.</t>

        <t> Either the PCE or the PCC MAY terminate the session using the PCEP
        session termination procedures during the synchronization phase.
        If the session is terminated, the PCE MUST clean up state it received
        from this PCC. The session reestablishment MUST be re-attempted per the procedures
        defined in <xref target="RFC5440"/>, including use of a back-off timer.</t>

        <t>If the PCC encounters a problem which prevents it from completing the
        LSP state synchronization, it MUST send a PCErr message with error-type 20 (LSP
        State Synchronization Error) and error-value 5 (indicating an internal
        PCC error) to the PCE and terminate the session. </t>

        <t>The PCE does not send positive acknowledgements for properly received
        synchronization messages. It MUST respond with a PCErr message with
    error-type 20 (LSP State Synchronization Error) and error-value 1
        (indicating an error in processing the PCRpt)
    (see <xref target="PCEP-Error-Object"/>)
    if it encounters a problem with the LSP State Report it received
    from the PCC and
    it MUST terminate the session.</t>

    <t> A PCE implementing a limit on the resources a single PCC can
    occupy,
    MUST send a PCNtf message with Notification Type 4
    (Stateful PCE resource limit exceeded) and Notification Value 1
    (Entering resource limit exceeded state)
    in response to the PCRpt message triggering
    this condition in the synchronization phase and MUST terminate
    the session. </t>

        <t>The successful State Synchronization sequence is shown in <xref
        target="Synchro-success"/>.</t>

        <figure anchor="Synchro-success" title="Successful state synchronization">
          <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
                    |-----PCRpt, SYNC=1----->| (Sync start)
                    |                        |
                    |-----PCRpt, SYNC=1----->|
                    |            .           |
                    |            .           |
                    |            .           |
                    |-----PCRpt, SYNC=1----->|
                    |            .           |
                    |            .           |
                    |            .           |
                    |                        |
                    |-----PCRpt, SYNC=0----->| (End of sync marker
                    |                        |  LSP State Report
                    |                        |  for PLSP-ID=0)
                    |                        | (Sync done)

          ]]></artwork>
        </figure>

        <t>The sequence where the PCE fails during the State Synchronization
        phase is shown in <xref target="Synchro-fail-pce"/>.</t>

        <figure anchor="Synchro-fail-pce" title="Failed state synchronization (PCE failure)">
          <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
                    |-----PCRpt, SYNC=1----->|
                    |                        |
                    |-----PCRpt, SYNC=1----->|
                    |            .           |
                    |            .           |
                    |            .           |
                    |-----PCRpt, SYNC=1----->|
                    |                        |
                    |-PCRpt, SYNC=1          |
                    |         \    ,-PCErr   |
                    |          \  /          |
                    |           \/           |
                    |           /\           |
                    |          /   `-------->| (Ignored)
                    |<--------`              |
          ]]></artwork>
        </figure>

        <t>The sequence where the PCC fails during the State Synchronization
        phase is shown in <xref target="Synchro-fail-pcc"/>.</t>

        <figure anchor="Synchro-fail-pcc" title="Failed state synchronization (PCC failure)">
          <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
                    |-----PCRpt, SYNC=1----->|
                    |                        |
                    |-----PCRpt, SYNC=1----->|
                    |            .           |
                    |            .           |
                    |            .           |
                    |-------- PCErr=? ------>|
                    |                        |
          ]]></artwork>
        </figure>

        <t> Optimizations to the synchronization procedures and alternate
        mechanisms of providing the synchronization function are outside the scope
        of this document and are discussed elsewhere
        (see <xref target='I-D.ietf-pce-stateful-sync-optimizations'></xref>).</t>
      </section>

      <section anchor="Delegation" title="LSP Delegation">
        <t>If during Capability advertisement both the PCE and the PCC have
        indicated that they support LSP Update, then the PCC may choose to grant
        the PCE a temporary right to update (a subset of) LSP attributes on one
        or more LSPs. This is called "LSP Delegation", and it MAY be performed
        at any time after the Initialization phase, including during the State
        Synchronization phase.</t>

        <t>A PCE MAY return an LSP delegation at any time if it no longer wishes to
        update the LSP's state. A PCC MAY revoke an LSP delegation at any time.
        Delegation, Revocation, and Return are done individually for each
        LSP.</t>

        <t> In the event of a delegation being rejected or returned by a PCE,
        the PCC SHOULD react based on local policy.  It can, for example, either
        retry delegating to the same PCE using an exponentially increasing timer
        or delegate to an alternate PCE. </t>

        <section anchor="LSP-DELEGATION" title="Delegating an LSP">
          <t>A PCC delegates an LSP to a PCE by setting the Delegate flag in LSP
          State Report to 1.  If the PCE does not accept the LSP Delegation, it
          MUST immediately respond with an empty LSP Update Request which has
          the Delegate flag set to 0.  If the PCE accepts the LSP Delegation, it
      MUST set the Delegate flag to 1 when it sends an LSP Update Request for the
      delegated LSP (note that this may occur at a later time). The PCE
      MAY also
      immediately acknowledge a delegation
      by sending an empty LSP Update Request which has the Delegate
      flag set to 1. </t>

          <t>The delegation sequence is shown in <xref
          target="lsp-delegate"/>.</t>

          <figure anchor="lsp-delegate" title="Delegating an LSP">
            <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
                    |---PCRpt, Delegate=1--->| LSP Delegated
                    |                        |
                    |---PCRpt, Delegate=1--->|
                    |            .           |
                    |            .           |
                    |            .           |
                    |<--(PCUpd,Delegate=1)---| Delegation confirmed
                    |                        |
                    |---PCRpt, Delegate=1--->|
                    |                        |
            ]]></artwork>
          </figure>

          <t>Note that for an LSP to remain delegated to a PCE, the PCC MUST set
          the Delegate flag to 1 on each LSP State Report sent to the PCE.</t>
        </section>

        <section anchor="LSP-REVOCATION" title="Revoking a Delegation">

      <section anchor="Explicit-Revocation" title="Explicit Revocation">
          <t>When a PCC decides that a PCE is no longer permitted to modify an
          LSP, it revokes that LSP's delegation to the PCE.  A PCC may revoke an
          LSP delegation at any time during the LSP's life time.  A PCC revoking
          an LSP delegation MAY immediately remove the updated parameters provided
          by the PCE and revert to the operator-defined parameters,
          but to avoid traffic loss, it SHOULD do so in a make-before-break
          fashion.  If the PCC has received but not yet acted on PCUpd messages
          from the PCE for the LSP whose delegation is being revoked, then it
          SHOULD ignore these PCUpd messages when processing the message
          queue. All effects of all messages for which processing started before
          the revocation took place MUST be allowed to complete and the result
          MUST be given the same treatment as any LSP that had been previously
          delegated to the PCE (e.g. the state MAY immediately revert to the
          operator-defined parameters).</t>

          <t>If a PCEP session with the PCE to which the LSP is delegated exists
          in the UP state during the revocation, the PCC MUST notify that PCE by
          sending an LSP State Report with the Delegate flag set to 0, as shown
          in <xref target="lsp-revoke"/>.</t>

          <figure anchor="lsp-revoke" title="Revoking a Delegation">
            <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
                    |---PCRpt, Delegate=1--->|
                    |                        |
                    |<--(PCUpd,Delegate=1)---| Delegation confirmed
                    |            .           |
                    |            .           |
                    |            .           |
                    |---PCRpt, Delegate=0--->| PCC revokes delegation
                    |                        |
            ]]></artwork>
          </figure>

          <t>After an LSP delegation has been revoked, a PCE can no longer
          update LSP's parameters; an attempt to update parameters of a
          non-delegated LSP will result in the PCC sending a PCErr message
          with error-type 19 (Invalid Operation), error-value 1 (attempted LSP Update
          Request for a non-delegated LSP) (see <xref
          target="PCEP-Error-Object"/>).</t>
      </section>

      <section anchor="Revocation-on-timeout"
           title="Revocation on Redelegation Timeout">
          <t>When a PCC's PCEP session with a PCE terminates unexpectedly, the
          PCC MUST wait the time interval specified in Redelegation Timeout
          Interval before revoking LSP delegations to that PCE and attempting to
          redelegate LSPs to an alternate PCE.  If a PCEP session with the
          original PCE can be reestablished before the Redelegation Timeout
          Interval timer expires, LSP delegations to the PCE remain intact.
          </t>

          <t>Likewise, when a PCC's PCEP session with a PCE terminates
          unexpectedly, and the PCC does not succeed in redelegating its LSPs,
          the PCC MUST wait for the State Timeout Interval before
          flushing any LSP state associated with that PCE.  Note that the State
          Timeout Interval timer may expire before the PCC has redelegated the
          LSPs to another PCE, for example if a PCC is not connected to any
          active stateful PCE or if no connected active stateful PCE accepts the
          delegation. In this case, the PCC MUST flush any LSP state set by the
          PCE upon expiration of the State Timeout Interval and revert to
          operator-defined default parameters or behaviors. This operation SHOULD be done in
          a make-before-break fashion.
          </t>

          <t>The State Timeout Interval MUST be greater than or equal to the
          Redelegation Timeout Interval and MAY be set to infinity (meaning that
          until the PCC specifically takes action to change the parameters set
          by the PCE, they will remain intact).
          </t>
      </section>
        </section> <!-- Revoking a delegation -->

        <section anchor="LSP-RETURN" title="Returning a Delegation">
          <t>
      In order to keep a delegation, a PCE MUST set the Delegate
      flag to 1 on each LSP Update Request sent to the PCC.
      A PCE that no longer wishes to update an LSP's parameters SHOULD
          return the LSP delegation back to the PCC by sending an empty LSP
          Update Request which has the Delegate flag set to 0. If a PCC
      receives an LSP Update Request with the Delegate flag set to 0
      (whether the LSP Update Request is empty or not), it MUST
      treat this as a delegation return.
     </t>

          <figure anchor="lsp-return" title="Returning a Delegation">
            <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
                    |---PCRpt, Delegate=1--->| LSP delegated
                    |            .           |
                    |            .           |
                    |            .           |
                    |<--PCUpd, Delegate=0----| Delegation returned
                    |                        |
                    |---PCRpt, Delegate=0--->| No delegation for LSP
                    |                        |
              ]]></artwork>
          </figure>

          <t>If a PCC cannot delegate an LSP to a PCE (for example, if a PCC is
          not connected to any active stateful PCE or if no connected active
          stateful PCE accepts the delegation), the LSP delegation on the PCC
          will time out within a configurable Redelegation Timeout Interval and
          the PCC MUST flush any LSP state set by a PCE at the expiration of the
          State Timeout Interval and revert to
          operator-defined default parameters or behaviors.</t>
        </section> <!--Returning a delegation -->

        <section anchor="Redundant-PCEs" title="Redundant Stateful PCEs">
          <t>In a redundant
          configuration where one PCE is backing up another PCE, the backup PCE
          may have only a subset of the LSPs in the network delegated to it. The backup PCE does
          not update any LSPs that are not delegated to it. In order to
          allow the backup to operate in a hot-standby mode and avoid the need
          for state synchronization in case the primary fails, the backup receives all LSP
          State Reports from a PCC.  When the primary PCE for a given LSP set
          fails, after expiry of the Redelegation Timeout Interval, the PCC
          SHOULD delegate to the redundant PCE all LSPs that had been previously
          delegated to the failed PCE. Assuming that the State Timeout Interval
          had been configured to be greater than the Redelegation Timeout
          Interval (as MANDATORY), and assuming that the primary and redundant PCEs
      take similar decisions, this delegation change will not cause any
          changes to the LSP parameters.
          </t>
        </section> <!-- Redundant-PCEs -->

        <section anchor="PCE-failure" title="Redelegation on PCE Failure">

          <t>On failure, the goal is to: 1) avoid any traffic loss on the LSPs
          that were updated by the PCE that crashed 2) minimize the churn in the
          network in terms of ownership of the LSPs, 3) not leave any "orphan"
          (undelegated) LSPs and 4) be able to control when the state that was
          set by the PCE can be changed or purged. The values chosen for the
          Redelegation Timeout and State Timeout values affect the ability to
          accomplish these goals.
          </t>

          <t> This section summarizes the behaviour with regards to LSP
          delegation and LSP state on a PCE failure. </t>

          <t>If the PCE crashes but recovers within the Redelegation Timeout,
          both the delegation state and the LSP state are kept intact.</t>

          <t>If the PCE crashes but does not recover within the Redelegation
          Timeout, the delegation state is returned to the PCC. If the PCC can
          redelegate the LSPs to another PCE, and that PCE accepts the
          delegations, there will be no change in LSP state.  If the PCC cannot
          redelegate the LSPs to another PCE, then upon expiration of the State
          Timeout Interval, the state set by the PCE is removed and the LSP
          reverts to operator-defined parameters, which may cause a
          change in the LSP state.  Note that an operator may choose to use an
          infinite State Timeout Interval if he wishes to maintain the PCE state
          indefinitely. Note also that flushing the state should be implemented
          using make-before-break to avoid traffic loss.</t>

          <t> If there is a standby PCE, the Redelegation Timeout may be set
          to 0 through policy on the PCC, causing the LSPs to be redelegated
          immediately to the PCC, which can delegate them immediately to the
          standby PCE. Assuming that the PCC can redelegate the LSP to the
          standby PCE within the State Timeout Interval, and assuming the
          standby PCE takes similar decisions as the failed PCE, the LSP state
          will be kept intact. </t>
        </section> <!-- Redelegation on PCE failure -->

      </section> <!-- LSP delegation -->

      <section anchor="LSP-OPERATIONS" title="LSP Operations">

        <section anchor="PASSIVE-PCE" title="Passive Stateful PCE Path Computation Request/Response">
          <figure anchor="passive-pce-figure" title="Passive Stateful PCE Path Computation Request/Response">
            <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
1) Path computation |----- PCReq message --->|
   request sent to  |                        |2) Path computation
   PCE              |                        |   request received,
                    |                        |   path computed
                    |                        |
                    |<---- PCRep message ----|3) Computed paths
                    |     (Positive reply)   |   sent to the PCC
                    |     (Negative reply)   |
4) LSP State change |                        |
   event            |                        |
                    |                        |
5) LSP State Report |----- PCRpt message --->|
   sent to all      |            .           |
   stateful PCEs    |            .           |
                    |            .           |
6) Repeat for each  |----- PCRpt message --->|
   LSP state change |                        |
                    |                        |
            ]]></artwork>
          </figure>

          <t>Once a PCC has successfully established a PCEP session with a
          passive stateful PCE and the PCC's LSP state is synchronized with the
          PCE (i.e. the PCE knows about all PCC's existing LSPs), if an event is
          triggered that requires the computation of a set of paths, the PCC
          sends a path computation request to the PCE (<xref target="RFC5440"/>,
          Section 4.2.3).  The PCReq message MAY contain the LSP Object to
          identify the LSP for which the path computation is requested.</t>

          <t>Upon receiving a path computation request from a PCC, the PCE
          triggers a path computation and returns either a positive or a
          negative reply to the PCC (<xref target="RFC5440"/>, Section
          4.2.4).</t>

          <t>Upon receiving a positive path computation reply, the PCC receives
          a set of computed paths and starts to setup the LSPs. For each LSP, it
          MAY send an LSP State Report carried on a PCRpt message to the PCE,
          indicating that the LSP's status is "Going-up".</t>

          <t>Once an LSP is up or active, the PCC
      MUST send an LSP State Report carried on a
          PCRpt message to the PCE, indicating that the LSP's status is 'Up' or
      'Active' respectively. If the LSP could not be set up, the PCC
      MUST send an LSP State Report
          indicating that the LSP is "Down' and stating the cause of the
          failure. Note that due to timing constraints, the LSP status may
          change from 'Going-up' to 'Up' (or 'Down') before the PCC has had a
          chance to send an LSP State Report indicating that the status is
          'Going-up'. In such cases, the PCC MAY choose to only send the PCRpt
          indicating the latest status ('Active', 'Up' or 'Down').</t>

          <t>Upon receiving a negative reply from a PCE, a PCC MAY
          resend a modified request or take any other appropriate action. For
          each requested LSP, it SHOULD also send an LSP State Report carried on a
          PCRpt message to the PCE, indicating that the LSP's status is
          'Down'.</t>

          <t>There is no direct correlation between PCRep and PCRpt messages.
          For a given LSP, multiple LSP State Reports will follow a single
          PCRep message, as a PCC notifies a PCE of the LSP's state changes.</t>

          <t>A PCC MUST send each LSP State Report to each stateful PCE that is
          connected to the PCC.</t>

          <t>Note that a single PCRpt message MAY contain multiple LSP State
          Reports.</t>

          <t>The passive stateful model for stateful PCEs is
          described in <xref target="RFC4655"/>, Section 6.8.</t>

        </section> <!-- Passive PCE -->

    <section anchor="SWITCH-TO-ACTIVE" title="Switching from Passive Stateful to Active Stateful">

    <t> This section deals with the scenario of an LSP transitioning from a
    passive stateful to an active stateful mode of operation.
    When the LSP has no working path, prior to delegating the LSP, the
    PCC MUST first use the procedure defined in <xref target = "PASSIVE-PCE"/> to
    request the initial path from the PCE. This is required because the action
    of delegating the LSP to a PCE using a PCRpt message is not an explicit
    request to the PCE to compute a path for the LSP. The only explicit way for a
    PCC to request a path from PCE is to send a PCReq message. The PCRpt message
    MUST NOT be used by the PCC to attempt to request a path from the PCE.
    </t>

    <t>
    When the LSP is delegated after its setup, it may be useful for the PCC
    to communicate to the PCE the locally configured intended configuration parameters,
    so that the PCE may reuse them in its computations. Such
    parameters MAY be acquired through an out of band channel, or MAY be
    communicated in the PCRpt message delegating the LSPs, by including them
    as part of the intented-attribute-list as explained in <xref target="PCRpt"/>.
    An implementation MAY allow policies on the PCC to determine the configuration
    parameters to be sent to the PCE.
    </t>

      </section> <!--- Switching to active -->


        <section anchor="ACTIVE-PCE" title="Active Stateful PCE LSP Update">
          <figure anchor="active-pce-figure" title="Active Stateful PCE">
            <artwork><![CDATA[
                  +-+-+                    +-+-+
                  |PCC|                    |PCE|
                  +-+-+                    +-+-+
                    |                        |
1) LSP State        |-- PCRpt, Delegate=1 -->|
   Synchronization  |            .           |
                    |            .           |2) PCE decides to
                    |            .           |   update the LSP
                    |                        |
                    |<---- PCUpd message ----|3) PCUpd message sent
                    |                        |   to PCC
                    |                        |
                    |                        |
4) LSP State Report |---- PCRpt message ---->|
   sent(->Going-up) |            .           |
                    |            .           |
                    |            .           |
5) LSP State Report |---- PCRpt message ---->|
   sent (->Up|Down) |                        |
                    |                        |
            ]]></artwork>
          </figure>

          <t>Once a PCC has successfully established a PCEP session with an
          active stateful PCE, the PCC's LSP state is synchronized with the PCE
          (i.e. the PCE knows about all PCC's existing LSPs). After LSPs have been
          delegated to the PCE, the PCE can modify LSP parameters of delegated
          LSPs.</t>

          <t>To update an LSP, a PCE MUST send the PCC an LSP Update Request using
      a PCUpd message. The LSP Update Request contains a variety of objects
      that specify
          the set of constraints and attributes for the LSP's path. Each LSP
          Update Request MUST have a unique identifier, the SRP-ID-number, carried in
          the SRP (Stateful PCE Request Parameters) Object described in <xref
          target="SRP-Object-Format"/>.  The SRP-ID-number is used to correlate
          errors and state reports to LSP Update Requests. A single PCUpd
          message MAY contain multiple LSP Update Requests.</t>

          <t>Upon receiving a PCUpd message the PCC starts to setup LSPs
          specified in LSP Update Requests carried in the message. For each LSP,
          it MAY send an LSP State Report carried on a PCRpt message to the PCE,
          indicating that the LSP's status is 'Going-up'.
      If the PCC decides that
          the LSP parameters proposed in the PCUpd message are unacceptable, it
          MUST report this error by including the LSP-ERROR-CODE TLV (<xref
          target="LSP-err-code-tlv"/>) with LSP error-value="Unacceptable
          parameters" in the LSP object in the PCRpt message to the PCE. Based
          on local policy, it MAY react further to this error by revoking the
          delegation. If the PCC receives a PCUpd message for an LSP object
          identified with a PLSP-ID that does not exist on the PCC, it MUST
          generate a PCErr with error-type 19 (Invalid Operation), error-value 3,
      (Attempted LSP Update Request for an LSP identified by an unknown PSP-ID)
          (see <xref target="PCEP-Error-Object"/>).
          </t>

          <t>Once an LSP is up, the PCC MUST send an LSP State Report (PCRpt
          message) to the PCE, indicating that the LSP's status is 'Up'. If the
          LSP could not be set up, the PCC MUST send an LSP State Report
      indicating
          that the LSP is 'Down' and stating the cause of the failure. A PCC MAY
          compress LSP State Reports to only reflect the most up to
          date state, as discussed in the previous section.</t>

          <t>A PCC MUST send each LSP State Report to each stateful PCE that is
          connected to the PCC.</t>

          <t> PCErr and PCRpt messages triggered as a result of a PCUpd message
          MUST include the SRP-ID-number from the PCUpd. This provides
          correlation of requests and errors and acknowledgement of state
          processing.  The PCC MAY compress state when processing
          PCUpd. In this case, receipt of a higher SRP-ID-number implicitly
          acknowledges processing all the updates with lower SRP-ID-number
      for the specific LSP (as per <xref
          target="SRP-Object-Format"/>). </t>

          <t>A PCC MUST NOT send to any PCE a Path Computation Request for a
          delegated LSP. Should the PCC decide it wants to issue a Path
          Computation Request on a delegated LSP, it MUST perform Delegation
          Revocation procedure first. </t>
        </section> <!-- Active PCE -->
      </section> <!-- LSP operations -->

      <section anchor="LSP-Protection" title="LSP Protection">
        <t> LSP protection and interaction with stateful PCE, as well as the
        extensions necessary to implement this functionality will be discussed
        in a separate document. </t>
      </section> <!-- LSP protection -->

      <section anchor="PCEP-sessions" title="PCEP Sessions">
        <t>A permanent PCEP session MUST be established between a stateful PCE
        and the PCC. In the case of session failure, session reestablishment
        MUST be re-attempted per the procedures defined in <xref
        target="RFC5440"/>. </t>
      </section> <!-- Transport -->
    </section>

    <section anchor="Messages" title="PCEP Messages">
      <t>As defined in <xref target="RFC5440"/>, a PCEP message consists of a
      common header followed by a variable-length body made of a set of objects.
      For each PCEP message type, a set of rules
      is defined that specify the set of objects that the message can carry.</t>

      <section anchor="PCRpt" title="The PCRpt Message">
        <t>A Path Computation LSP State Report message (also referred to as
        PCRpt message) is a PCEP message sent by a PCC to a PCE to report the
        current state of an LSP. A PCRpt message can carry more than one LSP
        State Reports. A PCC can send an LSP State Report either in response to
        an LSP Update Request from a PCE, or asynchronously when the state of an
        LSP changes. The Message-Type field of the PCEP common header for the
        PCRpt message is 10.</t>

        <t>The format of the PCRpt message is as follows:</t>
        <figure>
          <artwork><![CDATA[
   <PCRpt Message> ::= <Common Header>
                       <state-report-list>
Where:

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

   <state-report> ::= [<SRP>]
                      <LSP>
                      <path>
 Where:
   <path>::= <intended-path>
             [<actual-attribute-list><actual-path>]
             <intended-attribute-list>

   <actual-attribute-list>::=[<BANDWIDTH>]
                             [<metric-list>]

Where:
   <intended-path> is represented by the ERO object defined in
   section 7.9 of [RFC5440].
   <actual-attribute-list> consists of the actual computed and
   signaled values of the <BANDWIDTH> and <metric-lists> objects
   defined in [RFC5440].
   <actual-path> is represented by the RRO object defined in
   section 7.10 of [RFC5440].
   <intended-attribute-list> is the attribute-list defined in
   section 6.5 of [RFC5440] and extended by PCEP extensions.
          ]]></artwork>
        </figure>

        <t>The SRP object (see <xref target="SRP-Object-Format"/>) is OPTIONAL.
        If the PCRpt message is not in response to a PCupd message, the SRP object MAY
        be omitted. When the PCC does not include the SRP object, the PCE MUST treat
        this as an SRP object with an SRP-ID-number equal to the reserved value 0x00000000.
        The reserved value 0x00000000 indicates that the state reported is not as a result
        of processing a PCUpd message.</t>

        <t>If the PCRpt message is in response to a PCUpd message, the SRP
        object MUST be included and the value of the SRP-ID-number in
        the SRP Object MUST be the same as that sent in the PCUpd message that
        triggered the state that is reported. If the PCC compressed several PCUpd
        messages for the same LSP by only processing the one with the highest
    number, then it should
        use the SRP-ID-number of that request.  No state compression is allowed for
        state reporting, e.g. PCRpt messages MUST NOT be pruned from the PCC's
        egress queue even if subsequent operations on the same LSP have been
        completed before the PCRpt message has been sent to the TCP stack. The PCC
        MUST explicitly report state changes (including removal) for paths it
        manages.</t>

        <t>The LSP object (see <xref target="LSP-Object-Format"/>) is REQUIRED,
        and it MUST be included in each LSP State Report on the PCRpt message.
        If the LSP object is missing, the receiving PCE MUST send a PCErr
        message with Error-type=6 (Mandatory Object missing) and
        Error-value 8 (LSP object missing).</t>

        <t>If the LSP transitioned to non-operational state, the PCC SHOULD
        include the LSP-ERROR-TLV (<xref target="LSP-err-code-tlv"/>) with the
        relevant LSP Error Code to report the error to the PCE. </t>

    <t> The intended path, represented by the ERO object,
    is REQUIRED. If the
    ERO object is missing, the  receiving PCE MUST send a PCErr
        message with Error-type=6 (Mandatory Object missing) and
        Error-value 9 (ERO object missing).
    The ERO may be empty if the PCE does not have a path for
        a delegated LSP.
        </t>

        <t>The actual path, represented by the RRO object,
    SHOULD be included in PCRpt by the PCC when the
    path is up or active, but MAY be
        omitted if the path is down due to a signaling error or another
    failure. </t>

    <t> The intended-attribute-list maps to the attribute-list in
    Section 6.5 of <xref target="RFC5440"/> and is used to convey the
    requested parameters of the LSP path. This is needed in order to
    support the switch from passive to active stateful PCE as described
    in  <xref target = "SWITCH-TO-ACTIVE"/>. When included as part of
    the intended-attribute-list, the meaning of the BANDWIDTH object
    is the requested bandwidth as intended by
    the operator. In this case, the BANDWIDTH Object-Type of 1 SHOULD
    be used. Similarly, to indicate a limiting constraint, the METRIC object
    SHOULD be included as part of the intended-attribute-list with the B flag
    set and with a specific metric value. To indicate the optimization metric,
    the METRIC object SHOULD be included as part of the intended-attribute-list
    with the B flag unset and the metric value set to zero. Note that the
    intended-attribute-list is optional and thus may be omitted. In this
    case, the PCE MAY use the values in the actual-attribute-list as the
    requested parameters for the path.
    </t>

    <t>The actual-attribute-list consists of the actual computed and signaled
    values of the BANDWIDTH and METRIC objects defined in [RFC5440].
    When included as part of the actual-attribute-list,
    Object-Type 2 (<xref target="RFC5440"/>) SHOULD be used for the BANDWIDTH
    object and the C flag SHOULD be set in the METRIC object
    (<xref target="RFC5440"/>).
     </t>

    <t> A PCE may choose to implement a limit on the resources a single
    PCC can occupy.
    If a PCRpt is received that causes the PCE to exceed this limit,
    the PCE
    MUST notify the PCC using a PCNtf message with Notification Type 4
    (Stateful PCE resource limit exceeded) and Notification
    Value 1 (Entering resource limit exceeded state) and MUST
    terminate the session. </t>

      </section> <!-- PCRpt message -->

      <section anchor="PCUpd" title="The PCUpd Message">
        <t>A Path Computation LSP Update Request message (also referred to as
        PCUpd message) is a PCEP message sent by a PCE to a PCC to update
        attributes of an LSP. A PCUpd message can carry more than one LSP Update
        Request. The Message-Type field of the PCEP common header for the PCUpd
        message is 11.</t>

        <t>The format of a PCUpd message is as follows:</t>
        <figure>
          <artwork><![CDATA[
   <PCUpd Message> ::= <Common Header>
                       <update-request-list>
Where:

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

   <update-request> ::= <SRP>
                        <LSP>
                        <path>
Where:
   <path>::= <intended-path><intended-attribute-list>

Where:
   <intended-path> is represented by the ERO object defined in
   section 7.9 of [RFC5440].
   <intended-attribute-list> is the attribute-list defined in [RFC5440]
   and extended by PCEP extensions.
          ]]></artwork>
        </figure>

        <t>There are three mandatory objects that MUST be included within each
        LSP Update Request in the PCUpd message: the SRP Object (see <xref
        target="SRP-Object-Format"/>), the LSP object (see <xref
        target="LSP-Object-Format"/>) and the ERO object (as defined in <xref
        target="RFC5440"/>, which represents the intended path.
    If the SRP object is missing, the receiving PCC MUST
        send a PCErr message with Error-type=6 (Mandatory Object missing) and
        Error-value=10 (SRP object missing). If the LSP object is missing,
        the receiving PCC MUST send a PCErr message with Error-type=6 (Mandatory
        Object missing) and Error-value=8 (LSP object missing). If the ERO
        object is missing, the receiving PCC MUST send a PCErr message with
        Error-type=6 (Mandatory Object missing) and Error-value=9 (ERO
        object missing).
        </t>

    <t> The ERO in the PCUpd may be empty if the PCE cannot find a
    valid path for a delegated LSP. One typical situation resulting
    in this empty ERO carried in the PCUpd message is that a PCE
    can no longer find a strict SRLG-disjoint path for a delegated
    LSP after a link failure. The PCC SHOULD implement a local
    policy to decide the appropriate action to be taken:
    either tear down the LSP, or revoke the delegation and use
    a locally computed path, or keep the existing LSP. </t>

        <t>A PCC only acts on an LSP Update Request if permitted by the local
        policy configured by the network manager.  Each LSP Update Request
        that the PCC acts on results in an LSP setup operation.
        An LSP Update Request MUST contain all LSP parameters that a PCE
        wishes to be set for the LSP. A PCC MAY set missing parameters from locally
        configured defaults. If the LSP specified in the Update Request is already
        up, it will be re-signaled. </t>

        <t> The PCC SHOULD minimize the traffic interruption, and MAY
        use the make-before-break procedures described in
        <xref target="RFC3209"/> in order to achieve this goal. If the
        make-before-break procedures are used,
        two paths will briefly co-exist. The PCC MUST send separate
        PCRpt messages for each, identified by the LSP-IDENTIFIERS TLV. When the
        old path is torn down after the head end switches over the traffic, this
        event MUST be reported by sending a PCRpt message with the
        LSP-IDENTIFIERS-TLV of the old path and the R bit set. The SRP-ID-number
        that the PCC associates with this PCRpt MUST be 0x00000000. Thus, a
        make-before-break operation will typically result in at least two PCRpt
        messages, one for the new path and one for the removal of the old path
        (more messages may be possible if intermediate states are reported).
        </t>

    <t>If the path setup fails due to an RSVP signaling error, the error is reported
    to the PCE. The PCC will not attempt to resignal the path until it is
        prompted again by the PCE with a subsequent PCUpd message.</t>

        <t>A PCC MUST respond with an LSP State Report to each LSP Update
        Request it processed to indicate the resulting state of the LSP in the
        network (even if this processing did not result in changing the state of
        the LSP).  The SRP-ID-number included in the PCRpt MUST match that in
        the PCUpd. A PCC MAY respond with multiple LSP State Reports to report
        LSP setup progress of a single LSP. In that case, the SRP-ID-number MUST
        be included for the first message, for subsequent messages the
        reserved value 0x00000000 SHOULD be used.</t>

        <t>Note that a PCC MUST process all LSP Update Requests - for example,
        an LSP Update Request is sent when a PCE returns delegation or puts an
        LSP into non-operational state. The protocol relies on TCP for
        message-level flow control.</t>

        <t>If the rate of PCUpd messages sent to a PCC for the same target LSP
        exceeds the rate at which the PCC can signal LSPs into the network, the
        PCC MAY perform state compression on its ingress queue. The compression
        algorithm is based on the fact that each PCUpd request contains the complete
        LSP state the PCE wishes to be set and works as follows: when the PCC
        starts processing a PCUpd message at the head of its ingress queue, it may
        search the queue forward for more recent PCUpd messages pertaining that
        particular LSP, prune all but the latest one from the queue and process
        only the last one as that request contains the most up-to-date desired state
        for the LSP. The PCC MUST NOT send PCRpt nor PCErr messages for requests
        which were pruned from the queue in this way. This compression step may be
        performed only while the LSP is not being signaled, e.g. if two PCUpd arrive
        for the same LSP in quick succession and the PCC started the signaling of
        the changes relevant to the first PCUpd, then it MUST wait until the
        signaling finishes (and report the new state via a PCRpt) before attempting
        to apply the changes indicated in the second PCUpd.</t>

        <t>Note also that it is up to the PCE to handle inter-LSP dependencies;
        for example, if ordering of LSP set-ups is required, the PCE has to wait
        for an LSP State Report for a previous LSP before starting the update of
        the next LSP.</t>

    <t>If the PCUpd cannot be satisfied (for example due to
        unsupported object or TLV), the PCC MUST respond with a PCErr
        message indicating the failure (see <xref target="LSP-err-code-tlv"/>).</t>
      </section> <!-- PCUpd message -->

      <section anchor="PCErr" title="The PCErr Message">
        <t> If the stateful PCE capability has been advertised on the PCEP
        session, the PCErr message MAY include the SRP object. If the error
        reported is the result of an LSP update request, then the SRP-ID-number
        MUST be the one from the PCUpd that triggered the error.  If the error is
        unsolicited, the SRP object MAY be omitted. This is equivalent to including
        an SRP object with SRP-ID-number equal to the reserved value 0x00000000. </t>

       <t>The format of a PCErr message from <xref target="RFC5440"/> is extended as follows:</t>
        <figure>
          <artwork><![CDATA[
   <PCErr Message> ::= <Common Header>
                     ( <error-obj-list> [<Open>] ) | <error>
                     [<error-list>]

   <error-obj-list>::=<PCEP-ERROR>[<error-obj-list>]

   <error>::=[<request-id-list> | <stateful-request-id-list>]
              <error-obj-list>

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

   <stateful-request-id-list>::=<SRP>[<stateful-request-id-list>]

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

          ]]></artwork>
        </figure>
      </section> <!--PCErr message -->

      <section anchor="PCReq" title="The PCReq Message">
        <t>A PCC MAY include the LSP object in the PCReq message (see <xref
        target="LSP-Object-Format"/>) if the stateful PCE capability has been
        negotiated on a PCEP session between the PCC and a PCE.
        </t>
        <t>
          The definition of the PCReq message from <xref target="RFC5440"/> is extended
          to optionally include the LSP object after the END-POINTS object. The encoding
          from <xref target="RFC5440"/> will become:</t>
          <figure>
            <artwork><![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>]
            ]]></artwork>
          </figure>
      </section> <!-- PCReq message -->

      <section anchor="PCRep" title="The PCRep Message">
        <t>A PCE MAY include the LSP object in the PCRep message (see (<xref
        target="LSP-Object-Format"/>) if the stateful PCE capability has been
        negotiated on a PCEP session between the PCC and the PCE and the LSP
        object was included in the corresponding PCReq message from the PCC.</t>

        <t>The definition of the PCRep message from <xref target="RFC5440"/>
        is extended to optionally include the LSP object after the RP object.
        The encoding from <xref target="RFC5440"/> will become:</t>

        <figure>
          <artwork><![CDATA[
   <PCRep Message> ::= <Common Header>
                       <response-list>

Where:

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

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

      ]]></artwork>
        </figure>
      </section><!-- PCRep message -->


    </section> <!-- PCEP messages -->

    <section anchor="Object-Formats" title="Object Formats">
      <t>The PCEP objects defined in this document are compliant with the PCEP
      object format defined in <xref target="RFC5440"/>. The P flag and the I
      flag of the PCEP objects defined in the current document MUST be set to 0
      on transmission and SHOULD be ignored on receipt since the P and I
      flags are exclusively related to path computation requests.</t>

      <section anchor="Open-Object-Format" title="OPEN Object">
        <t>This document defines one new optional TLV for use in the OPEN
        Object.</t>

        <section anchor="Capability-TLV" title="Stateful PCE Capability TLV">
          <t>The STATEFUL-PCE-CAPABILITY TLV is an optional TLV for use in the
          OPEN Object for stateful PCE capability advertisement. Its format is
          shown in the following figure:</t>

          <figure anchor="Capability-TLV-Fmt" title="STATEFUL-PCE-CAPABILITY TLV format">
            <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |               Type=16         |            Length=4           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                             Flags                           |U|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
             ]]></artwork>
          </figure>

          <t>The type (16 bits) of the TLV is 16.
      The length field is 16 bit-long and has a fixed value of 4.
      </t>

          <t>The value comprises a single field - Flags (32 bits):

          <list style="hanging">
            <t hangText="U (LSP-UPDATE-CAPABILITY - 1 bit):">if set to 1 by a
            PCC, the U Flag indicates that the PCC allows modification of LSP
            parameters; if set to 1 by a PCE, the U Flag indicates that the PCE
            is capable of updating LSP parameters. The LSP-UPDATE-CAPABILITY
            Flag must be advertised by both a PCC and a PCE for PCUpd messages
            to be allowed on a PCEP session.</t>

          </list>

          Unassigned bits are considered reserved. They MUST be set to 0 on
          transmission and MUST be ignored on receipt. </t>

          <t>A PCEP speaker operating in passive stateful PCE mode advertises
          the stateful PCE capability with the
          U flag set to 0.  A PCEP speaker operating in active stateful PCE mode
          advertises the stateful PCE
          capability with the U Flag set to 1.</t>

          <t> Advertisement of the stateful PCE capability implies support of LSPs
          that are signaled via RSVP, as well as the objects, TLVs and
          procedures defined in this document.
          </t>

        </section> <!-- Capability TLV -->

      </section> <!-- Open object -->

      <section anchor="SRP-Object-Format" title="SRP Object">

        <t> The SRP (Stateful PCE Request Parameters) object MUST be carried
        within PCUpd messages and MAY be carried within PCRpt and
        PCErr messages. The SRP object is used to correlate between update
        requests sent by the PCE and the error reports and state reports sent by
        the PCC. </t>

        <t>SRP Object-Class is 33.</t>

        <t>SRP Object-Type is 1.</t>

        <t>The format of the SRP object body is shown in <xref
        target="SRP-Object-Fmt"/>:</t>

        <figure anchor="SRP-Object-Fmt" title="The SRP Object format">
          <artwork><![CDATA[
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                          Flags                                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        SRP-ID-number                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   //                      Optional TLVs                          //
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

          ]]></artwork>
        </figure>

        <t>The SRP object body has a variable length and may contain additional
        TLVs.</t>

        <t>Flags (32 bits): None defined yet. </t>

        <t>SRP-ID-number (32 bits): The SRP-ID-number value in the scope of the current
        PCEP session uniquely identify the operation
        that the PCE has requested the PCC to perform on a given LSP.  The
        SRP-ID-number is incremented each time a new request is sent to the PCC,
        and may wrap around.</t>

        <t> The values 0x00000000 and 0xFFFFFFFF are reserved.</t>

        <t>Optional TLVs MAY be included within the SRP object body. The
        specification of such TLVs is outside the scope of this document.</t>

        <t> Every request to update an LSP receives a new SRP-ID-number. This
        number is unique per PCEP session and is incremented each time an
        operation is requested from the PCE. Thus, for a given LSP there may be
        more than one SRP-ID-number unacknowledged at a given time. The value of
        the SRP-ID-number is echoed back by the PCC in PCErr and PCRpt messages
        to allow for correlation between requests made by the PCE and errors or
        state reports generated by the PCC. If the error or report were not as a
        result of a PCE operation (for example in the case of a link down
        event), the reserved value of 0x00000000 is used for the SRP-ID-number. The
        absence of the SRP object is equivalent to an SRP object with the reserved value
        of 0x00000000. An SRP-ID-number is considered unacknowledged and cannot be
    reused until a
        PCErr or PCRpt arrives with an SRP-ID-number equal or higher for the
        same LSP.  In case of SRP-ID-number wrapping  the last SRP-ID-number
    before the wrapping
    MUST be explicitly acknowledged, to avoid a situation where SRP-ID-numbers
    remain
    unacknowledged after the wrap. This means that the PCC may need to issue
    two PCUpd messages on detecting a wrap.
    </t>

      </section> <!--SRP object -->

      <section anchor="LSP-Object-Format" title="LSP Object">
        <t>The LSP object MUST be present within PCRpt and PCUpd messages.
        The LSP object MAY be carried within PCReq and PCRep messages if the
        stateful PCE capability has been negotiated on the session.  The LSP
        object contains a set of fields used to specify the target LSP, the
        operation to be performed on the LSP, and LSP Delegation. It also
        contains a flag indicating to a PCE that the LSP state synchronization
        is in progress.  This document focuses on LSPs that are signaled with
        RSVP, many of the TLVs used with the LSP object mirror RSVP state.
        </t>

        <t>LSP Object-Class is 32.</t>

        <t>LSP Object-Type is 1.</t>

        <t>The format of the LSP object body is shown in <xref
        target="LSP-Object-Fmt"/>:</t>

        <figure anchor="LSP-Object-Fmt" title="The LSP Object format">
          <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                PLSP-ID                |    Flag |    O|A|R|S|D|
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  //                        TLVs                                 //
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          ]]></artwork>
        </figure>

        <t>PLSP-ID (20 bits): A PCEP-specific identifier for the LSP.
        A PCC creates a unique
        PLSP-ID for each LSP that is constant for the lifetime of a PCEP
        session. The PCC will advertise the same PLSP-ID on all PCEP sessions it
        maintains at a given times.
    The mapping of the Symbolic Path Name to PLSP-ID is
        communicated to the PCE by sending a PCRpt message containing the
        SYMBOLIC-PATH-NAME TLV. All subsequent PCEP messages then address the
        LSP by the PLSP-ID. The values of 0 and 0xFFFFF are reserved. Note that
        the PLSP-ID is a value that is constant for the lifetime of the PCEP
        session, during which time for an RSVP-signaled LSP there might be a
        different RSVP identifiers (LSP-id, tunnel-id) allocated to it.</t>

        <t>Flags (12 bits), starting from the least significant bit:
        <list style="hanging">
          <t hangText="D (Delegate - 1 bit):"> On a PCRpt message, the D Flag set
          to 1 indicates that the PCC is delegating the LSP to the PCE. On a
          PCUpd message, the D flag set to 1 indicates that the PCE is
          confirming the LSP Delegation. To keep an LSP delegated to the PCE,
          the PCC must set the D flag to 1 on each PCRpt message for the
          duration of the delegation - the first PCRpt with the D flag set to 0
          revokes the delegation. To keep the delegation, the PCE must set the D
          flag to 1 on each PCUpd message for the duration of the delegation -
          the first PCUpd with the D flag set to 0 returns the delegation. </t>

          <t hangText="S (SYNC - 1 bit):"> The S Flag MUST be set to 1 on each
          PCRpt sent from a PCC during State Synchronization. The S
          Flag MUST be set to 0 in other messages sent from the PCC.  When sending
          a PCUpd message, the PCE MUST set the S Flag to 0.</t>

          <t hangText="R(Remove - 1 bit):"> On PCRpt messages the R Flag
          indicates that the LSP has been removed from the PCC and the PCE
          SHOULD remove all state from its database. Upon receiving an LSP State
          Report with the R Flag set to 1 for an RSVP-signaled LSP, the PCE
          SHOULD remove all state for the path identified by the LSP-IDENTIFIERS
          TLV from its database.  When the all-zeros LSP-IDENTIFIERS TLV is
          used, the PCE SHOULD remove all state for the PLSP-ID from its
          database.  When sending a PCUpd message, the PCE MUST set the R Flag
          to 0.</t>

          <t hangText="A(Administrative - 1 bit):"> On PCRpt messages, the A
          Flag indicates the PCC's target operational status for this LSP. On
          PCUpd messages, the A Flag indicates the LSP status that the PCE
          desires for this LSP. In both cases, a value of '1' means that the
          desired operational state is active, and a value of '0' means that the
          desired operational state is inactive. A PCC ignores the A flag on a
          PCUpd message unless the operator's policy allows the PCE to control
          the corresponding LSP's administrative state. </t>

          <t hangText="O(Operational - 3 bits):"> On PCRpt messages, the O Field
          represents the operational status of the LSP.</t>

          <t> The following values are defined:

          <list style="hanging">
            <t hangText="0 - DOWN:"> not active.</t>
            <t hangText="1 - UP:"> signalled.</t>
            <t hangText="2 - ACTIVE:"> up and carrying traffic. </t>
            <t hangText="3 - GOING-DOWN:"> LSP is being torn down, resources are
            being released.</t>
            <t hangText="4 - GOING-UP:"> LSP is being signalled.</t>
            <t hangText="5-7 - Reserved:"> these values are reserved for future use. </t>
          </list>
          </t>
        </list>
        Unassigned bits are considered reserved. They MUST be set to 0 on
        transmission and MUST be ignored on receipt.
        When sending a PCUpd message, the PCE MUST set the O Field to 0.
        </t>

        <t>TLVs that may be included in the LSP Object are described
        in the following sections.  Other optional TLVs, that are not defined in
        this document, MAY also be included within the LSP Object body.</t>

        <section anchor="LSP-Identifiers-TLVs" title="LSP-IDENTIFIERS TLVs">

          <t> The LSP-IDENTIFIERS TLV MUST be included in the LSP object in
          PCRpt messages for RSVP-signaled LSPs.  If the TLV is missing, the PCE
          will generate an error with error-type 6 (mandatory object missing)
          and error-value 11 (LSP-IDENTIFIERS TLV missing) and close the
          session.  The LSP-IDENTIFIERS TLV MAY be included in the LSP object in
          PCUpd messages for RSVP-signaled LSPs.  The special value of all zeros
          for this TLV is used to refer to all paths pertaining to a particular
          PLSP-ID.  There are two LSP-IDENTIFIERS TLVs, one for IPv4 and one for
          IPv6.</t>

          <t> It is the responsibility of the PCC to send to the PCE the
          identifiers for each RSVP incarnation of the tunnel. For example, in a
          make-before-break scenario, the PCC MUST send a separate PCRpt for the
          old and for the reoptimized paths, and explicitly report removal of
          any of these paths using the R bit in the LSP object.</t>

          <t>The format of the IPV4-LSP-IDENTIFIERS TLV is shown in the following
          figure:</t>

          <figure anchor="v4LSP-ID-TLV-Fmt" title="IPV4-LSP-IDENTIFIERS TLV format">
            <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |           Type=18             |           Length=16           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                   IPv4 Tunnel Sender Address                  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |             LSP ID            |           Tunnel ID           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Extended Tunnel ID                     |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                   IPv4 Tunnel Endpoint Address                |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
          </figure>

          <t>The type (16 bits) of the TLV is 18.
      The length field is 16 bit-long and has a fixed value of 16.
          The value contains the following fields:

          <list style="hanging">
            <t hangText="IPv4 Tunnel Sender Address:"> contains the sender
            node's IPv4 address, as defined in <xref target="RFC3209"/>, Section
            4.6.2.1 for the LSP_TUNNEL_IPv4 Sender Template Object.</t>

            <t hangText="LSP ID:"> contains the 16-bit 'LSP ID' identifier
            defined in <xref target="RFC3209"/>, Section 4.6.2.1 for the
            LSP_TUNNEL_IPv4 Sender Template Object. A value of 0 MUST be
        used if the LSP is not yet signaled.</t>

            <t hangText="Tunnel ID:"> contains the 16-bit 'Tunnel ID' identifier
            defined in <xref target="RFC3209"/>, Section 4.6.1.1 for the
            LSP_TUNNEL_IPv4 Session Object.</t>

            <t hangText="Extended Tunnel ID:"> contains the 32-bit 'Extended
            Tunnel ID' identifier defined in <xref target="RFC3209"/>, Section
            4.6.1.1 for the LSP_TUNNEL_IPv4 Session Object.</t>

        <t hangText="IPv4 Tunnel Endpoint Address:"> contains the egress
            node's IPv4 address, as defined in <xref target="RFC3209"/>, Section
            4.6.1.1 for the LSP_TUNNEL_IPv4 Sender Template Object.</t>
          </list>
          </t>

          <t>The format of the IPV6-LSP-IDENTIFIERS TLV is shown in the following
          figure:</t>

          <figure anchor="v6LSP-ID-TLV-Fmt" title="IPV6-LSP-IDENTIFIERS TLV format">
            <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |           Type=19             |           Length=52           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  +                                                               +
  |                  IPv6 tunnel sender address                   |
  +                          (16 octets)                          +
  |                                                               |
  +                                                               +
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |             LSP ID            |           Tunnel ID           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  +                                                               +
  |                       Extended Tunnel ID                      |
  +                          (16 octets)                          +
  |                                                               |
  +                                                               +
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  +                                                               +
  |                  IPv6 tunnel endpoint address                 |
  +                          (16 octets)                          +
  |                                                               |
  +                                                               +
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
          </figure>

          <t>The type (16 bits) of the TLV is 19.
      The length field is 16 bit-long and has a fixed value of 52.
          The value contains the following fields:

          <list style="hanging">
            <t hangText="IPv6 Tunnel Sender Address:"> contains the sender
            node's IPv6 address, as defined in <xref target="RFC3209"/>, Section
            4.6.2.2 for the LSP_TUNNEL_IPv6 Sender Template Object.</t>

            <t hangText="LSP ID:"> contains the 16-bit 'LSP ID' identifier
            defined in <xref target="RFC3209"/>, Section 4.6.2.2 for the
            LSP_TUNNEL_IPv6 Sender Template Object. A value of 0 MUST be
        used if the LSP is not yet signaled.</t>

            <t hangText="Tunnel ID:"> contains the 16-bit 'Tunnel ID' identifier
            defined in <xref target="RFC3209"/>, Section 4.6.1.2 for the
            LSP_TUNNEL_IPv6 Session Object.</t>

            <t hangText="Extended Tunnel ID:"> contains the 128-bit 'Extended
            Tunnel ID' identifier defined in <xref target="RFC3209"/>, Section
            4.6.1.2 for the LSP_TUNNEL_IPv6 Session Object.</t>

        <t hangText="IPv6 Tunnel Endpoint Address:"> contains the
        egress node's
        IPv6 address, as defined in <xref target="RFC3209"/>, Section
            4.6.1.2 for the LSP_TUNNEL_IPv6 Session Object.</t>
          </list>
          </t>

      <t>
        The Tunnel ID remains constant over the
            life time of a tunnel.
      </t>

        </section> <!--LSP identifiers TLV -->

        <section anchor="LSP-Symb-Name-TLV" title="Symbolic Path Name TLV">

   <t>Each LSP MUST have a symbolic path name that is unique in the PCC.
   The symbolic path name is a human-readable string that identifies an
   LSP in the network.  The symbolic path name MUST remain constant
   throughout an LSP's lifetime, which may span across multiple
   consecutive PCEP sessions and/or PCC restarts.  The symbolic path
   name MAY be specified by an operator in a PCC's configuration.  If the
   operator does not specify a unique symbolic name for an LSP, then the
   PCC MUST auto-generate one.</t>

   <t>The PCE uses the symbolic path name as a stable identifier for the LSP.
   If the PCEP session restarts, or the PCC restarts, or the PCC re-delegates
   the LSP to a different PCE, the symbolic path name for the LSP remains
   constant and can be used to correlate across the PCEP session instances.</t>

   <t>The other protocol identifiers for the LSP cannot reliably be used to
   identify the LSP across multiple PCEP sessions, for the following reasons.

   <list style="symbols">
      <t>The PLSP-ID is unique only within the scope of a single PCEP session.</t>
      <t>The LSP-IDENTIFIERS TLV is only guaranteed to be present for LSPs
      that are signalled with RSVP-TE, and may change during the lifetime of the LSP.</t>
   </list>
   </t>

   <t>The SYMBOLIC-PATH-NAME TLV MUST be included in the LSP object in the
   LSP State Report (PCRpt) message when during a given PCEP session an
   LSP is first reported to a PCE.  A PCC sends to a PCE the first LSP
   State Report either during State Synchronization, or when a new LSP
   is configured at the PCC.</t>

   <t>The initial PCRpt creates a binding between the symbolic path name and
   the PLSP-ID for the LSP which lasts for the duration of the PCEP session.
   The PCC MAY omit the symbolic path name from subsequent LSP State
   Reports for that LSP on that PCEP session, and just use the PLSP-ID.</t>

          <t>The format of the SYMBOLIC-PATH-NAME TLV is shown in the following
          figure:</t>

          <figure anchor="LSP-Symb-Name-TLV-Fmt" title="SYMBOLIC-PATH-NAME TLV format">
            <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |           Type=17             |       Length (variable)       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  //                      Symbolic Path Name                     //
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
          </figure>

          <t>Type (16 bits): The type is 17.</t>
      <t>Length (16 bits): indicates the total length of the
      TLV in octets and MUST be greater than 0. The TLV MUST
      be zero-padded so that the TLV is 4-octet aligned. </t>
      <t>Symbolic Path Name (variable): symbolic name for the LSP, unique in
      the PCC.  It SHOULD be a string of printable ASCII characters and SHOULD
      be NULL-terminated.  The Symbolic Path Name (including its NULL
      terminator) MUST be padded to 4-bytes alignment; the padding itself
      MUST NOT be included in the Length field.</t>

        </section> <!--LSP symbolic name -->

        <section anchor="LSP-err-code-tlv" title="LSP Error Code TLV">

          <t>The LSP Error code TLV is an optional TLV for use in the LSP object
          to convey error information. When an LSP Update Request fails, an LSP
          State Report MUST be sent to report the current state of the LSP, and
          SHOULD contain the LSP-ERROR-CODE TLV indicating the reason for the
          failure.  Similarly, when a PCRpt is sent as a result of an LSP
          transitioning to non-operational state, the LSP-ERROR-CODE TLV SHOULD
          be included to indicate the reason for the transition. </t>

          <t>The format of the LSP-ERROR-CODE TLV is shown in the following
          figure:</t>

          <figure anchor="LSP-Err-Code-TLV-Fmt" title="LSP-ERROR-CODE TLV format">
            <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |           Type=20             |            Length=4           |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                          LSP Error Code                       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
          </figure>

          <t>The type (16 bits) of the TLV is 20.
          The length field is 16 bit-long and has a fixed value of 4.
          The value contains an error code
          that indicates the cause of the failure. </t>

          <t> The following LSP Error Codes are currently defined: </t>
          <texttable anchor="LSP-ERROR-TLV-CP-values" style="none" suppress-title="true">
            <ttcol align="center" width='20%'>Value</ttcol>
            <ttcol align="left" width='40%'>Meaning </ttcol>

            <c>1</c><c>&nbsp;Unknown reason </c>
            <c>2</c><c>&nbsp;Limit reached for PCE-controlled LSPs</c>
            <c>3</c><c>&nbsp;Too many pending LSP update requests</c>
            <c>4</c><c>&nbsp;Unacceptable parameters</c>
            <c>5</c><c>&nbsp;Internal error</c>
            <c>6</c><c>&nbsp;LSP administratively brought down</c>
            <c>7</c><c>&nbsp;LSP preempted</c>
            <c>8</c><c>&nbsp;RSVP signaling error</c>
          </texttable>
        </section> <!-- LSP error code TLV -->

        <section anchor="ERROR_SPEC" title="RSVP Error Spec TLV">

          <t>The RSVP-ERROR-SPEC TLV is an optional TLV for use in the LSP
          object to carry RSVP error information. It includes the RSVP
          ERROR_SPEC or USER_ERROR_SPEC Object (<xref target="RFC2205"/> and
          <xref target="RFC5284"/>) which were returned to the PCC from a
          downstream node. If the set up of an LSP fails at a downstream node
          which returned an ERROR_SPEC to the PCC, the PCC SHOULD include in the
          PCRpt for this LSP the LSP-ERROR-CODE TLV with LSP Error Code = "RSVP
          signaling error" and the RSVP-ERROR-SPEC TLV with the relevant RSVP
          ERROR-SPEC or USER_ERROR_SPEC Object.
          </t>

          <t>The format of the RSVP-ERROR-SPEC TLV is shown in the following
          figure:</t>

          <figure anchor="RSVP_ERROR_SPEC-Fmt" title="RSVP-ERROR-SPEC TLV format">
            <artwork><![CDATA[
   0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |           Type=21             |            Length (variable)  |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                                                               |
  +                RSVP ERROR_SPEC or USER_ERROR_SPEC Object      +
  |                                                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]></artwork>
          </figure>

          <t>Type (16 bits): The type is 21.</t>
      <t>Length (16 bits): indicates the total length of the
      TLV in octets. The TLV MUST be zero-padded so that the
      TLV is 4-octet aligned.</t>
      <t>Value (variable): contains the
      RSVP ERROR_SPEC or USER_ERROR_SPEC Object: as specified in
      [RFC2205] and [RFC5284], including the object header. </t>

        </section> <!--RSVP error spec TLV -->

      </section> <!-- LSP object -->

    </section> <!--Object formats -->

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requests IANA actions to allocate code points for the
      protocol elements defined in this document.</t>

      <section anchor="PCE-disco-IANA"
           title="PCE Capabilities in IGP Advertisements">
    <t>
    IANA is requested to confirm the early allocation of the following bits in the OSPF
    Parameters "PCE Capability Flags" registry, and to update the reference in the
    registry to point to this document, when it is an RFC:
    </t>

      <texttable anchor="PCE-cap-flags-values" style="none" suppress-title="true">
            <ttcol align="center" width='20%'>Bit</ttcol>
            <ttcol align="left" width='30%'>Meaning </ttcol>
        <ttcol align="left" width='50%'>Reference </ttcol>
            <c>11</c><c>&nbsp;Active Stateful PCE capability</c><c>This document</c>
            <c>12</c><c>&nbsp;Passive Stateful PCE capability</c><c>This document</c>
          </texttable>

      </section>

      <section anchor="PCEP-Msg-Codepoints" title="PCEP Messages">
    <t>IANA is requested to confirm the early allocation of the following message types
    within the "PCEP Messages" sub-registry of the PCEP Numbers registry,
    and to update the reference in the
    registry to point to this document, when it is an RFC:
    </t>

        <texttable anchor="PCEP-New-Msg-CP" style="none" suppress-title="true">
          <ttcol align="center" width='20%'>Value</ttcol>
          <ttcol align="left" width='30%'>Meaning </ttcol>
          <ttcol align="left" width='50%'>Reference </ttcol>
          <c>10</c><c>&nbsp;Report</c><c>This document</c>
          <c>11</c><c>&nbsp;Update</c><c>This document</c>
        </texttable>
      </section> <!-- PCEP messages -->

      <section anchor="PCEP-Object-Codepoints" title="PCEP Objects">
        <t>IANA is requested to confirm the early allocation of the following object-class values
    and object types within the "PCEP Objects" sub-registry
    of the PCEP Numbers registry, and to update the reference in the
    registry to point to this document, when it is an RFC:.
    </t>

        <texttable anchor="Object-Code-Points" style="none" suppress-title="true">
          <ttcol align="center">Object-Class Value &nbsp;</ttcol>
          <ttcol align="left" width='50%'>Name </ttcol>
          <ttcol align="left">Reference </ttcol>
          <c></c><c>&nbsp;&nbsp;&nbsp;&nbsp;</c><c></c>
          <c>32</c><c>LSP</c><c>This document</c>
          <c></c><c>Object-Type</c><c></c>
          <c></c><c>&nbsp;&nbsp;&nbsp;&nbsp;1</c><c></c>
          <c>33</c><c>SRP</c><c>This document</c>
          <c></c><c>Object-Type</c><c></c>
          <c></c><c>&nbsp;&nbsp;&nbsp;&nbsp;1</c><c></c>
        </texttable>
      </section> <!-- PCEP code points -->

      <section anchor="LSP-Object-CP" title="LSP Object">
        <t>This document requests that a new sub-registry, named
    "LSP Object Flag Field", is created within the "Path Computation
    Element Protocol (PCEP) Numbers" registry to manage the Flag
    field of the LSP object. New values are to be assigned by Standards
        Action <xref target="RFC5226"/>. Each bit should be tracked with the
        following qualities:
        <list style="symbols">
          <t>Bit number (counting from bit 0 as the most significant bit)</t>
          <t>Capability description</t>
          <t>Defining RFC</t>
        </list>
        </t>

        <t>The following values are defined in this document:</t>

        <texttable anchor="LSP-Object-Flags" style="none" suppress-title="true">
          <ttcol align="center" width='15%'>Bit</ttcol>
          <ttcol align="left" width='30%'>Description </ttcol>
          <ttcol align="left" width='55%'>Reference </ttcol>
          <c></c><c>&nbsp;</c><c></c>
      <c>0-4</c><c>Reserved</c><c>This document</c>
          <c>5-7</c><c>Operational (3 bits)</c><c>This document</c>
          <c>8</c><c>Administrative</c><c>This document</c>
          <c>9</c><c>Remove</c><c>This document</c>
          <c>10</c><c>SYNC</c><c>This document</c>
          <c>11</c><c>Delegate</c><c>This document</c>
        </texttable>
      </section> <!-- LSP object code point -->

      <section anchor="PCEP-Error-Object" title="PCEP-Error Object">
        <t>
        IANA is requested to confirm the early allocation of the following Error Types
        and Error Values within the "PCEP-ERROR Object Error Types and Values"
        sub-registry of the PCEP Numbers registry, and to update the reference in the
        registry to point to this document, when it is an RFC:

        <vspace blankLines="1" />

        <?rfc subcompact="yes"?>
        <list style="hanging" hangIndent="13">

          <t hangText=" Error-Type">Meaning</t>

          <t hangText="    6">Mandatory Object missing
          <list style="hanging" hangIndent="17">
            <t hangText=" Error-value=8:">LSP Object missing</t>
            <t hangText=" Error-value=9:">ERO Object missing</t>
            <t hangText=" Error-value=10:">SRP Object missing</t>
            <t hangText=" Error-value=11:">LSP-IDENTIFIERS TLV missing</t>
          </list>
          </t>

          <t hangText="    19">Invalid Operation
          <list style="hanging" hangIndent="17">
            <t hangText=" Error-value=1:">Attempted LSP Update Request for a
            non-delegated LSP. The PCEP-ERROR Object is followed by the LSP
            Object that identifies the LSP.</t>

            <t hangText=" Error-value=2:">Attempted LSP Update Request if the
            stateful PCE capability was not advertised.</t>

            <t hangText=" Error-value=3:">Attempted LSP Update Request for an
            LSP identified by an unknown PLSP-ID.</t>

            <t hangText=" Error-value=5:">Attempted LSP State Report if
            stateful PCE capability was not advertised.</t>

          </list>
          </t>

          <t hangText="    20">LSP State synchronization error.
          <list style="hanging" hangIndent="17">
            <t hangText=" Error-value=1:">A PCE indicates to a PCC that it can
            not process (an otherwise valid) LSP State Report.  The PCEP-ERROR
            Object is followed by the LSP Object that identifies the LSP.</t>

            <t hangText=" Error-value=5:">A PCC indicates to a PCE that it can
            not complete the state synchronization,</t>

          </list>
          </t>
        </list>

        </t>
      </section> <!--PCEP error object -->

  <section anchor="PCEP-PCNTF" title="Notification Object">

    <t>IANA is requested to confirm the early allocation of the following Notification Types and
    Notification Values within the "Notification Object"
    sub-registry of the PCEP Numbers registry, and to update the reference in the
    registry to point to this document, when it is an RFC:

 <vspace blankLines="1" />

        <?rfc subcompact="yes"?>
        <list style="hanging" hangIndent="13">

          <t hangText=" Notification-Type">Meaning</t>

          <t hangText="    4">Stateful PCE resource limit exceeded
          <list style="hanging" hangIndent="25">
            <t hangText=" Notification-value=1:">Entering resource limit exceeded state</t>
          </list>
          </t>
    </list>

    Note to IANA: the early allocation included an additional Notification value 2
    for "Exiting resource limit exceeded state".  This Notification value is no
    longer required.
    </t>

  </section>

      <section anchor="PCEP-TLV-Type-Indicators" title="PCEP TLV Type Indicators">
        <t>IANA is requested to confirm the early allocation of the following TLV Type Indicator
    values within the "PCEP TLV Type Indicators" sub-registry
    of the PCEP Numbers registry, and to update the reference in the
    registry to point to this document, when it is an RFC:</t>

        <texttable anchor="PCEP-New-TLV-CP" style="none" suppress-title="true">
          <ttcol align="center" width='20%'>Value</ttcol>
          <ttcol align="left" width='40%'>Meaning </ttcol>
          <ttcol align="left" width='40%'>Reference </ttcol>
          <c>16</c><c>&nbsp;STATEFUL-PCE-CAPABILITY</c><c>This document</c>
          <c>17</c><c>&nbsp;SYMBOLIC-PATH-NAME</c><c>This document</c>
          <c>18</c><c>&nbsp;IPV4-LSP-IDENTIFIERS</c><c>This document</c>
          <c>19</c><c>&nbsp;IPV6-LSP-IDENTIFIERS</c><c>This document</c>
          <c>20</c><c>&nbsp;LSP-ERROR-CODE</c><c>This document</c>
          <c>21</c><c>&nbsp;RSVP-ERROR-SPEC</c><c>This document</c>
        </texttable>
      </section> <!-- PCEP tlv type indicators -->

      <section anchor="STATEFUL-PCE-CAPABILITY-TLV-CP" title="STATEFUL-PCE-CAPABILITY TLV">
        <?rfc subcompact="no"?>
        <t>
    This document requests that a new sub-registry, named
    "STATEFUL-PCE-CAPABILITY TLV Flag Field", is created within the
    "Path Computation Element Protocol (PCEP) Numbers" registry to manage
    the Flag field in the STATEFUL-PCE-CAPABILITY TLV of the PCEP
    OPEN object (class = 1).
    New values
        are to be assigned by Standards Action <xref target="RFC5226"/>. Each
        bit should be tracked with the following qualities:
        <list style="symbols">
          <t>Bit number (counting from bit 0 as the most significant bit)</t>
          <t>Capability description</t>
          <t>Defining RFC</t>
        </list>
        </t>

        <t>The following values are defined in this document:</t>

        <texttable anchor="STATEFUL-PCE-CAPABILITY-TLV-Flags" style="none" suppress-title="true">
          <ttcol align="center" width='15%'>Bit</ttcol>
          <ttcol align="left" width='30%'>Description </ttcol>
          <ttcol align="left" width='55%'>Reference </ttcol>
          <c></c><c>&nbsp;</c><c></c>
          <c>31</c><c>LSP-UPDATE-CAPABILITY</c><c>This document</c>
        </texttable>
      </section> <!--STATEFUL-PCE-CAPABILITY TLV-->

      <section anchor="LSP-ERROR-CODE-TLV-CP" title="LSP-ERROR-CODE TLV">
        <?rfc subcompact="no"?>
        <t>This document requests that a new sub-registry, named
    "LSP-ERROR-CODE TLV Error Code Field", is created within the
    "Path Computation Element Protocol (PCEP) Numbers" registry to
    manage the LSP Error code field of the LSP-ERROR-CODE TLV.
    This field specifies the reason for failure to update the LSP. </t>

    <t>
      New values are to be assigned by Standards Action
      <xref target="RFC5226"/>. Each
      value should be tracked with the following qualities: value,
      description and defining RFC. The following values are defined
         in this document:
    </t>
        <texttable anchor="LSP-ERROR-TLV-CP-values2" style="none" suppress-title="true">
          <ttcol align="center" width='20%'>Value</ttcol>
          <ttcol align="left" width='40%'>Meaning </ttcol>
          <c>1</c><c>&nbsp;Unknown reason </c>
          <c>2</c><c>&nbsp;Limit reached for PCE-controlled LSPs</c>
          <c>3</c><c>&nbsp;Too many pending LSP update requests</c>
          <c>4</c><c>&nbsp;Unacceptable parameters</c>
          <c>5</c><c>&nbsp;Internal error</c>
          <c>6</c><c>&nbsp;LSP administratively brought down</c>
          <c>7</c><c>&nbsp;LSP preempted</c>
          <c>8</c><c>&nbsp;RSVP signaling error</c>
        </texttable>
      </section> <!-- LSP-ERROR-CODE TLV -->

      </section> <!-- IANA -->



    <section anchor="Manageability" title="Manageability Considerations">
      <t>All manageability requirements and considerations listed in <xref
      target="RFC5440"/> apply to PCEP extensions defined in this
      document. In addition, requirements and considerations listed in this
      section apply.</t>

      <section anchor="Ctl-Function-Policy" title="Control Function and Policy">
        <t>In addition to configuring specific PCEP session parameters, as
        specified in <xref target="RFC5440"/>, Section 8.1, a PCE or PCC
        implementation MUST allow configuring the stateful PCEP capability and
        the LSP Update capability. A PCC implementation SHOULD allow the
        operator to specify multiple candidate PCEs for and a delegation
        preference for each candidate PCE. A PCC SHOULD allow the operator to
        specify an LSP delegation policy where LSPs are delegated to the
        most-preferred online PCE. A PCC MAY allow the operator to specify
        different LSP delegation policies.</t>

        <t>A PCC implementation which allows concurrent connections to multiple
        PCEs SHOULD allow the operator to group the PCEs by administrative
        domains and it MUST NOT advertise LSP existence and state to a PCE if the
        LSP is delegated to a PCE in a different group.</t>

        <t>A PCC implementation SHOULD allow the operator to specify whether the
        PCC will advertise LSP existence and state for LSPs that are not
        controlled by any PCE (for example, LSPs that are statically configured
        at the PCC).</t>

        <t>A PCC implementation SHOULD allow the operator to specify both the
        Redelegation Timeout Interval and the State Timeout Interval. The
        default value of the Redelegation Timeout Interval SHOULD be set to 30
        seconds. An operator MAY also configure a policy that will dynamically
        adjust the Redelegation Timeout Interval, for example setting it to zero
        when the PCC has an established session to a backup PCE.  The default
        value for the State Timeout Interval SHOULD be set to 60 seconds.
        </t>

        <t>After the expiration of the State Timeout Interval, the LSP reverts
        to operator-defined default parameters. A PCC implementation MUST allow
        the operator to specify the default LSP parameters. To achieve a
        behavior where the LSP retains the parameters set by the PCE until such
        time that the PCC makes a change to them, a State Timeout Interval of
        infinity SHOULD be used. Any changes to LSP parameters SHOULD be done in
        make-before-break fashion. </t>

    <t>LSP Delegation is controlled by operator-defined policies on a PCC.
        LSPs are delegated individually - different LSPs may be delegated to
        different PCEs. An LSP is delegated to at most one PCE at any given
        point in time. A PCC implementation SHOULD support the delegation
    policy, when all PCC's LSPs are delegated
        to a single PCE at any given time.
    Conversely, the policy revoking the delegation
        for all PCC's LSPs SHOULD also be supported.</t>

    <t>A PCC implementation SHOULD allow the operator to specify delegation
        priority for PCEs. This effectively defines the primary PCE and one or
        more backup PCEs to which primary PCE's LSPs can be delegated when the
        primary PCE fails.</t>

        <t>Policies defined for stateful PCEs and PCCs should eventually fit in
        the Policy-Enabled Path Computation Framework defined in <xref
        target="RFC5394"/>, and the framework should be extended to support
        Stateful PCEs.</t>
      </section>

      <section anchor="Information-Data-Models" title="Information and Data Models">
         <t>The PCEP YANG module <xref target='I-D.ietf-pce-pcep-yang'/> should include
         <list style="symbols">
           <t>advertised stateful capabilities and synchronization status per PCEP session</t>
           <t>the delegation status of each configured LSP.</t>
         </list>
         The PCEP MIB <xref target="RFC7420"/> could also be updated to include this information.
         </t>
      </section>

      <section anchor="Liveness-Detect-Monit" title="Liveness Detection and Monitoring">
        <t>PCEP extensions defined in this document do not require any
        new mechanisms beyond those already defined in <xref target="RFC5440"/>,
        Section 8.3.</t>

      </section>

      <section anchor="Verifying-Correct-Operation" title="Verifying Correct Operation">
        <t>Mechanisms defined in <xref target="RFC5440"/>, Section 8.4 also apply
        to PCEP extensions defined in this document. In addition to
        monitoring parameters defined in <xref target="RFC5440"/>, a stateful
        PCC-side PCEP implementation SHOULD provide the following parameters:
        <list style="symbols">
          <t>Total number of LSP updates</t>
          <t>Number of successful LSP updates</t>
          <t>Number of dropped LSP updates</t>
          <t>Number of LSP updates where LSP setup failed</t>
        </list>
        </t>

        <t>A PCC implementation SHOULD provide a command to show for each LSP
        whether it is delegated, and if so, to which PCE.</t>

        <t>A PCC implementation SHOULD allow the operator to manually revoke LSP
        delegation.
        </t>

      </section>

      <section anchor="Other-Protocols" title="Requirements on Other Protocols and Functional Components">
        <t>PCEP extensions defined in this document do not put new
        requirements on other protocols.</t>
      </section>

      <section anchor="Impact-Network-Operation" title="Impact on Network Operation">
        <t>Mechanisms defined in <xref target="RFC5440"/>, Section 8.6 also
        apply to PCEP extensions defined in this document.</t>

        <t>Additionally, a PCEP implementation SHOULD allow a limit to be placed
        on the number of LSPs delegated to the PCE and
        on the rate of PCUpd and PCRpt messages sent by a PCEP speaker and
        processed from a peer. It SHOULD also allow sending a notification when
        a rate threshold is reached.
        </t>

        <t>A PCC implementation SHOULD allow a limit to be placed on the rate of
        LSP Updates to the same LSP to avoid signaling overload discussed in
        <xref target="Malicious-PCE"/>.</t>

      </section>

    </section>

    <section anchor="Security" title="Security Considerations">
      <section anchor="Vulnerability" title="Vulnerability">
        <t>This document defines extensions to PCEP to enable stateful PCEs. The
        nature of these extensions and the delegation of path control to PCEs
        results in more information being available for a hypothetical adversary
        and a number of additional attack surfaces which must be protected.</t>

        <t>The security provisions described in <xref target="RFC5440"/> remain
        applicable to these extensions. However, because the protocol
        modifications outlined in this document allow the PCE to control path
        computation timing and sequence, the PCE defense mechanisms described in
        <xref target="RFC5440"/> section 7.2 are also now applicable to PCC
        security.</t>

        <t>As a general precaution, it is RECOMMENDED that these PCEP extensions
        only be activated on authenticated and encrypted sessions across PCEs
        and PCCs belonging to the same administrative authority, using Transport Layer
        Security (TLS) <xref target="I-D.ietf-pce-pceps"/>, as per the recommendations and
        best current practices in <xref target="RFC7525"/>.</t>

        <t>The following sections identify specific security concerns that may
        result from the PCEP extensions outlined in this document along with
        recommended mechanisms to protect PCEP infrastructure against related
        attacks.</t>

      </section>

      <section anchor="LSP-State-Snooping" title="LSP State Snooping">
        <t>The stateful nature of this extension explicitly requires LSP status
        updates to be sent from PCC to PCE. While this gives the PCE the ability
        to provide more optimal computations to the PCC, it also provides an
        adversary with the opportunity to eavesdrop on decisions made by network
        systems external to PCE. This is especially true if the PCC delegates
        LSPs to multiple PCEs simultaneously.</t>

        <t>Adversaries may gain access to this information by eavesdropping on
        unsecured PCEP sessions, and might then use this information in various
        ways to target or optimize attacks on network infrastructure. For example
        by flexibly countering anti-DDoS measures being taken to protect the
        network, or by determining choke points in the network where the greatest
        harm might be caused.</t>

        <t>PCC implementations which allow concurrent connections to multiple
        PCEs SHOULD allow the operator to group the PCEs by administrative
        domains and they MUST NOT advertise LSP existence and state to a PCE if
        the LSP is delegated to a PCE in a different group.</t>
      </section>

      <section anchor="Malicious-PCE" title="Malicious PCE">
        <t>The LSP delegation mechanism described in this document allows a PCC
        to grant effective control of an LSP to the PCE for the duration of a
        PCEP session. While this enables PCE control of the timing and sequence
        of path computations within and across PCEP sessions, it also introduces
        a new attack vector: an attacker may flood the PCC with PCUpd messages at
        a rate which exceeds either the PCC's ability to process them or the
        network's ability to signal the changes, either by spoofing messages or
        by compromising the PCE itself.</t>

        <t>A PCC is free to revoke an LSP delegation at any time without needing
        any justification. A defending PCC can do this by enqueueing the
        appropriate PCRpt message. As soon as that message is enqueued in the
        session, the PCC is free to drop any incoming PCUpd messages without
        additional processing.</t>
      </section>

      <section anchor="Malicious-PCC" title="Malicious PCC">
        <t>A stateful session also results in an increased attack surface
    by placing
        a requirement for the PCE to keep an LSP state replica for each PCC. It
        is RECOMMENDED that PCE implementations provide a limit on resources a
        single PCC can occupy. A PCE implementing such a limit MUST send a PCNtf
    message with notification-type 4 (Stateful PCE resource limit
    exceeded) and notification-value 1 (Entering resource limit
    exceeded state) upon receiving an LSP state report causing it to
    exceed this threshold.</t>

        <t>Delegation of LSPs can create further strain on PCE resources and a
        PCE implementation MAY preemptively give back delegations if it finds
        itself lacking the resources needed to effectively manage the delegation.
        Since the delegation state is ultimately controlled by the PCC, PCE
        implementations SHOULD provide throttling mechanisms to prevent strain
        created by flaps of either a PCEP session or an LSP delegation.</t>
      </section>

    </section>

  <section anchor="Contributing-authors" title="Contributing Authors">

    <t>
   Xian Zhang<vspace blankLines='0'/>
   Huawei Technology<vspace blankLines='0'/>
   F3-5-B R&amp;D Center<vspace blankLines='0'/>
   Huawei Industrial Base, Bantian, Longgang District<vspace blankLines='0'/>
   Shenzhen, Guangdong  518129<vspace blankLines='0'/>
   P.R.China<vspace blankLines='0'/>
   EMail: zhang.xian@huawei.com<vspace blankLines='0'/>
    </t>

    <t>
   Dhruv Dhody<vspace blankLines='0'/>
   Huawei Technology<vspace blankLines='0'/>
   Leela Palace<vspace blankLines='0'/>
   Bangalore, Karnataka 560008<vspace blankLines='0'/>
   INDIA<vspace blankLines='0'/>
   EMail: dhruv.dhody@huawei.com<vspace blankLines='0'/>
    </t>

  <t>
   Siva Sivabalan<vspace blankLines='0'/>
   Cisco Systems, Inc.<vspace blankLines='0'/>
   2000 Innovation Drive<vspace blankLines='0'/>
   Kanata, Ontario  K2K 3E8<vspace blankLines='0'/>
   Canada<vspace blankLines='0'/>
   EMail: msiva@cisco.com<vspace blankLines='0'/>
    </t>
  </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>We would like to thank Adrian Farrel, Cyril Margaria and Ramon Casellas
      for their contributions to this document.</t>

      <t>We would like to thank Shane Amante, Julien Meuric, Kohei Shiomoto,
      Paul Schultz and Raveendra Torvi for their comments and suggestions.
      Thanks also to Jon Hardwick, Oscar Gonzales
      de Dios, Tomas Janciga, Stefan Kobza, Kexin Tang, Matej Spanik, Jon
      Parker, Marek Zavodsky, Ambrose Kwong, Ashwin Sampath, Calvin Ying,
      Mustapha Aissaoui, Stephane Litkowski and
      Olivier Dugeon for helpful comments and discussions.</t>
    </section>
  </middle>


  <back>
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2205.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3209.xml"?>>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5088.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5089.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5440.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5284.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5511.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8051.xml"?>


    </references>

    <references title="Informative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2702.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3031.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3346.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.3630.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4655.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4657.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5305.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.5394.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.7420.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.7525.xml"?>
      <?rfc include="reference.I-D.ietf-pce-gmpls-pcep-extensions"?>
      <?rfc include="reference.I-D.ietf-pce-stateful-sync-optimizations"?>
      <?rfc include="reference.I-D.ietf-pce-pce-initiated-lsp"?>
      <?rfc include="reference.I-D.ietf-pce-pcep-yang"?>
      <?rfc include="reference.I-D.ietf-pce-pceps"?>

      <reference anchor="MXMN-TE" target="">
        <front>
          <title>Practical linear programming algorithm for balancing the max-min
          fairness and throughput objectives in traffic engineering</title>
          <author initials="E" surname="Danna" fullname="Emilie Danna">
            <organization>Google, Inc.</organization>
          </author>
          <author initials="S" surname="Mandal" fullname="Subhasree Mandal">
            <organization>Google, Inc.</organization>
          </author>
          <author initials="A" surname="Singh" fullname="Arjun Singh">
            <organization>Google, Inc.</organization>
          </author>
          <date year="2012" />
        </front>
        <seriesInfo name="" value="INFOCOM, 2012 Proceedings IEEE Page(s): 846-854" />
      </reference>

      <reference anchor="MPLS-PC" target="">
        <front>
          <title>Improved MPLS-TE LSP Path Computation using Preemption</title>
          <author initials="I" surname="Chaieb" fullname="Imene Chaieb">
            <organization>France Telecom R&amp;D</organization>
          </author>
          <author initials="JL" surname="Le Roux" fullname="Jean-Louis Le Roux">
            <organization>France Telecom R&amp;D</organization>
          </author>
          <author initials="B" surname="Cousin" fullname="Bernard Cousin">
            <organization>IRISA, Universite de Rennes</organization>
          </author>
          <date month="July" year="2007" />
        </front>
        <seriesInfo name="" value="Global Information Infrastructure Symposium" />
      </reference>
    </references>
  </back>
</rfc>
