<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?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-yang-pce-pcep-redundancy-policy-00"
     ipr="trust200902">
  <front>
    <title abbrev="PCEP Extensions to Redundancy Policy">Path Computation
    Element Communication Protocol (PCEP) Extensions to Redundancy
    Policy</title>

    <author fullname="Fan Yang" initials="F." surname="Yang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>shirley.yangfan@huawei.com</email>
      </address>
    </author>

    <author fullname="Xuesong Geng" initials="X." surname="Geng">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>156 Beiqing Rd.</street>

          <city>Beijing</city>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>gengxuesong@huawei.com</email>
      </address>
    </author>

    <author fullname="Tianran Zhou" initials="T." surname="Zhou">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street>156 Beiqing Rd.</street>

          <city>Beijing</city>

          <region/>

          <code>100095</code>

          <country>China</country>
        </postal>

        <email>zhoutianran@huawei.com</email>
      </address>
    </author>

    <date day="11" month="July" year="2022"/>

    <workgroup>PCE Working Group</workgroup>

    <abstract>
      <t>PCEP is used to provide a communication between a PCC and a PCE. This
      document defines the extensions to PCEP to support the redundancy paths
      computation. Specifically, two new TLVs are defined to support the
      request of redundancy path computation and protection method, and one
      TLV is defined to distribute the Candidate Path Flag of an SR
      Policy.</t>
    </abstract>

    <note 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 .</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Redundancy protection <xref
      target="I-D.ietf-spring-sr-redundancy-protection"/> is a generalized
      protection mechanism by replicating and transmitting copies of flow
      packets on the redundancy node over multiple different and disjoint
      paths, and further eliminating the redundant packets at the merging
      node. To support redundancy protection in Segment Routing, Redundancy
      Policy<xref target="I-D.geng-spring-redundancy-policy"/> is provided to
      instantiate the segment lists of more than one disjoint forwarding
      paths. This document extends the PCEP protocols to support the request
      of redundancy paths computation and protection method, and further
      distribute the flag of redundancy policy to instantiate more than one
      segment lists for redundancy forwarding.</t>

      <t/>
    </section>

    <section title="Terminology">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>
    </section>

    <section title="RP Object">
      <t>The RP (Request Parameters) object defined in <xref
      target="RFC5440"/> is used to specify various characteristics of the
      path computation request and MUST be carried within each PCReq and PCRep
      messages. The format of RP object is as follows:</t>

      <t><figure align="center">
          <preamble/>

          <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                    |O|B|R| Pri |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Request-ID-number                      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   //                      Optional TLVs                          //
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

          <postamble>Request Parameters Object</postamble>
        </figure></t>

      <section title="Redundancy Protection TLV">
        <t>In order to request PCE to compute multiple redundancy forwarding
        paths with the intention of redundancy protection, this document
        defines a new TLV named Redundancy Protection TLV. The format of
        Redundancy Protection TLV is shown as follows.</t>

        <t><figure align="center">
            <preamble/>

            <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 = TBD1          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Flag       |     Number    |            Reserved           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

            <postamble>Redundancy Protection TLV</postamble>
          </figure></t>

        <t>Where:</t>

        <t><list style="symbols">
            <t>Type: to be assigned by IANA.</t>

            <t>Length: 16-bit value to indicate the length of the value
            portion in bytes.</t>

            <t>Flag: 8-bit bitmap to indicate the redundancy constraint of
            path computation that PCC requires.</t>
          </list></t>

        <t><figure>
            <preamble/>

            <artwork><![CDATA[  0                
  0 1 2 3 4 5 6 7 
 +-+-+-+-+-+-+-+-+
 |R|U|U|U|U|U|U|U|
 +-+-+-+-+-+-+-+-+]]></artwork>

            <postamble/>
          </figure>where:<list style="hanging">
            <t hangText="  a)">R-Flag: One bit Redundancy Flag is used to
            indicate whether PCC requires the common path computation or a
            redundancy path computation. When redundancy flag bit is set to 0,
            it means PCC requests a common path computation. When redundancy
            flag bit is set to 1, it means PCC requests a redundancy path
            computation.</t>

            <t hangText="  b)">U-Flag: Unused and undefined</t>
          </list><list style="symbols">
            <t>Number: 8-bit value to indicate how many redundancy forwarding
            paths that PCC requires. The range of the number is recommended
            from 2 to 8.</t>

            <t>Reserved: 16-bit of reserved bits. SHOULD be set to zero on
            transmission and MUST be ignored on receipt.</t>
          </list>When PCC requests a redundancy path computation, it MUST
        include the Redundancy Flag TLV in the RP object in PCReq message.
        When PCC includes the Redundancy Flag TLV in a path computation
        request, PCE would reply with the required number of redundancy
        forwarding paths and the set of Redundancy Flag associated with the
        computed paths.</t>
      </section>

      <section title="Protection Type TLV">
        <t>As specified in <xref target="I-D.geng-spring-redundancy-policy"/>,
        multiple candidate paths can co-exist with different types of
        protection. In order to differetiate the types of protection, a new
        TLV named Protection Type TLV is defined. The format of Protection
        Type TLV is shown as follows.</t>

        <t><figure align="center">
            <preamble/>

            <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 = TBD2          |            Length             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Prot |                        Reserved                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

            <postamble>Protection Type TLV</postamble>
          </figure></t>

        <t>where:</t>

        <t><list style="symbols">
            <t>Type: to be assigned by IANA.</t>

            <t>Length: 16-bit value to indicate the length of the value
            portion in bytes.</t>

            <t>Protection: 4-bit value to indicate the protection type of path
            computation that PCC requires. The following Table gives the
            values and corresponding protection types.</t>
          </list></t>

        <t><figure align="center">
            <preamble/>

            <artwork><![CDATA[   +--------------+-------------------------+
   |    Value     |     Protection Type     |
   +--------------+-------------------------+
   |      0       |      No protection      |
   +--------------+-------------------------+
   |      1       |     Backup Protection   |
   +--------------+-------------------------+
   |      2       |  Redundancy Protection  |
   +--------------+-------------------------+
   |     3-15     |       Undefined         |
   +--------------+-------------------------+]]></artwork>

            <postamble>Protection Type Values</postamble>
          </figure></t>

        <t><list style="symbols">
            <t>Reserved: 24-bit of reserved bits. SHOULD be set to zero on
            transmission and MUST be ignored on receipt.</t>
          </list></t>
      </section>
    </section>

    <section title="PCEP Extensions for Redundancy Policy ">
      <t>As per <xref target="I-D.ietf-pce-segment-routing-policy-cp"/>, the
      mapping between PCEP Associations and SR Policies is always one-to-one,
      and the mapping between PCEP Tunnels and SR Policy Candidate Paths may
      be either one-to-one or many-to-one. Regarding Redundancy Policy, the
      mapping between PCEP Associations and Redundancy Policy is always
      one-to-one. PCEP Tunnels and Redundancy Policy Candidate Paths are
      always many-to-one. The definitions of SR Policy Association Type
      (SRPAT) and SR Policy Association Group (SRPAG) apply same to Redundancy
      policy.</t>

      <t>This document introduces a new SR Policy Candidate Path Attribute
      called Flag, which identify the Flag of SR Policy Candidate Path within
      the context of an SR Policy. This Flag identifier MUST NOT change for a
      given LSP during its lifetime. When these rules are not satisfied, the
      PCE MUST send a PCErr message with Error-Type = 26 "Association Error",
      Error Value = TBD4 "SR Policy Candidate Path Flag Mismatch".</t>

      <t/>

      <section title="SR Policy Candidate Path Flag TLV ">
        <t>A new SR Policy Association Type TLV <xref
        target="I-D.ietf-pce-segment-routing-policy-cp"/> called SR Policy
        Candidate Path Flag TLV is defined to indicate the Flag of a candidate
        path. The format of SR Policy Candidate Path Flag TLV is shown in
        following.</t>

        <t><figure align="center">
            <preamble/>

            <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 (TBD3)         |             Length            |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |     Flag      |                    RESERVED                   |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>

            <postamble>SRPOLICY-CPPATH-Flag TLV</postamble>
          </figure>where:</t>

        <t><list style="symbols">
            <t>Type: to be allocated by IANA.</t>

            <t>Length: specifies the length of the value field not including
            Type and Length fields.</t>

            <t>Flag: 8-bit bitmap of Flag. A new registry "SR Policy Candidate
            Path Flags" is created. One flag is defined at this writing:</t>
          </list></t>

        <t><figure>
            <preamble/>

            <artwork><![CDATA[  0                
  0 1 2 3 4 5 6 7 
 +-+-+-+-+-+-+-+-+
 |R|U|U|U|U|U|U|U|
 +-+-+-+-+-+-+-+-+  ]]></artwork>

            <postamble/>
          </figure></t>

        <t>where:</t>

        <t><list style="hanging">
            <t hangText="  a)">R-Flag: One bit Redundancy Flag is used to
            indicate the type of candidate path. When R Flag is set, it
            represents the candidate path is used for the redundancy
            forwarding.</t>

            <t hangText="  b)">U-Flag: Unused and undefined</t>
          </list><list style="symbols">
            <t>RESERVED: 3-octet of reserved bits. SHOULD be set to zero on
            transmission and MUST be ignored on receipt.</t>
          </list></t>

        <t/>
      </section>

      <section title="Path Binding TLV">
        <t>Since Redundancy Policy can be optionally associated with the
        Binding Segment, specifically the Redundancy Segment, according to
        <xref target="I-D.ietf-pce-segment-routing-policy-cp"/>, the
        functionality of specified-BSID-only is not mandatory to be enabled.
        It means that the given Redundancy Segment is not required to be
        allocated and programmed for the LSP to be operationally up. When
        there is a Redundancy Segment associated with Redundancy Policy,
        TE-PATH-BINDIND TLV <xref target="I-D.ietf-pce-binding-label-sid"/> is
        used to distribute Redundancy Segment as the Binding Segment of
        Redundancy Policy.</t>
      </section>
    </section>

    <section title="IANA Considerations">
      <t/>

      <section title="New TLV Type">
        <t>This document defines three new TLVs.<figure>
            <preamble/>

            <artwork><![CDATA[  +-----------------+------------------------------------+----------------+
  |       Value     |               Name                 |    Reference   |
  +-----------------+------------------------------------+----------------+
  |       TBD1      |    Redundancy Protection TLV       | This document  |
  +-----------------+------------------------------------+----------------+
  |       TBD2      |       Protection Type TLV          | This document  |
  +-----------------+------------------------------------+----------------+
  |       TBD3      | SR Policy Candidate Path Flag TLV  | This document  |
  +-----------------+------------------------------------+----------------+]]></artwork>

            <postamble/>
          </figure></t>
      </section>

      <section title="PCEP Errors">
        <t>This document defines one new Error-Value within the "Association
        Error" Error-Type. IANA is requested to allocate new error values
        within the "PCEP-ERROR Object Error Types and Values" sub-registry of
        the PCEP Numbers registry, as follows:</t>

        <t><figure>
            <preamble/>

            <artwork><![CDATA[   +------------+------------------+-----------------------+-----------+
   | Error-Type | Meaning          | Error-value           | Reference |
   +------------+------------------+-----------------------+-----------+
   | 26         | Association      |                       | [RFC8697] |
   |            | Error            |                       |           |
   +------------+------------------+-----------------------+-----------+
   |            |                  | TBD4: SR Policy       | This I-D  |
   |            |                  | Candidate Path        |           |
   |            |                  | Flag Mismatch         |           |
   +------------+------------------+-----------------------+-----------+]]></artwork>

            <postamble/>
          </figure></t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>TBD</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>

      <?rfc include='reference.RFC.5440'?>

      <?rfc include='reference.I-D.ietf-spring-sr-redundancy-protection'?>

      <?rfc include='reference.I-D.geng-spring-redundancy-policy'?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.I-D.ietf-pce-segment-routing-policy-cp'
?>

      <?rfc ?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.ietf-pce-binding-label-sid'
?>

      <?target ?>
    </references>
  </back>
</rfc>
