﻿<?xml version="1.0" encoding="UTF-8"?>
<?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-bess-mvpn-fast-failover-10" ipr="trust200902">
  <front>
    <title abbrev="mVPN fast upstream failover">Multicast VPN fast upstream
    failover</title>

    <author fullname="Thomas Morin" initials="T." role="editor" surname="Morin">
      <organization>Orange</organization>

      <address>
        <postal>
          <street>2, avenue Pierre Marzin</street>

          <city>Lannion</city>

          <code>22307</code>

          <country>France</country>
        </postal>

        <email>thomas.morin@orange-ftgroup.com</email>
      </address>
    </author>

    <author fullname="Robert Kebler" initials="R." role="editor" surname="Kebler">
      <organization>Juniper Networks</organization>

      <address>
        <postal>
          <street>1194 North Mathilda Ave.</street>

          <city>Sunnyvale</city>

          <region>CA</region>

          <code>94089</code>

          <country>U.S.A.</country>
        </postal>

        <email>rkebler@juniper.net</email>
      </address>
    </author>

	<author initials="G." surname="Mirsky" fullname="Greg Mirsky" role="editor">
		<organization>ZTE Corp.</organization>
		<address>
			<email>gregimirsky@gmail.com</email>
		</address> 
	</author>
	

    <date year="2020"/>

    <abstract>
      <t>This document defines multicast VPN extensions and procedures that
      allow fast failover for upstream failures, by allowing downstream PEs to
      take into account the status of Provider-Tunnels (P-tunnels) when
      selecting the upstream PE for a VPN multicast flow, and extending BGP
      MVPN routing so that a C-multicast route can be advertised toward a
      standby upstream PE.</t>
    </abstract>

    <note title="Requirements Language">
             <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>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>In the context of multicast in BGP/MPLS VPNs, it is desirable to
      provide mechanisms allowing fast recovery of connectivity on different
      types of failures. This document addresses failures of elements in the
      provider network that are upstream of PEs connected to VPN sites with
      receivers.</t>

          <t>Section <xref format="counter" target="tunnel-status"/>
          describes local procedures allowing an egress PE (a PE connected to
          a receiver site) to take into account the status of P-tunnels to
          determine the Upstream Multicast Hop (UMH) for a given (C-S,
          C-G).  This method does not provide a "fast failover" solution
          when used alone, but can be used with the following sections
          for a "fast failover" solution.</t>

          <t>Section <xref format="counter" target="standby-join"/>
          describes protocol extensions that can speed up failover by not
          requiring any multicast VPN routing message exchange at recovery
          time.</t>

      <t>Moreover, section <xref format="counter" target="hot-standby"/>
      describes a "hot leaf standby" mechanism, that uses a combination of
      these two mechanisms. This approach has similarities with the solution
      described in <xref target="RFC7431"/> to improve failover
      times when PIM routing is used in a network given some topology and
      metric constraints.</t>
    </section>

    <section title="Terminology">
      <t>The terminology used in this document is the terminology defined in
      <xref target="RFC6513"/> and <xref target="RFC6514"> </xref>.</t>
      <t>x-PMSI:  I-PMSI or S-PMSI</t>
    </section>

    <section anchor="tunnel-status" title="UMH Selection based on tunnel status">
      <t>Current <xref target="RFC6513">multicast VPN
      specifications</xref>, section 5.1, describe the procedures used by a
      multicast VPN downstream PE to determine what the upstream multicast hop
      (UMH) is for a given (C-S, C-G).</t>

      <t>
   The procedure described here is an OPTIONAL procedure that consists
   of having a downstream PE take into account the status of P-tunnels
   rooted at each possible upstream PEs, Because all PEs could arrive at
   a different conclusion regarding the state of the tunnel, procedures
   described in Section 9.1.1 of <xref target="RFC6513"/> MUST be used when using
   inclusive tunnels.
      </t>

      <t>
   For a given downstream PE and a given VRF, the P-tunnel corresponding
   to a given upstream PE for a given (C-S, C-G) state is the S-PMSI
   tunnel advertised by that upstream PE for this (C-S, C-G) and
    imported into that VRF, or if there isn't any such S-PMSI, the I-PMSI
   tunnel advertised by that PE and imported into that VRF.
</t>

            <t>
   There are three options specified in Section 5.1 of [RFC6513] for a
   downstream PE to select an Upstream PE.
      <list style="symbols">
          <t>
          The first two options select the Upstream PE from a candidate PE
      set either based on IP address or a hashing algorithm.  When used
      together with the optional procedure of considering the P-tunnel
      status as in this document, a candidate upstream PE is included in
      the set if it either:
          <list style="letters">
          <t>
          advertise a PMSI bound to a tunnel, where the specified tunnel
          is not known to be down or up
          </t>
          <t>
          do not advertise any x-PMSI applicable to the given (C-S, C-G)
          but have associated a VRF Route Import BGP attribute to the
          unicast VPN route for S (this is necessary to avoid
          incorrectly invalidating a UMH PE that would use a policy
          where no I-PMSI is advertised for a given VRF and where only
          S-PMSI are used, the S-PMSI advertisement being possibly done
          only after the upstream PE receives a C-multicast route for
          (C-S, C-G)/(C-*, C-G) to be carried over the advertised
          S-PMSI).
          </t>
          </list>
      If the resulting candidate set is empty, then the procedure is
      repeated without considering the P-tunnel status.
          </t>

          <t>
      The third option uses the installed UMH Route (i.e., the "best"
      route towards the C-root) as the Selected UMH Route, and its
      originating PE is the selected Upstream PE.  With the optional
      procedure of considering P-tunnel status as in this document, the
      Selected UMH Route is the best one among those whose originating
      PE's P-tunnel is not "down".  If that does not exist, the
      installed UMH Route is selected regardless of the P-tunnel status.
          </t>
        </list>
        </t>

      <section anchor="tunnel-status-determination" title="Determining the status of a tunnel">
        <t>Different factors can be considered to determine the "status" of a
        P-tunnel and are described in the following sub-sections. The optional
        procedures proposed in this section also allow that all downstream PEs don't
        apply the same rules to define what the status of a P-tunnel is
        (please see <xref target="dups"> </xref>), and some of them will
        produce a result that may be different for different downstream PEs.
        Thus what is called the "status" of a P-tunnel in this section, is not
        a characteristic of the tunnel in itself, but is the status of the
        tunnel, <spanx style="strong">as seen from a particular downstream 
        PE</spanx>.  Additionally, some of the following methods determine 
        the ability of downstream PE to receive traffic on the P-tunnel 
        and not specifically on the status of the P-tunnel itself.  
        That could be referred to as "P-tunnel reception status", but for 
        simplicity, we will use the terminology of P-tunnel "status" for 
        all of these methods.</t>

        <t>Depending on the criteria used to determine the status of a
        P-tunnel, there may be an interaction with another resiliency mechanism
        used for the P-tunnel itself, and the UMH update may happen
        immediately or may need to be delayed. Each particular case is covered
        in each separate sub-section below.</t>

        <section title="mVPN tunnel root tracking">
          <t>A condition to consider that the status of a P-tunnel is up is
          that the root of the tunnel, as determined in the PMSI tunnel
          attribute, is reachable through unicast routing tables. In this case,
          the downstream PE can immediately update its UMH when the
          reachability condition changes.</t>

          <t>That is similar to BGP next-hop tracking for VPN routes, except
          that the address considered is not the BGP next-hop address, but the
          root address in the PMSI tunnel attribute.</t>

          <t>If BGP next-hop tracking is done for VPN routes and the root
          address of a given tunnel happens to be the same as the next-hop
          address in the BGP auto-discovery route advertising the tunnel, then
          using this mechanism for the tunnel will not bring
          any specific benefit.</t>
        </section>

        <section title="PE-P Upstream link status">
          <t>A condition to consider a tunnel status as Up can be that the
          last-hop link of the P-tunnel is up.</t>

          <t>Using this method when a fast
          restoration mechanism (such as MPLS FRR <xref target="RFC4090"/>) is in place for the link
          requires careful consideration and coordination of defect detection intervals for the link and the tunnel.
          In many cases, it is not practical to use both methods at the same time.</t>
        </section>

        <section title="P2MP RSVP-TE tunnels">
          <t>
          For P-tunnels of type P2MP MPLS-TE, the status of the P-tunnel is
   considered up if the sub-LSP to this downstream PE is in Up state. The determination of
          whether a P2MP RSVP-TE LSP is in Up state requires Path and Resv
          state for the LSP and is based on procedures specified in <xref target="RFC4875"/>.
          As a result, the downstream PE can
          immediately update its UMH when the reachability condition
          changes.
          </t>

          <t>When signaling state for a P2MP TE LSP is removed (e.g., if the
          ingress of the P2MP TE LSP sends a PathTear message) or the P2MP TE
          LSP changes state from Up to Down as determined by procedures in
          <xref target="RFC4875"/>, the status of the corresponding
          P-tunnel SHOULD be re-evaluated. If the P-tunnel transitions from up
          to Down state, the upstream PE that is the ingress of the P-tunnel
          SHOULD NOT be considered a valid UMH.</t>
        </section>

        <section title="Leaf-initiated P-tunnels">
          <t>An upstream PE SHOULD be removed from the UMH candidate list for a given (C-S, C-G)
          if the P-tunnel (I-PMSI or S-PMSI) for this (S, G) is leaf-triggered
          (PIM, mLDP), but for some reason, internal to the protocol, the
          upstream one-hop branch of the tunnel from P to PE cannot be built.
          As a result, the downstream PE can immediately update its UMH when
          the reachability condition changes.</t>
        </section>

        <section title="(C-S, C-G) counter information">
          <t>In cases, where the downstream node can be configured so that the
          maximum inter-packet time is known for all the multicast flows
          mapped on a P-tunnel, the local per-(C-S, C-G) traffic counter
          information for traffic received on this P-tunnel can be used to
          determine the status of the P-tunnel.</t>

          <t>When such a procedure is used, in the context where fast restoration
          mechanisms are used for the P-tunnels, a configurable timer MUST be configured
          on the downstream PE to wait before updating the UMH, to let the P-tunnel
          restoration mechanism happen. It is RECOMMENDED to provide a reasonable
          default value for this timer. An implementation SHOULD use three seconds as the default value
          for this timer.</t>

          <t>This method can be applicable, for instance, when a (C-S, C-G) flow is
          mapped on an S-PMSI.</t>

          <t>In cases where this mechanism is used in conjunction with 
the method described in <xref target="hot-standby"/>, no prior knowledge
          of the rate of the multicast streams is required; downstream PEs
          can compare reception on the two P-tunnels to determine when one of
          them is down.</t>
        </section>

        <section title="BFD Discriminator Attribute">
          <t>
          P-tunnel status MAY be derived from the status of a multipoint BFD session <xref target="RFC8562"/>
          whose discriminator is advertised along with an x-PMSI A-D route.
          </t>

          <t>
          This document defines the format and ways of using a new BGP attribute called the "BFD Discriminator".
          It is an optional transitive BGP attribute. The
          format of this attribute is defined as follows:
          </t>
          <figure align="left" title="Format of the BFD Discriminator Attribute">
          <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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    BFD Mode   |                  Reserved                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       BFD Discriminator                       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ~                         Optional TLVs                         ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
          ]]></artwork>
          </figure>

          <t>
          Where:
          <list style="hanging">
          <t>BFD Mode is the one octet long field. This specification defines the P2MP value (TBA3)  <xref target="iana-bfd-discr"/>.</t>
          <t>Reserved field is three octets long, and the value MUST be zeroed on transmission and ignored on receipt.</t>
          <t>BFD Discriminator is four octets long field.</t>
          <t>Optional TLVs is the optional variable-length field that MAY be used in the BFD Discriminator attribute for future extensions.
          TLVs MAY be included is a sequential or nested manner. Each TLV consists of:
          <list style="symbols">
          <t>one octet-long field of TLV 's Type value (<xref target="iana-bfd-attr-ext"/>)</t>
          <t>one octet-long field of the length of the Value field in octets</t>
          <t> variable length Value field.</t>
          </list>
          The length of a TLV MUST be aligned on four octets boundary.</t>
          </list>
          </t>
          <t>The BFD Discriminator attribute SHALL be considered malformed if its length is not a non-zero multiple of four.
           If malformed, the UPDATE message SHALL be handled using the approach of "treat-as-withdraw" per <xref target="RFC7606"/>.
</t>

        <!-- </section> -->

        <section title="Upstream PE Procedures">


          <t>When it is desired to track the P-tunnel status using a p2mp BFD session, the Upstream PE:
          
          <list style="symbols">
          <t>
          MUST initiate BFD session and set bfd.SessionType = MultipointHead 
          as described in <xref target="RFC8562"/>;
          </t>
          <t>
          when transmitting BFD Control packets, MUST as the destination IP address one of
          the internal loopback addresses from 127/8 range for IPv4 or
          one of IPv4-mapped IPv4 loopback addresses from ::ffff:127.0.0.0/104 range for IPv6;
          </t>
          <t>
          MUST use the IP address of the Upstream PE as source IP address when transmitting BFD control packets;
          </t>
          <t>
          MUST include the BFD Discriminator attribute in the x-PMSI A-D Route with the value set to My Discriminator value;
          </t>
          <t>
          MUST periodically transmit BFD control packets over the x-PMSI tunnel.
		  </t>
          </list>
          
          </t>

          <t>
   If the tracking of the P-tunnel by using a p2mp BFD session is
  enabled after the x-PMSI A-D route has been already advertised,
   the x-PMSI A-D
   Route MUST be re-sent with precisely the same attributes as before and
   the BFD Discriminator attribute included.
          </t>

          <t>
   If the x-PMSI A-D route is advertised with P-tunnel status tracked using
   the p2mp BFD session and it is desired to stop tracking P-tunnel
   status using BFD, then:
          
          <list style="symbols">
          <t>
          x-PMSI A-D Route MUST be re-sent with precisely the same attributes as
          before, but the BFD Discriminator attribute MUST be excluded;
          </t>
          <t>
          the p2mp BFD session SHOULD be deleted.
          </t>
          </list>
        
          </t>
        </section>

        <section title="Downstream PE Procedures">
          <t>
          Upon receiving the BFD Discriminator attribute in the x-PMSI A-D Route, the Downstream PE:
          <list style="symbols">
          <t>
          MUST associate the received BFD discriminator value with the P-tunnel
          originating from the Root PE and the IP address of the Upstream PE;
          </t>
          <t>
          MUST create p2mp BFD session and set bfd.SessionType = MultipointTail
          as described in <xref target="RFC8562"/>;
          </t>
          <t>
          MUST use the source IP address of the BFD control packet, the value of the BFD Discriminator field,
          and the x-PMSI tunnel identifier the BFD control packet was received
          to properly demultiplex BFD sessions.
          </t>
          </list>
          After the state of the p2mp BFD session is up, i.e., bfd.SessionState == Up,
           the session state will then be used to track the health of the P-tunnel.
          </t>

          <t>
          According to <xref target="RFC8562"/>, if the Downstream PE 
          receives Down or AdminDown in the State field of the BFD control packet or
          associated with the BFD session Detection Timer expires, the BFD session is down,
          i.e., bfd.SessionState == Down. When the BFD session state is Down,
          then the P-tunnel associated with the BFD session MUST be declared down.
          As a result, the Downstream PE MAY initiate a switchover of the traffic from the
          Primary Upstream PE to the Standby Upstream PE only if the Standby Upstream PE deemed available. 
          A different p2mp BFD session MAY be used to monitor the state of the P-tunnel from Standby Upstream PE.
          </t>

          <t>
          If the Downstream PE's P-tunnel is already up when the Downstream PE
          receives the new x-PMSI A-D Route with BFD Discriminator attribute, 
          the Downstream PE MUST accept the x-PMSI A-D Route and
          associate the value of BFD Discriminator field with the P-tunnel. The Upstream PE MUST follow
          procedures listed above in this section to bring the p2mp BFD session up and use it to monitor
          the state of the associated P-tunnel.
          </t>

          <t>
          If the Downstream PE's P-tunnel is already up, its state being monitored
          by the p2mp BFD session, and the Downstream PE receives the new x-PMSI A-D Route 
          without the BFD Discriminator attribute, the Downstream PE:
          <list style="symbols">
          <t>
          MUST accept the x-PMSI A-D Route;
          </t>
          <t>
          MUST stop processing BFD control packets for this p2mp BFD session;
          </t>
          <t>
          SHOULD delete the p2mp BFD session associated with the P-tunnel;
          </t>
          <t>
          SHOULD NOT switch the traffic to the Standby Upstream PE.
          </t>
          </list>
          </t>
<!--
          <t>
          In such a scenario, in the context where fast restoration
          mechanisms are used for the P-tunnels, leaf PEs should be
          configured to wait before updating the UMH, to let the P-tunnel
          restoration mechanism happen. A configurable timer MUST be provided
          for this purpose, and it is RECOMMENDED to provide a reasonable
          default value for this timer.
          </t>
  -->

        </section>
 
        </section>

        <section title="Per PE-CE link BFD Discriminator">
        
          <t>
   The following approach is defined in response to the detection by the
   upstream PE of PE-CE link failure.  Even though the provider tunnel
   is still up, it is desired for the downstream PEs to switch to a
   backup upstream PE.  To achieve that, if the upstream PE detects that
   its PE-CE link fails, it SHOULD set the bfd.LocalDiag of the p2mp BFD
   session to Concatenated Path Down and/or Reverse Concatenated Path
   Down (per section 6.8.17 [RFC5880]), unless it switches to a new PE-
   CE link within the time of bfd.DesiredMinTxInterval for the p2mp BFD
   session (in that case the upstream PE will start tracking the status
   of the new PE-CE link).  When a downstream PE receives that
   bfd.LocalDiag code, it treats as if the tunnel itself failed and
   tries to switch to a backup PE.
          </t>

        </section>



      </section>
    </section>

    <section anchor="standby-join" title="Standby C-multicast route">
      <t>
      The procedures described below are limited to the case where the site
      that contains C-S is connected to two or more PEs though, to simplify
      the description, the case of dual-homing is described. The procedures
      require all the PEs of that MVPN to follow the UMH selection,
      as specified in <xref target="RFC6513"/>, whether the PE selected based on its IP address,
      hashing algorithm described in section 5.1.3 <xref target="RFC6513"/>, or Installed UMH Route.
      The procedures assume
      that if a site of a given MVPN that contains C-S is dual-homed to two
      PEs, then all the other sites of that MVPN would have two unicast VPN
      routes (VPN-IPv4 or VPN-IPv6) routes to C-S, each with its RD.
      </t>

      <t>As long as C-S is reachable via both PEs, a given downstream PE will
      select one of the PEs connected to C-S as its Upstream PE for C-S.
      We will refer to the other PE connected to C-S as the "Standby
      Upstream PE". Note that if the connectivity to C-S through the Primary
      Upstream PE becomes unavailable, then the PE will select the Standby
      Upstream PE as its Upstream PE for C-S. When the Primary 
      PE later becomes available, then the PE will select the Primary Upstream 
      PE again as its Upstream PE. Such behavior is referred to as "revertive" behavior
      and MUST be supported.  Non-revertive behavior would refer to the behavior 
      of continuing to select the backup PE as the UMH even after the Primary has 
      come up. This non-revertive behavior MAY also be supported by an 
      implementation and would be enabled through some configuration.</t>

      <t>For readability, in the following sub-sections, the procedures are
      described for BGP C-multicast Source Tree Join routes, but they apply
      equally to BGP C-multicast Shared Tree Join routes failover for the case
      where the customer RP is dual-homed (substitute "C-RP" to "C-S").</t>

      <section anchor="ds-behavior" title="Downstream PE behavior">
        <t>When a (downstream) PE connected to some site of an MVPN needs to
        send a C-multicast route (C-S, C-G), then following the procedures
        specified in Section "Originating C-multicast routes by a PE" of <xref target="RFC6514"/> the PE sends the
        C-multicast route with RT that identifies the Upstream PE selected by
        the PE originating the route. As long as C-S is reachable via the
        Primary Upstream PE, and the Upstream PE is the Primary Upstream PE. If
        C-S is reachable only via the Standby Upstream PE, then the Upstream
        PE is the Standby Upstream PE.</t>

        <t>If C-S is reachable via both the Primary and the Standby Upstream
        PE, then in addition to sending the C-multicast route with an RT that
        identifies the Primary Upstream PE, the PE also originates and sends a
        C-multicast route with an RT that identifies the Standby Upstream PE.
        This route that has the semantics of being a 'standby' C-multicast
        route is further called a "Standby BGP C-multicast route", and is
        constructed as follows:</t>

        <t><list style="symbols">
            <t>the NLRI is constructed as the original C-multicast route,
            except that the RD is the same as if the C-multicast route was
            built using the standby PE as the UMH (it will carry the RD
            associated to the unicast VPN route advertised by the standby PE
            for S and a Route Target derived from the standby PE&#8217;s UMH
            route&#8217;s VRF RT Import EC);</t>

            <t>SHOULD carry the "Standby PE" BGP Community (this is a new BGP
            Community, see <xref target="IANA"/>).</t>
          </list></t>

        <t>The normal and the standby C-multicast routes MUST have their Local
        Preference attribute adjusted so that, if two C-multicast routes with
        same NLRI are received by a BGP peer, one carrying the "Standby PE"
        community and the other one <spanx style="strong">not</spanx> carrying
        the "Standby PE" community, then preference is given to the one 
        <spanx style="strong">not</spanx> carrying the "Standby PE" community. Such a
        situation can happen when, for instance, due to transient unicast
        routing inconsistencies or lack of support of the Standby PE community,
        two different downstream PEs consider
        different upstream PEs to be the primary one; in that case, without
        any precaution taken, both upstream PEs would process a standby
        C-multicast route and possibly stop forwarding at the same time. For
        this purpose, routes that carry the "Standby PE" BGP Community MUST have the LOCAL_PREF
        attribute set to zero.</t>

        <t>Note that, when a PE advertises such a Standby C-multicast join for
        a (C-S, C-G) it MUST join the corresponding P-tunnel.</t>

        <t>If at some later point the local PE determines that C-S is no
        longer reachable through the Primary Upstream PE, the Standby Upstream
        PE becomes the Upstream PE, and the local PE re-sends the C-multicast
        route with RT that identifies the Standby Upstream PE, except that now
        the route does not carry the Standby PE BGP Community (which results
        in replacing the old route with a new route, with the only difference
        between these routes being the presence/absence of the Standby PE BGP
        Community). Also, a LOCAL_PREF attribute MUST be set to zero.</t>
      </section>

      <section anchor="us-behavior" title="Upstream PE behavior">
        <t>When a PE receives a C-multicast route for a particular (C-S, C-G),
        and the RT carried in the route results in importing the route into a
        particular VRF on the PE, if the route carries the Standby PE BGP
        Community, then the PE performs as follows:
        <list style="hanging">
            <t hangText="">when the PE determines (the use of the particular
            method to detect the failure is outside the scope of this document)
            that C-S is not reachable
            through some other PE, the PE SHOULD install VRF PIM state
            corresponding to this Standby BGP C-multicast route (the result
            will be that a PIM Join message will be sent to the CE towards
            C-S, and that the PE will receive (C-S, C-G) traffic), and the PE
            SHOULD forward (C-S, C-G) traffic received by the PE to other PEs
            through a P-tunnel rooted at the PE.</t>
          </list>
          </t>

        <t>Furthermore, irrespective of whether C-S carried in that route is
        reachable through some other PE:</t>

        <t><list style="hanging">
            <t hangText="a)">based on local policy, as soon as the PE receives
            this Standby BGP C-multicast route, the PE MAY install VRF PIM
            state corresponding to this BGP Source Tree Join route (the result
            will be that Join messages will be sent to the CE toward C-S, and
            that the PE will receive (C-S, C-G) traffic)</t>

            <t hangText="b)">based on local policy, as soon as the PE receives
            this Standby BGP C-multicast route, the PE MAY forward (C-S, C-G)
            traffic to other PEs through a P-tunnel independently of the
            reachability of C-S through some other PE. [note that this implies
            also doing (a)]</t>
          </list></t>

        <t>Doing neither (a) or (b) for a given (C-S, C-G) is called "cold
        root standby".</t>

        <t>Doing (a) but not (b) for a given (C-S, C-G) is called "warm root
        standby".</t>

        <t>Doing (b) (which implies also doing (a)) for a given (C-S, C-G) is
        called "hot root standby".</t>

        <t>Note that, if an upstream PE uses an S-PMSI only policy, it shall
        advertise an S-PMSI for a (C-S, C-G) as soon as it receives a C-multicast
        route for (C-S, C-G), normal or Standby; i.e., it shall not wait for
        receiving a non-Standby C-multicast route before advertising the
        corresponding S-PMSI.</t>

        <t>Section 9.3.2 of <xref target="RFC6514"/>, describes the procedures of 
        sending a Source-Active A-D result as a result of receiving the C-multicast 
        route.  These procedures should be followed for both the normal and Standby 
        C-multicast routes.</t>
</section>

      <section title="Reachability determination">
        <t>
        The standby PE can use the following information to determine that
        C-S can or cannot be reached through the primary PE:
        <list style="symbols">
            <t>presence/absence of a unicast VPN route toward C-S</t>

            <t>supposing that the standby PE is the egress of the tunnel rooted
            at the Primary PE, the standby PE can determine the reachability
            of C-S through the Primary PE based on the status of this tunnel,
            determined thanks to the same criteria as the ones described in
            <xref target="tunnel-status-determination"/> (without using
            the UMH selection procedures of <xref target="tunnel-status"/>);</t>

            <t>other mechanisms MAY be used.</t>
          </list>
          </t>
      </section>
      
      <section anchor="interas" title="Inter-AS">
        <t>If the non-segmented inter-AS approach is used, the procedures in
        section 4 can be applied.</t>

        <t>When multicast VPNs are used in an inter-AS context with the
        segmented inter-AS approach described in section 8.2 of <xref target="RFC6514"/>, the procedures in
        this section can be applied.</t>

        <t>A pre-requisite for the procedures described below to be applied
        for a source of a given MVPN is:<list style="symbols">
            <t>that any PE of this MVPN receives two Inter-AS I-PMSI
            auto-discovery routes advertised by the AS of the source (or
            more)</t>

            <t>that these Inter-AS I-PMSI auto-discovery routes have distinct
            Route Distinguishers (as described in item "(2)" of <xref target="RFC6514">section 9.2
            of</xref>).</t>
          </list>As an example, these conditions will be satisfied when the
        source is dual-homed to an AS that connects to the receiver AS through
        two ASBR using auto-configured RDs.</t>

        <section title="Inter-AS procedures for downstream PEs, ASBR fast failover">
          <t>The following procedure is applied by downstream PEs of an AS,
          for a source S in a remote AS.</t>

          <t>Additionally, to choosing an Inter-AS I-PMSI auto-discovery route
          advertised from the AS of the source to construct a C-multicast
          route, as described in <xref target="RFC6514">section 11.1.3</xref> a
          downstream PE will choose a second Inter-AS I-PMSI auto-discovery
          route advertised from the AS of the source and use this route to
          construct and advertise a Standby C-multicast route (C-multicast
          route carrying the Standby extended community) as described in <xref target="ds-behavior"> </xref>.</t>
        </section>

        <section title="Inter-AS procedures for ASBRs">
          <t>When an upstream ASBR receives a C-multicast route, and at least
          one of the RTs of the route matches one of the ASBR Import RT, the
          ASBR, that supports this specification, MUST
          locate an Inter-AS I-PMSI A-D route whose RD and Source AS
          respectively match the RD and Source AS carried in the C-multicast route. If
          the match is found, and C-multicast route carries the Standby PE BGP
          Community, then the ASBR MUST perform as follows:
          <list style="symbols">
              <t>if the route was received over iBGP and its LOCAL_PREF attribute is set to zero, then it MUST be
              re-advertised in eBGP with a MED attribute (MULTI_EXIT_DISC) set
              to the highest possible value (0xffff)</t>

              <t>if the route was received over eBGP and its MED attribute set of 0xffff, then it MUST be
              re-advertised in iBGP with a LOCAL_PREF attribute set to zero</t>
            </list>
            Other ASBR procedures are applied without modification.</t>
        </section>
      </section>
    </section>

    <section anchor="hot-standby" title="Hot Root Standby">
      <t>The mechanisms defined in sections <xref target="standby-join"/> and <xref target="tunnel-status"/>
      can be used together as follows.</t>

      <t>The principle is that, for a given VRF (or possibly only for a given
      C-S,C-G):<list style="symbols">
          <t>downstream PEs advertise a Standby BGP C-multicast route (based
          on <xref target="standby-join"/>)</t>

          <t>upstream PEs use the "hot standby" optional behavior and thus
          will forward traffic for a given multicast state as soon as they have
          whether a (primary) BGP C-multicast route or a Standby BGP
          C-multicast route for that state (or both)</t>

          <t>downstream PEs accept traffic from the primary or standby tunnel,
          based on the status of the tunnel (based on <xref target="tunnel-status"/>)</t>
        </list></t>

      <t>Other combinations of the mechanisms proposed in <xref target="standby-join"/> and <xref target="tunnel-status"/>
      are for further study.</t>

      <t>Note that the same level of protection would be achievable with a
      simple C-multicast Source Tree Join route advertised to both the primary
      and secondary upstream PEs (carrying as Route Target extended
      communities, the values of the VRF Route Import attribute of each VPN
      route from each upstream PEs). The advantage of using the Standby
      semantic for is that, supposing that downstream PEs always advertise a
      Standby C-multicast route to the secondary upstream PE, it allows to
      choose the protection level through a change of configuration on the
      secondary upstream PE, without requiring any reconfiguration of all the
      downstream PEs.</t>
    </section>

    <section anchor="dups" title="Duplicate packets">
      <t><xref target="RFC6513">Multicast VPN
      specifications</xref> impose that a PE only forwards to CEs the packets
      coming from the expected upstream PE (Section 9.1).</t>

      <t>We highlight the reader's attention to the fact that the respect of
      this part of multicast VPN specifications is especially important when
      two distinct upstream PEs are susceptible to forward the same traffic on
      P-tunnels at the same time in the steady state. That will be the case when
      "hot root standby" mode is used (<xref target="standby-join"/>),
      and which can also be the case if procedures of <xref target="tunnel-status"/> are used and (a) the rules determining
      the status of a tree are not the same on two distinct downstream PEs or
      (b) the rule determining the status of a tree depends on conditions local
      to a PE (e.g., the PE-P upstream link being up).</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is requested to allocate the BGP "Standby PE" community value (TBA1)
      from the Border Gateway Protocol (BGP) Well-known Communities registry.</t>
      
      <section anchor="iana-bfd-discr" title="BFD Discriminator">
     <t>This document defines a new BGP optional transitive attribute, called
   "BFD Discriminator". IANA is requested to allocate a codepoint (TBA2) in the "BGP Path
   Attributes" registry to the BFD Discriminator attribute.</t>
   <t>
   IANA is requested to create a new BFD Mode sub-registry in Border Gateway Protocol (BGP)
   Parameters registry as described in <xref target="iana-bfd-mode-reg-tbl"/>.
   </t>
         <texttable anchor="iana-bfd-mode-reg-tbl" title="BFD Mode Sub-registry">
    <ttcol align="left">Range</ttcol>
    <ttcol align="center">Registration Procedures</ttcol>
    <ttcol align="left">Note</ttcol>
    <c>0-249</c>
    <c>Standards Action</c>
    <c></c>
    <c>250-253</c>
    <c>Specification Required</c>
    <c>Experimental </c>
    <c>254</c>
    <c>Private Use</c>
    <c/>
    <c>255</c>
    <c>Standards Action</c>
    <c/>
    </texttable> 
  
   <t>IANA is requested to allocate the following values from the BFD Mode sub-registry as defined in <xref target="iana-bfd-mode-table"/>.</t>
    <texttable anchor="iana-bfd-mode-table" title="BFD Mode">
    <ttcol align="left">Value</ttcol>
    <ttcol align="left">Description</ttcol>
    <ttcol align="left">Reference</ttcol>
    <c>0</c>
    <c>Reserved</c>
    <c>This document</c>
    <c>TBA3</c>
    <c>P2MP BFD Session</c>
    <c>This document</c>
         <c>255</c>
    <c>Reserved</c>
    <c>This document</c>
   </texttable>
   
   </section>
   
   <section anchor="iana-bfd-attr-ext" title="BFD Discriminator Extension Type">
     <t>
   IANA is requested to create a new BFD Discriminator Extension Type sub-registry in Border Gateway Protocol (BGP)
   Parameters registry as described in <xref target="iana-bfd-discr-ext-tbl"/>.
   </t>
         <texttable anchor="iana-bfd-discr-ext-tbl" title="BFD Discriminator Extension Type Sub-registry">
    <ttcol align='left'>Value</ttcol>
    <ttcol align='center'>Description</ttcol>
    <ttcol align='left'>Reference</ttcol>
    <c>0</c>
    <c>Reserved</c>
    <c></c>
    <c>1-191</c>
    <c>Unassigned</c>
    <c>IETF Review</c>
    <c>192-251</c>
    <c>Unassigned</c>
    <c>First Come First Served</c>
     <c>252-254</c>
    <c>Unassigned</c>
    <c>Private Use</c>
     <c>255</c>
    <c>Reserved</c>
    <c></c>
    </texttable> 
  
   </section>

    </section>

    <section anchor="Security" title="Security Considerations">
    <t>
    This document describes procedures based on <xref target="RFC6513"/> and <xref target="RFC6514"/>
    and hence shares the security considerations respectively represented in these specifications.
     </t>
     <t>
This document makes use of BFD, as defined in <xref target="RFC8562"/>,
which, in turn, is based on <xref target="RFC5880"/>.
Security considerations relevant to each protocol are discussed in
the respective protocol specifications.     
     </t>
    </section>

    <section anchor="Acknowledgments" title="Acknowledgments">
      <t>The authors want to thank Greg Reaume, Eric Rosen, Jeffrey Zhang,
      and Zheng (Sandy) Zhang for their reviews,
         useful comments, and helpful suggestions.</t>
    </section>
    <section title="Contributor Addresses">
      <t>
	Below is a list of other contributing authors in alphabetical order:
	<figure align="left">
	  <artwork align="left"><![CDATA[
   Rahul Aggarwal
   Arktan

   Email: raggarwa_1@yahoo.com



   Nehal Bhau
   Cisco

   Email: NBhau@cisco.com



   Clayton Hassen
   Bell Canada
   2955 Virtual Way
   Vancouver
   CANADA

   Email: Clayton.Hassen@bell.ca



   Wim Henderickx
   Nokia
   Copernicuslaan 50
   Antwerp  2018
   Belgium

   Email: wim.henderickx@nokia.com



   Pradeep Jain
   Nokia
   701 E Middlefield Rd
   Mountain View, CA  94043
   USA

   Email: pradeep.jain@nokia.com



   Jayant Kotalwar
   Nokia
   701 E Middlefield Rd
   Mountain View, CA  94043
   USA

   Email: Jayant.Kotalwar@nokia.com


   Praveen Muley
   Nokia
   701 East Middlefield Rd
   Mountain View, CA  94043
   U.S.A.

   Email: praveen.muley@nokia.com



   Ray (Lei) Qiu
   Juniper Networks
   1194 North Mathilda Ave.
   Sunnyvale, CA  94089
   U.S.A.

   Email: rqiu@juniper.net



   Yakov Rekhter
   Juniper Networks
   1194 North Mathilda Ave.
   Sunnyvale, CA  94089
   U.S.A.

   Email: yakov@juniper.net



   Kanwar Singh
   Nokia
   701 E Middlefield Rd
   Mountain View, CA  94043
   USA

   Email: kanwar.singh@nokia.com


	  ]]></artwork>
	</figure>
      </t>
    </section>



  </middle>

  <back>
    <references title="Normative References">
   <?rfc include="reference.RFC.2119"?>
   <?rfc include="reference.RFC.8174"?>
   <?rfc include="reference.RFC.6513"?>
    <?rfc include="reference.RFC.6514"?>
    <?rfc include="reference.RFC.4875"?>
    <?rfc include="reference.RFC.5880"?>
   <?rfc include="reference.RFC.8562"?>
   <?rfc include="reference.RFC.7606"?>

    </references>

    <references title="Informative References">

    <?rfc include="reference.RFC.4090"?>
    <?rfc include="reference.RFC.7431"?>

    </references>
  </back>
</rfc>
