<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std" docName="draft-hb-idr-sr-p2mp-policy-04" ipr="trust200902">
  <front>
    <title abbrev="Advertising p2mp policies in BGP">Advertising p2mp policies
    in BGP</title>

    <author fullname="Hooman Bidgoli" initials="H" role="editor"
            surname="Bidgoli">
      <organization>Nokia</organization>

      <address>
        <postal>
          <street/>

          <city>Ottawa</city>

          <region/>

          <code/>

          <country>Canada</country>
        </postal>

        <phone/>

        <email>hooman.bidgoli@nokia.com</email>
      </address>
    </author>

    <author fullname="Daniel Voyer" initials="V." surname="Voyer">
      <organization>Bell Canada</organization>

      <address>
        <postal>
          <street/>

          <city>Montreal</city>

          <region/>

          <code/>

          <country>Canada</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>daniel.yover@bell.ca</email>

        <uri/>
      </address>
    </author>

    <author fullname="Andrew Stone" initials="A." surname="Stone">
      <organization>Nokia</organization>

      <address>
        <postal>
          <street/>

          <city>Ottawa</city>

          <region/>

          <code/>

          <country>Canada</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>andrew.stone@nokia.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Rishabh Parekh" initials="R." surname="Parekh">
      <organization>Cisco System</organization>

      <address>
        <postal>
          <street/>

          <city>San Jose</city>

          <region/>

          <code/>

          <country>USA</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>riparekh@cisco.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Serge Krier" initials="S." surname="Krier">
      <organization>Cisco System, Inc.</organization>

      <address>
        <postal>
          <street/>

          <city>Rixensart</city>

          <region/>

          <code/>

          <country>Belgium</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>sekrier@cisco.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Arvind Venkateswaran" initials="A."
            surname="Venkateswaran">
      <organization>Cisco System, Inc.</organization>

      <address>
        <postal>
          <street/>

          <city>Ottawa</city>

          <region/>

          <code/>

          <country>Canada</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>arvvenka@cisco.com</email>

        <uri/>
      </address>
    </author>

    <date day="07" month="October" year="2021"/>

    <abstract>
      <t>SR P2MP policies are set of policies that enable architecture for
      P2MP service delivery.</t>

      <t>A P2MP policy consists of candidate paths that connects the Root of
      the Tree to a set of Leaves. The P2MP policy is composed of replication
      segments. A replication segment is a forwarding instruction for a
      candidate path which is downloaded to the Root, transit nodes and the
      leaves.</t>

      <t>This document specifies a new BGP SAFI with a new NLRI in order to
      advertise P2MP policy from a controller to a set of nodes.</t>

      <t>This document introduces three new route types within this NLRI, one
      for P2MP policy and its candidate paths that need to be programmed on
      the Root node, one for the replication segment incoming SID which
      uniquely will identify the cross connect and another for each outgoing
      interface that the packets get replicated to. The last two route types
      are forwarding instructions that needs to be programmed on the Root, and
      optionally on Transit and Leaf nodes.</t>

      <t>It should be noted that this document does not specify how the Root
      and the Leaves are discovered on the controller, it only describes how
      the P2MP Policy and Replication Segments are programmed from the
      controller to the nodes.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <!-- 1 -->

      <t>The draft <xref target="draft-ietf-pim-sr-p2mp-policy"/> defines a
      variant of the SR Policy <xref
      target="draft-ietf-spring-segment-routing-policy"/> for constructing a
      P2MP segment to support multicast service delivery.</t>

      <t>A Point-to-Multipoint (P2MP) Policy contains a set of candidate paths
      and identifies a Root node and a set of Leaf nodes in a Segment Routing
      Domain. The draft also defines a Replication segment, which corresponds
      to the state of a P2MP segment on a particular node. The Replication
      segment is the forwarding instruction for a P2MP LSP at the Root,
      Transit and Leaf nodes.</t>

      <t>For a P2MP segment, a controller may be used to compute a tree from a
      Root node to a set of Leaf nodes, optionally via a set of replication
      nodes. A packet is replicated at the root node and optionally on
      Replication nodes towards each Leaf node.</t>

      <t>We define two types of a P2MP segment: Ingress Replication (aka
      Spray) and Downstream Replication (aka TreeSID).</t>

      <t>A Point-to-Multipoint service delivery could be via Ingress
      Replication (aka Spray in some SR context), i.e., the root unicasts
      individual copies of traffic to each leaf. The corresponding P2MP
      segment consists of replication segments only for the root and the
      leaves.</t>

      <t>A Point-to-Multipoint service delivery could also be via Downstream
      Replication (aka TreeSID in some SR context), i.e., the root and some
      downstream replication nodes replicate the traffic along the way as it
      traverses closer to the leaves.</t>

      <t>It should be noted that two replication nodes can be connected
      directly, or they can be connected via unicast SR segment or a segment
      list.</t>

      <t>The leaves and the root of a p2mp policy can be discovered via the
      multicast protocols or procedures like NG-MVPN <xref target="RFC6513"/>
      or manually configured on the PCC (CLI) or the PCE.</t>

      <t>Based on the discovered root and leaves, the controller builds a P2MP
      policy and advertise it to the head-end router (i.e. the root of the
      P2MP Tree). The advertisement uses BGP extensions defined in this
      document. The controller also calculates the tree path and builds the
      replication segments on each segment of the tree, Root, Transit and Leaf
      nodes and downloads the forwarding instructions to the nodes via BGP
      extensions defined in this document.</t>

      <t>SR p2mp policy is a variant of the SR policy and as such it reuses
      the concept of a candidate path. This draft reuses some of the concepts
      and TLVs mentioned in <xref
      target="draft-ietf-idr-segment-routing-te-policy"/></t>

      <t>A candidate path with in the P2MP policy can contain multiple path-
      instances. A path-instance can be viewed as a P2MP LSP. For candidate
      path global optimization purposes, two or more path-instances can be
      used to execute make before break procedures.</t>

      <t>Each path-instance is a P2MP LSP as such each path-instance needs a
      set of replication segments to construct its forwarding
      instructions.</t>
    </section>

    <section title="Conventions used in this document">
      <!-- 2 -->

      <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 RFC 2119 [RFC2119].</t>
    </section>

    <section title="P2MP Policy and Replication Segment Encoding">
      <section title="P2MP Policy SAFI and NLRI">
        <!-- 3-->

        <t>This document defines a new BGP NLRI, called the P2MP-POLICY
        NLRI.</t>

        <t>A new SAFI is defined: the SR P2MP Policy SAFI, (Codepoint tbd
        assigned by IANA). The following is the format of the P2MP-POLICY
        NLRI:</t>

        <t><figure>
            <artwork><![CDATA[      +-----------------------------------+
      |             route type            | 1 octet
      +-----------------------------------+
      |               length              | 1 octet
      +-----------------------------------+
      |    route type specific (variable) | 
      +-----------------------------------+]]></artwork>
          </figure></t>

        <t><list style="symbols">
            <t>The Route type field defines the encoding of the rest of the
            P2MP- POLICY NLRI.</t>

            <t>The length field indicates the length in octets of the route
            type specific data, excluding route type and length</t>

            <t>This document defines the following route types:<list
                style="symbols">
                <t>P2MP Policy route: TBD1, this is the actually P2MP policy
                on the root which contains the candidate paths, its prefrence
                and path instances.</t>

                <t>Replication Segment Binding SID: TBD2, this is part of the
                replication segment and it is used for programming the
                incoming SID used to identify a P2MP cross connect.</t>

                <t>Replication Segment OIF: TBD3, this is a single Outgoing
                Interface for the P2MP cross connect. It also contains the
                outgoing SID.</t>
              </list></t>
          </list></t>

        <t>The NLRI containing the SR P2MP Policy is carried in a BGP UPDATE
        message <xref target="RFC4271"/> using BGP multiprotocol extensions
        <xref target="RFC4760"/> with an AFI of 1 or 2 (IPv4 or IPv6) and with
        a SAFI of "TBD" (assigned by IANA from the "Subsequent Address Family
        Identifiers (SAFI) Parameters" registry).</t>

        <t>All other recommendations of <xref
        target="draft-ietf-idr-segment-routing-te-policy"/> section SR Policy
        SAFI and NLRI, should be taken into account for P2MP policy.</t>

        <section title="P2MP Policy Route - Route Type TBD1">
          <t/>

          <t><figure>
              <artwork><![CDATA[      +-----------------------------------+
      |            Root-ID Length         | 1 octets 
      +-----------------------------------+
      ~             Root-ID               ~ 4 or 16 octets (ipv4/ipv6)
      +-----------------------------------+
      |               Tree-ID             | 4 octets
      +-----------------------------------+
      |            Distinguisher          | 4 octets
      +-----------------------------------+]]></artwork>
            </figure><list style="symbols">
              <t>Root-ID: IPv4/IPv6 address of the head-end (Root) of the p2mp
              tree, based on AFI.</t>

              <t>Tree-ID: a unique 4 octets identifier of the p2mp tree on the
              head- end (root)router.</t>

              <t>Distinguisher: 4-octets value uniquely identifying the policy
              in the context of &lt;Tree-ID, Originating Router's IP&gt;
              tuple. The distinguisher has no semantic value and is solely
              used by the SR P2MP Policy originator to make unique (from an
              NLRI perspective) multiple occurrences of the same SR P2MP
              Policy.</t>
            </list></t>
        </section>

        <section title="Replication segment Route Binding SID- Route type TBD 2">
          <t>There can be two type of replication segment, shared and
          non-shared. A shared replication segment can carry multiple MVPN
          services or it can be used for Facility Fast reroute protecting
          multiple P2MP trees. A non-shared tree is used when the label field
          of the PMSI Tunnel Attribute (PTA) is set to 0 as per <xref
          target="draft-ietf-bess-mvpn-evpn-sr-p2mp"/>. The Binding SID route
          type Programs the incoming replication SID on the replication node.
          Since a replication cross connect has a single incoming replication
          SID with a set of Outgoing Interfaces, this route type can be used
          to download the replication SID once for the cross connect.</t>

          <t><figure>
              <artwork><![CDATA[      +-----------------------------------+
      |            Root-ID Length         | 1 octets    
      +-----------------------------------+
      ~             Root-ID               ~ 4 or 16 octets (ipv4/ipv6)
      +-----------------------------------+
      |               Tree-ID             | 4 octets
      +-----------------------------------+
      |           Distinguisher           | 4 octets
      +-----------------------------------+
      |             instance-ID           | 2 octets
      +-----------------------------------+
      |            Node-ID Length         | 1 octets 
      +-----------------------------------+
      ~              Node-ID              ~ 4 or 16 octets
      +-----------------------------------+
      |        Replication SID Length     | 1 octets
      +-----------------------------------+
      ~          Replication SID          ~ 4 or 16 octets
      +-----------------------------------+
]]></artwork>
            </figure><list style="symbols">
              <t>Root-ID: IPv4/IPv6 address of the head-end (Root) of the p2mp
              tree based on AFI.</t>

              <t>Tree-ID: a unique 4 octets identifier of the p2mp tree on the
              head- end router (Root)</t>

              <t>instance-id, identifies the path-instance with in the p2mp-
              policy. Each candidate path can have one, two or more
              path-instance. Path-instance is used for global optimization of
              the candidate path via make before break procedures. Instance-ID
              can be used</t>

              <t>Distinguisher: 4-octets value uniquely identifying the policy
              in the context of &lt;Root-ID, Tree-ID&gt; tuple. The
              distinguisher has no semantic value and is solely used by the SR
              P2MP Policy originator to make unique (from an NLRI perspective)
              multiple occurrences of the same SR P2MP Policy.</t>

              <t>Node-ID: This Node's IPv4/IPv6 address</t>

              <t>Replication SID: the incoming replication SID used to
              identify this replication point (MPLS or SRv6). Note the
              replication SID is not part of the NLRI key.</t>
            </list></t>
        </section>

        <section title="Replication segment Route OIF- Route type TBD 3">
          <t>This route type is used to identify and program each out going
          interface individually for a replication cross connect. Downloading
          each OIF individually ensures easier modification and programming
          and will keep the programming of each OIF in par with <xref
          target="draft-ietf-idr-segment-routing-te-policy"/> . Note: this
          route type can be used for shared and non-shared replication segment
          as it was explained in previous sections.</t>

          <t><figure>
              <artwork><![CDATA[      +-----------------------------------+
      |            Root-ID Length         | 1 octets    
      +-----------------------------------+
      ~             Root-ID               ~ 4 or 16 octets (ipv4/ipv6)
      +-----------------------------------+
      |               Tree-ID             | 4 octets
      +-----------------------------------+
      |           Distinguisher           | 4 octets
      +-----------------------------------+
      |            instance-ID            | 2 octets
      +-----------------------------------+
      |            Node-ID Length         | 1 octets 
      +-----------------------------------+
      ~              Node-ID              ~ 4 or 16 octets
      +-----------------------------------+
      |       Downstream-Node Length      | 1 octets 
      +-----------------------------------+
      ~          Downstream-Node          ~ 4 or 16 octets
      +-----------------------------------+
      |      Outgoing-TreeSID Length      | 1 octets
      +-----------------------------------+
      ~         Outgoing-TreeSID          ~ 4 or 16 octets
      +-----------------------------------+
]]></artwork>
            </figure><list style="symbols">
              <t>Root-ID: IPv4/IPv6 address of the head-end (Root) of the p2mp
              tree based on AFI.</t>

              <t>Tree-ID: a unique 4 octets identifier of the p2mp tree on the
              head- end router (Root)</t>

              <t>instance-id, identifies the path-instance with in the p2mp-
              policy. Each candidate path can have one, two or more
              path-instance. Path-instance is used for global optimization of
              the candidate path via make before break procedures. Instance-ID
              can be used</t>

              <t>Distinguisher: 4-octets value uniquely identifying the policy
              in the context of &lt;Root-ID, Tree-ID&gt; tuple. The
              distinguisher has no semantic value and is solely used by the SR
              P2MP Policy originator to make unique (from an NLRI perspective)
              multiple occurrences of the same SR P2MP Policy.</t>

              <t>Node-ID: Node's IPv4/IPv6 address</t>

              <t>Downstream Node: Downstream Node Identifier</t>

              <t>Outgoing TreeSID: The outgoing SID for this branch (MPLS or
              SRv6). Note the outgoing-TreeSID is not part of the NLRI
              Key.</t>
            </list></t>
        </section>
      </section>

      <section title="Tunnel Encapsulation Attribute">
        <t>The content of this new NLRI is encoded in the tunnel Encapsulation
        Attribute originally defined in <xref
        target="ietf-idr-tunnel-encaps"/> using two new Tunnel-Type TLV
        (codepoint is TBD, assigned by IANA from the "BGP Tunnel Encapsulation
        Attribute Tunnel Types" registry) one for P2MP Policy and another for
        Replication segment.</t>

        <section title="SR P2MP policy encoding">
          <t/>

          <t><figure>
              <artwork><![CDATA[      SR P2MP Policy SAFI NLRI: <route-type p2mp-policy>
      Attributes:
         Tunnel Encaps Attribute (23)
            Tunnel Type: (TBD, P2MP-Policy)
                Preference
                Policy Name
                Policy Candidate Path Name
                leaf-list (optional)
                     remote-end point
                     remote-end point
                     ...
                path-instance
                    active-instance-id
                    instance-id
                    instance-id
                    ...]]></artwork>
            </figure><list style="symbols">
              <t>Relevant only at the Root.</t>

              <t>SR P2MP-POLICY NLRI and P2MP Policy route type.</t>

              <t>Tunnel Encapsulation Attribute is defined in <xref
              target="ietf-idr-tunnel-encaps"/></t>

              <t>Tunnel-Type is set to P2MP-Policy Tunnel-Type TBD (assigned
              by IANA from the "BGP Tunnel Encapsulation Attribute Tunnel
              Types" registry).</t>

              <t>Policy Name, Policy Candidate Path Name are defined in <xref
              target="draft-ietf-idr-segment-routing-te-policy"/></t>

              <t>Preference, leaf-list, remote-end point and path- instance,
              instance-ids are defined in this document.</t>

              <t>Additional sub-TLVs may be defined in the future.</t>
            </list></t>
        </section>

        <section title="Replication segment Binding SID encoding">
          <t/>

          <t><figure>
              <artwork><![CDATA[replication segment Binding SID SAFI NLRI: <route-type non-sahred/shared 
                                tree replication-segment-binding-sid> 
]]></artwork>
            </figure></t>

          <t>This route type has no additional sub-TLVs, and it is only meant
          to download the incoming SID for the replication cross connect.</t>
        </section>

        <section title="Replication segment OIF encoding">
          <t><figure>
              <artwork><![CDATA[replication segment SAFI NLRI: <route-type non-sahred/shared 
                                tree replication-segment-oif> 
     Attributes:
         Tunnel Encaps Attribute (23)
            Tunnel Type: (TBD Replication-Segment-oif)
                    segment-list 
                        weight (optional)
                        protection (optional, must be present when protection flag is enabled for downstream-nodes)
                        segment
                        segment
                        ...
                    segment-list 
                        weight (optional)
                        protection (optional, must be present when protection flag is enabled for downstream-nodes)
                        segment
                        segment
                        ...
                   segment-list (protection segment list)
                        protection (protecting the first segment list, can't have weight sub-tlv)
                        segment
                        segment
                        ...
                   ...
                ...]]></artwork>
            </figure><list style="symbols">
              <t>SR P2MP-POLICY NLRI and non-shared tree Replication segment
              route type or shared tree Replication segment route type.</t>

              <t>Tunnel Encapsulation Attribute is defined in <xref
              target="ietf-idr-tunnel-encaps"/>.</t>

              <t>Tunnel-Type is set to Replication Segment OIF Tunnel Type,
              TBD (assigned by IANA from the "BGP Tunnel Encapsulation
              Attribute Tunnel Types" registry).</t>

              <t>segment-list are defined in this document.</t>

              <t>Additional sub-TLVs may be defined in the future.</t>
            </list></t>
        </section>
      </section>

      <section title="P2MP Policy Sub-TLVs">
        <t>EACH P2MP policy NLRI represents a candidate path for a P2MP
        policy. A P2MP policy can have multiple candidate paths and would need
        multiple P2MP policy NRLI to download all the candidate paths.</t>

        <section title="preference Sub-TLV">
          <t>As defined in preference Sub-TLV section in <xref
          target="draft-ietf-idr-segment-routing-te-policy"/> the candidate
          path with highest preference is the active candidate path.</t>
        </section>

        <section title="leaf-list Sub-TLV">
          <t>The leaf list sub-tlv identifies a set of leaves for the tree.
          Each leaf is a remote endpoint as defined in <xref
          target="ietf-idr-tunnel-encaps"/> The leaf-list sub-tlv is optional.
          The PCE can choose to download the leaf list every time it is
          configured or learns a new leaf. If the PCE chooses to download this
          optional sub-tlv it should download the entire set of the end-points
          every time the endpoint list has been modified. The leaf list has
          informational value only hence why it is optonal and it is not
          required for the root PE to operate. However, it must be noted that
          in some cases the end-points list can become very large with 100s of
          leaves.</t>

          <t><figure>
              <artwork><![CDATA[       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |             Length            |   RESERVED    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      //                           sub-TLVs                          //
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
            </figure><list style="symbols">
              <t>Type: TBD, 1 octet</t>

              <t>Length: 2 octets, the total length (not including the Type
              and Length fields) of the sub-TLVs encoded within the leaf-list
              sub-TLV.</t>

              <t>RESERVED: 1 octet of reserved bits. SHOULD be unset on
              transmission and MUST be ignored on receipt.</t>

              <t>sub-TLVs: One or more remote endpoint sub-TLVs. Note the
              remote endpoint object is defined in <xref
              target="ietf-idr-tunnel-encaps"/></t>
            </list></t>

          <t/>
        </section>

        <section title="path-instance Sub-TLV">
          <t>The path instance sub-tlv contains a set of instance-ids (P2MP
          LSPs). These LSPs can be used for MBB procedure under a candidate
          path. Each LSP Instance-id has a unique id (4 octets) with in the
          &lt;root node, P2MP policy&gt;, in other word it is unique per
          &lt;root node,tree-id&gt;. The PCE SHOULD always download all
          instance-ids to the node. The active instance is identified via the
          active instance-id sub-tlv.</t>

          <t>The P2MP LSP and its replication segments should be configured
          from root to the leaves first before the PCE switches that active
          instance-id to this new instance.</t>

          <t><figure>
              <artwork><![CDATA[       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |             Length            |   RESERVED    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      //                           Sub-TLVs                          //
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
            </figure><list style="symbols">
              <t>Type: TBD, 1 octet</t>

              <t>Length: 2 octets, the total length (not including the Type
              and Length fields) of the sub-TLVs encoded within the Segment
              List sub-TLV.</t>

              <t>RESERVED: 1 octet of reserved bits. SHOULD be unset on
              transmission and MUST be ignored on receipt</t>

              <t>sub-TLVs: * active instance-id * one or more instance-id</t>
            </list></t>

          <section title="active instance-id Sub-TLV">
            <t>The Active instance-id is used to identify the P2MP LSP which
            should be active amongst the collection of instances.</t>

            <t><figure>
                <artwork><![CDATA[       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |             Length            |   RESERVED    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           active instance-id                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure><list style="symbols">
                <t>Type: TBD.</t>

                <t>Length: the total length (not including the Type and Length
                fields) of the sub-TLVs encoded within the Segment List
                sub-TLV.</t>

                <t>RESERVED: 1 octet of reserved bits. SHOULD be unset on
                transmission and MUST be ignored on receipt.</t>

                <t>active instant-id: The identifier of the active
                instance-id</t>
              </list></t>
          </section>

          <section title="instance-id Sub-TLV">
            <t>Multiple Instance-ids can be programmed for a candidate
            path.</t>

            <t><figure>
                <artwork><![CDATA[       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |             Length            |   RESERVED    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           instance-id                         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
              </figure><list style="symbols">
                <t>Type: TBD</t>

                <t>Length: the total length (not including the Type and Length
                fields) of the sub-TLVs encoded within the Segment List
                sub-TLV.</t>

                <t>RESERVED: 1 octet of reserved bits. SHOULD be unset on
                transmission and MUST be ignored on receipt.</t>

                <t>instan-id: a 32 bit unique identifier. The instance-id is
                unique with in the context of the &lt;root node, p2mp
                policy&gt;</t>
              </list></t>
          </section>
        </section>
      </section>

      <section title="Replication segment Sub-TLVs">
        <section title="Segment list Sub-TLV ">
          <t>The segment list Sub-TLV is defined in <xref
          target="ietf-spring-segment-routing-policy"/>. The segment-list
          Sub-TLV contains one or more segment Sub-TLVs. Two replication
          segments can be directly connected via a replication sid or can be
          connected via a unicast segment list and a replication sid. In the
          later case the replication sid needs to be at the bottom of the
          unicast segment list.</t>
        </section>

        <section title="Weight sub-tlv">
          <t>The Weight sub-TLV is optional and is as defined in <xref
          target="draft-ietf-idr-segment-routing-te-policy"/>. With in the
          downstream node sub-tlv, there can be one or more segment list used
          for ECMP. In this case the weight sub-tlv can provide weighted
          ECMP.</t>
        </section>

        <section title="Protection sub-tlv">
          <t>Protection sub-tlv is optional, if FRR is desired for the
          downstream node this sub-tlv can be used to identify the protection
          segment list. To identify protection segment list this sub-tlv
          provides a segment list identifier. If protection is desired under
          the endpoint all the segment lists should have this sub-tlv. A
          protection segment list can not have a weight sub-tlv and it can not
          participate in ECMP. That said a segment list that is being
          protected can have a weight sub-tlv and participate in ECMP.</t>

          <t>In general protection segment list is used only if replication
          segments are directly connected and there is no unicast segment list
          connecting two replication segment. If there is a unicast
          replication segment connecting the two replication sid, then the
          unicast protection mechanism can be exercise and there is no need
          for this protection sub-tlv, hence why this sub-tlv is optional.</t>

          <t><figure>
              <artwork><![CDATA[    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |   Length      |     Flags   |P|   RESERVED    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |           segment list id     |  protection segment list id   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+]]></artwork>
            </figure><list style="symbols">
              <t>Type : tbd, 1 octet.</t>

              <t>Length: 8</t>

              <t>Flag: 1 octet, the P bit is set when this segment list is
              protected by another segment list for the downstream node</t>

              <t>segment list id: the segment list id</t>

              <t>protection segment list id: the segment list id that is being
              used as protection.</t>
            </list></t>

          <t/>
        </section>

        <section title="Segment Sub-TLV">
          <t>The segment sub-Tlv is identified in <xref
          target="draft-ietf-idr-segment-routing-te-policy"/>. As it was
          mentioned before two replication segments can be connected directly
          to each other or via a segment list. If they are connected directly
          to each other then the segment list can be constructed via:</t>

          <t><list style="symbols">
              <t>If the replication segment is steered via IPv4 or IPv6
              nexthops or interface then the segment type E or G can be used
              with the new R flag set.</t>

              <t>If the replication segment is steered via a SR Unicast node
              or adjacency SID then segment type A can be used with the new R
              flag set. Unicast SR segment types can also be configured for
              steering.</t>
            </list></t>

          <t>If they are connected via SR domain then the segment list can
          contain multiple different types of SIDs, such as Node, Adjacency or
          Binding SIDe. In this case the replication sid is at the bottom of
          the stack and of type A with the R flag set. The SR node/adjacency
          or binding sids steer the packet through a SR domain until it
          reaches another replication segment. where the bottom of the stack
          replication sid identifies the forwarding information on that
          replication segment.</t>

          <t>It should be noted that the segment sub-TLV is only used to
          program the unicast SR Segment or outgoing interface for the
          replication SID outgoing interface. The outgoing tree SID it self is
          programmed in the appropriate route type.</t>
        </section>
      </section>
    </section>

    <section title="P2MP Policy Operation ">
      <!-- 4 -->

      <t>Inline with <xref target="draft-ietf-idr-segment-routing-te-policy"/>
      the consumer of an P2MP Policy is not the BGP process. The BGP process
      is used for distributing the P2MP policy NLRI and its route-types but
      its installation and use is outside the scope of BGP. The detail for
      P2MP Policy can be found in <xref
      target="draft-ietf-pim-sr-p2mp-policy"/></t>

      <section title="Configuration and advertisement of P2MP Policies ">
        <t>The controller usually is connected to the receivers via a route
        reflector. As such one or more route-target SHOULD be attached to the
        advertisement of P2MP Policy NLRI and its route-type. Each route
        target identifies one head-end (root nodes) for P2MP Policy route or
        one or more head-end, transit and leaf nodes for the Non-
        Shared/Shared Tree Replication Segment route, for the advertised P2MP
        Policy.</t>
      </section>

      <section title="Reception of an P2MP Policy NLRI">
        <t>When a BGP speaker receives an P2MP Policy NLRI the following rules
        apply:</t>

        <t><list style="symbols">
            <t>The P2MP Policy update MUST have either the NO_ADVERTISE
            community or at least one route-target extended community in
            IPv4-address format. If a router supporting this document receives
            an P2MP Policy update with no route-target extended communities
            and no NO_ADVERTISE community, the update MUST NOT be processed.
            Furthermore, it SHOULD be considered to be malformed, and the
            "treat-as-withdraw" strategy of <xref target="RFC7606"/> is
            applied.</t>

            <t>If one or more route-targets are present, then at least one
            route- target MUST match one of the BGP Identifiers of the
            receiver in order for the update to be considered usable. The BGP
            Identifier is defined in <xref target="RFC4271"/> as a 4 octet
            IPv4 address. Therefore the route- target extended community MUST
            be of the same format.</t>

            <t>If one or more route-targets are present and no one matches any
            of the local BGP Identifiers, then, while the P2MP Policy NLRI is
            acceptable, it is not usable on the receiver node.</t>
          </list></t>
      </section>

      <section title="Global Optimization for P2MP LSPs">
        <t>When a P2MP LSP needs to be optimized for any reason (i.e. it is
        taking on an FRR Path or new routers are added to the network) a
        global optimization is possible. Note that optimization works per
        candidate path. Each candidate path is capable of global optimization.
        To do so each candidate path contains two or more path- instances.
        Each path instance is a P2MP LSP, each P2MP LSP is identified via a
        path-instance-id (equivalent to an lsp-id [RFC3209]). After
        calculating an optimized P2MP LSP path the PCE will program the
        candidate path with a 2nd path instance and its set of replication
        segments for this path-instance on the root, transit and leaf nodes.
        After the optimized LSP replication segments are downloaded a MBB
        procedure is performed and the previous instance of the path instance
        is deleted and removed from head-end node and its corresponding
        replication segments from head-end, transit and leaves.</t>
      </section>
    </section>

    <section title="IANA Consideration">
      <!-- 6 -->

      <t><list style="symbols">
          <t>A new SAFI is defined: the SR P2MP Policy SAFI, (Codepoint tbd
          assigned by IANA)</t>

          <t>2 new Route type field defines the encoding of the rest of the
          P2MP- POLICY SAFI<list style="symbols">
              <t>P2MP Policy Route</t>

              <t>Replication Segment Binding Sid</t>

              <t>Replication Segment OIF</t>
            </list></t>

          <t>Two new Tunnel type to be assigned by IANA</t>
        </list></t>
    </section>

    <section title="Security Considerations">
      <!-- 8 -->

      <t>TBD</t>
    </section>

    <section title="Acknowledgments">
      <!-- 9 -->

      <t/>
    </section>
  </middle>

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

    <references title="Informative References">
      <!-- 10.2 -->

      <reference anchor="draft-ietf-pim-sr-p2mp-policy">
        <front>
          <title>D. Yoyer, C. Filsfils, R.Prekh, H.bidgoli, Z. Zhang,
          "draft-ietf-pim-sr-p2mp-policy"</title>

          <author>
            <organization/>
          </author>

          <date month="October" year="2019"/>
        </front>
      </reference>

      <reference anchor="draft-ietf-spring-sr-replication-segment">
        <front>
          <title>D. Yoyer, C. Filsfils, R.Prekh, H.bidgoli, Z. Zhang,
          "draft-ietf-pim-sr-p2mp-policy "</title>

          <author>
            <organization/>
          </author>

          <date month="July" year="2020"/>
        </front>
      </reference>

      <reference anchor="draft-ietf-spring-segment-routing-policy">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="ietf-spring-segment-routing-policy">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-ietf-idr-segment-routing-te-policy">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="ietf-idr-tunnel-encaps">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-ietf-bess-mvpn-evpn-sr-p2mp">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="RFC6513">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="RFC4760">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="RFC7606">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="RFC4271">
        <front>
          <title/>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
    </references>
  </back>
</rfc>
<!-- generated from file C:\Users\hbidgoli\Downloads\draft-ietf-bier-pim-signaling-08.nroff with nroff2xml 0.1.0 by Tomek Mrugalski -->
