<?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="info" docName="draft-wang-bess-mvpn-upstream-df-selection-01"
     ipr="trust200902">
  <front>
    <title abbrev="MVPN Upstream DF Selection">Multicast
    VPN Upstream Designated Forwarder Selection</title>

    <author fullname="Heng Wang" initials="H." surname="Wang">
      <organization>Huawei Technologies</organization>

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

    <author fullname="Fanghong Duan" initials="F." surname="Duan">
      <organization>Huawei Technologies</organization>

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

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

    <abstract>
      <t>This document defines Multicast Virtual Private Network (VPN)
      extensions and procedures that allow fast failover for upstream failures
      by allowing upstream Provider Edges (PEs) to determine a single
      forwarder for a VPN multicast flow, without the downstream PEs'
      duplication prevention. The fast failover is accomplished by using
      Virtual Router Redundancy Protocol (VRRP) <xref target="RFC5798"/> or
      similar technologies for the upstream PEs to determine a single
      desinated fowarder. Also, this document introduces a new BGP Extended
      Community called "Upstream Forwarder Selection", carried by BGP VPN
      route so that the upstream PEs can inform downstream PEs the election
      behavior. The downstream PEs, accordingly, send C-multicast routes to
      both the primary and standby upstream PEs and forward the multicast flow
      comming from both sides to the CEs.</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>MVPN <xref target="RFC6513"/> and <xref target="RFC6514"/> defines
      the MVPN architecture and MVPN protocol specification which
      include the basic procedures for selecting the Upstream Multicast Hop.
      Further <xref target="RFC9026"/> defines some extension that allow fast
      failover for upstream failures by allowing downstream PEs to consider
      the status of Provider-Tunnels (P-tunnels) when selecting the Upstream
      PE for a VPN multicast flow. However, there are some problems when
      deploying the "hot root standby" mechanism described in <xref
      target="RFC9026"/>.</t>

      <t>First, all the ingress PEs, regardless of the primary or standby
      role, forward (C-S,C-G) flow to other PEs though a P-tunnel, forcing the
      egress PEs to discard all but one, which will cause the steady traffic
      redundancy throughout the backbone network.</t>

      <t>Second, an efficient and accurate method for the downstream PEs to
      determine the "status" of a P-tunnel is required, which is somewhat
      complicated in some cases, as mentioned in Section 3.1.8 of <xref
      target="RFC9026"/></t>

      <t>This document proposes a different "warm root standby" procedure
      mentioned in Section 4.2 of <xref target="RFC9026"/>. The procedures
      include a) an upstream designated forwarder election between multi homing
      ingress PEs, and b) the downstream PEs' advertising Primary and Standby
      BGP C-multicast route and accepting traffic from any of both sides.</t>

      <t>Section 3 describes procedures allowing multi homing ingress PEs to
      determine "locally" a single forwarder to avoid duplicate packets
      sending through the backbone, without the egress PEs' primary or standby
      UMH selection.</t>

      <t>Section 4 describes an optional BGP Extended Community called
      "Upstream Forwarder Selection", which is carried by BGP VPN routes (SAFI
      128 or 129), to inform the downstream PEs the selection behavior
      describes in Section 3.</t>

      <t>Section 5 describes the downstream PEs' behavior in this case. The
      downstream PEs advertise C-multicast Source Tree Join route to both the
      primary and secondary Upstream PEs (carrying, as Route Target extended
      communities, the values of the VRF Route Import Extended Community of
      each VPN route from each Upstream PE). The Upstream Forwarder Selection
      Extended Community indicates that the packet duplication prevention will
      be accomplished by the upstream PEs and that any of the traffic from both
      the primary and secondary upstream PEs would be acceptable to be forwarded
      to the CEs.</t>
    </section>

    <section title="Terminology">
      <t>Readers of this document are assumed to be familiar with the
      terminology and concepts of the documents listed as Normative
      References.</t>
    </section>

    <section title="Upstream Designated Forwarder Selection">
      <t/>
      <t>Section 9.1.2 of <xref target="RFC6513"/> describes a "single
      forwarder selection" to ensure that duplicate packets not sending
      through the backbone. This document proposes a deployment of VRRP or
      some similar technology to enable dual or multi homing ingress PEs to
      determine a designated forwarder.</t>

      <section title="Upstream Designated Forwarder Selection by VRRP">
        <t/>

        <t>VRRP specifies an election protocol that dynamically assigns
        responsibility for a virtual router to one of the VRRP routers on a
        LAN. The VRRP router controlling the IPv4 or IPv6 address(es)
        associated with a virtual router is called the Master, and it forwards
        packets sent to these IPv4 or IPv6 addresses. Similarly, the
        role of the VRRP routers associated with a virtual router can also be
        that of the upstream PEs in MVPN dual homing upstream PEs deployment.</t>
        <t>
          <list>
          <t>Virtual Router -- pair of dual homing upstream PEs</t>
          <t>Virtual Router Master -- the primary upstream PE</t>
          <t>Virtual Router Backup -- the standby upstream PE</t>
          </list>
        </t>
        <t>The method of mapping the role of a VRRP router to that of a MVPN
        upstream PE is more likely an administrative measure and could be
        implemented as configurable policies. Both the primary and standby PEs
        install VRF PIM state corresponding to BGP Source Tree Join route and
        send C-Join messages to the CE toward C-S. Whereas only the primary
        upstream PE (Virtual Router Master according to VRRP) forwards (C-S,C-G)
        flow to downstream PEs through a P-tunnel.</t>

        <t><figure align="left" title="VRRP Mapped Upstream DF Selection">
            <artwork><![CDATA[ 
                      + - - - - - - - - - - +
                          +-------------+
               +------|---| Root PE DF  |---| - * - * - +
               |          |(VRRP Master)|               |
               |      |   +-------------+   |           *
               |              |                         |
               |      |       *             |           *
               |              |                         |
             +----+   |   +-------------+   |      +---------+
    Src - * -| CE |--- ---| Root PE BDF |---  - * -| Leaf PE |- * - Rcv
             +----+   |   |(VRRP Backup)|   |      +---------+
                          +-------------+    
                      |   Virtual Root PE   |
                       (VRRP Virtual Router) 
                      + - - - - - - - - - - +
        ]]></artwork>
          </figure>
        </t>

      </section>

      <section title="Other Feasible Selection Technologies">
        <t/>

        <t>VRRP is just an example of the feasible choices for the dual homing
        upstream PEs' single forwarder selection. Other private implementations
        or similar designated forwarder selection technologies could also be
        optional for further study. However, a feasible technology should has
        the ability of being deployed per VRF and being associated with one
        Multicast VPN instance.</t>

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

    <section title="Upstream Designated Forwarder Selection Extended Community">
      <t/>

      <t>This document defines a new BGP Extended Community called "Upstream
      Designated Forwarder Selection", by which upstream PEs may inform
      downstream PEs the Single Forwarder Selection behavior mentioned in
      section 9.1.2 of [RFC6513].  Downstream PEs may execute dual-direction
      UMH and anycast RPF checking accordingly.</t>

      <t>The Upstream Designated Forwarder Selection is an IP-address-specific
      Extended Community, of an extended type, and is transitive across AS
      boundaries <xref target="RFC4360"/>.</t>

      <t>An upstream PE constructs Upstream Designated Forwarder Selection as
      follows, regardless of the role of the selection result:</t>

      <t><figure align="left" title="Upstream DF Selection Extended Community">
            <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(TBD)   |   Sub-Type    |    Global Administrator       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Global Administrator (cont.)  |    Local Administrator        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        ]]></artwork>
          </figure>
      </t>
      <t>
        <list>
        <t>The Global Administrator field of the Upstream Forwarder Selection
        SHOULD be set to a virtual IP address (or similar identity) of the
        upstream PEs (such as the VRRP Virtual IP address when using VRRP),
        which is identical between primary and standby PEs.</t>

        <t>The Local Administrator field of the Upstream Forwarder Selection
        SHOULD be set to a master or backup status determined by the election
        which is different between primary and standby PEs.</t>
        </list>
      </t>

      <t>Similar with the carrying of the VRF Route Import Extended Community
      imposed in Section 7 of <xref target="RFC6514"/>, the multi homing PEs
      MUST also include in the BGP Updates message that carries the (unicast)
      VPN route the Upstream Forwarder Selection Extended Community that has
      the value of DF election result associated with this VRF.</t>

      <t/>
    </section>

    <section title="Downstream PE Behavior">
      <t/>

      <section title="Standby C-multicast Route Advertisment">
        <t/>

        <t>The Standby BGP C-multicast route advertisement described in Section 4
        of <xref target="RFC9026"/> is still necessary. One downstream PE needs to
        determine a secondary UMH, originates and sends C-multicast routes with RTs
        that identify both the Primary and Standby Upstream PEs. However, because of
        the duplication prevention being accomplished by the upstream DF selection
        described above, carrying the new Standby PE BGP Communities with C-multicast
        routes is no longer a indispensable requirement.</t>

        <t/>
      </section>

      <section title="Anycast Reverse Path Forwarding Checking">
        <t/>

        <t>Multicast VPN specifications <xref target="RFC6513"/> impose that a
        downstream PE only forwards to CEs the packets coming from the
        expected Upstream PE (Section 9.1.1 of <xref target="RFC6513"/>).</t>

        <t>When performing the UMH selection, if a route in the set of VPN-IP
        eligible UMH routes carries the Upstream Forwarder Selection Extended
        Community, the Upstream PE determined from the route should be
        considered a potentially valid Upstream PE. In most cases, there should
        be two of that routes for one (C-S,C-G) flow, indicateing the primary
        and standby upstream PEs. As a result, the downstream PE accepts the
        (C-S,C-G) flow from any of both sides and forward it to CEs. It is a
        kind of "anycast" reverse path forwarding (RPF) checking. Eventually,
        it is the upstream single forwarder selection mechanism that ensures the
        duplicate packets not passing through the backbone network, as described
        in Section 3.</t>

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

    <section title="Security Considerations">
      <t>This document introduces no new security considerations beyond those
      already specified in <xref target="RFC6513"/> and <xref
      target="RFC6514"/>.</t>

      <t/>
    </section>

    <section title="IANA Considerations">
      <t>This document contains no actions for IANA.</t>

      <t/>
    </section>

    <section title="Acknowledgements">
      <t>The authors wish to thank Jingrong Xie, for his reviews, comments and
      suggestions.</t>

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

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

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

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

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

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

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

      <?rfc include='reference.RFC.8174'?>
    </references>
  </back>
</rfc>
