<?xml version="1.0" encoding="iso-8859-1"?>
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2629 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc5884 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5884.xml">
<!ENTITY rfc7432 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7432.xml">
<!ENTITY rfc8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY rfc8584 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8584.xml">
<!ENTITY I-D.ietf-bess-evpn-lsp-ping PUBLIC "" "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-evpn-lsp-ping.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc disable-output-escaping="yes"?>
<rfc category="std" docName="draft-zwm-bess-es-failover-03" ipr="trust200902">
  <!-- ***** FRONT MATTER ***** -->
  <front>
    <title abbrev="EVPN ES Failover use case">Bidirectional Forwarding Detection (BFD) for EVPN Ethernet Segment Failover Use Case</title>
	
	<author fullname="Zheng(Sandy) Zhang" initials="Z" surname="Zhang">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street>No. 50 Software Ave, Yuhuatai Distinct</street>
          
          <city>Nanjing</city>
          
          <region/>
  
          <code/>

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

        <email>zhang.zheng@zte.com.cn</email>
      </address>
    </author>
	
	 <author fullname="Yubao Wang" initials="Y" surname="Wang">
      <organization>ZTE Corporation</organization>

      <address>
        <postal>
          <street>No. 50 Software Ave, Yuhuatai Distinct</street>
          
          <city>Nanjing</city>
          
          <region/>
  
          <code/>

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

        <email>wang.yubao2@zte.com.cn</email>
      </address>
    </author>

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

	<date year="2020"/>	
    <area>Rtg</area>
    <workgroup>BESS WG</workgroup>
    <keyword>EVPN, ES, FAILOVER</keyword>
    <abstract>
     <t>This document introduces a method for fast switchover of Designated Forwarder for Ethernet Segment failover by using Bidirectional Forwarding Detection protocol.</t>
    </abstract>
  </front>

  <!-- ***** MIDDLE MATTER ***** -->

  <middle>
    <section title="Introduction">
     <t><xref target="RFC7432"/> introduces Ethernet Virtual Private Network (EVPN) technology. Designated Forwarder (DF)
     election procedures for multi-homing Ethernet Segments has been described in it. When PE (provider edge)
     receives BUM (Broadcast, Unknown Unicast and Multicast) flows, only DF forwards the BUM flows to CE (customer edge).
     Non-DFs do not forward the BUM flows in order to avoid duplication. If the link between DF and CE fails, another PE will forward the BUM flows after it is elected as DF.</t>

    <t><xref target="RFC8584"/> defines the DF election framework, including that Backup Designated Forwarder (BDF)
    can be elected as the next best for the role. But before the BDF is elected as DF, the BUM flows are discarded after the link between DF and CE fails.</t>

	 <figure align="center">
            <artwork align="center"><![CDATA[			
                +-----+
     +-----X----+ PE1 | 
     |          +--+--+      
     |
   +-+--+ 
   | CE |
   +-+--+ 
     |
     |          +--+--+
     +----------+ PE2 |
                +-----+
            ]]></artwork>
       <postamble/>
      </figure>

    <t>For example, CE is multihomed to PE1 and PE2. PE1 is elected as DF. All BUM flows are forwarded by PE1
    when the link between PE1 and CE is operational. When the link between PE1 and CE fails, the BUM flows are discarded until PE2 is elected as DF.</t>

    <t>This document will use terminology defined in <xref target="RFC7432"/> and <xref target="I-D.ietf-bess-evpn-lsp-ping"/>.</t>
	</section>
	   <section title="Conventions used in this document">
     <section title="Terminology">
        <t>BFD:        Bidirectional Forwarding Detection</t>
        <t>BDF:        Backup Designted Forwarder</t>
        <t>DF:           Designated Forwarder</t>
        <t>BUM:       Broadcast, Unknown unicast, and Multicast</t>
        <t>PE:           Provider Edge</t>
        <t>EVPN:     Ethernet Virtual Private Network</t>
        <t>CE:            Customer Edge</t>
        <t>ES:            Ethernet Segment</t>
        <t>ESI:           Ethernet Segment Identifier</t>
     </section>
     
    <section 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>
    </section>
    </section>
     
	<section title="Proposal"> 
	<t>In order to avoid the BUM packet loss on BDF after the link between DF and CE fails,
	a data-plane detection function is needed for DF fast switchover. <xref target="RFC5884"/>
	provides mechanisms for using LSP Ping to bootstrap a BFD session. <xref target="I-D.ietf-bess-evpn-lsp-ping"/>
	introduces four new Target FEC Stack sub-TLVs that are included in the LSP-Ping Echo Request packet.
	This document uses the mechanisms defined in <xref target="RFC5884"/> and the EVPN Ethernet Auto-Discovery (AD) sub-TLV
	defined in <xref target="I-D.ietf-bess-evpn-lsp-ping"/> to provide DF fast switchover by data-plane failure detection. </t>

    <t>An LSP-Ping Echo Request message which carries EVPN AD Sub-TLV associated with the DF-CE Ethernet Segment Identifier (ESI)
    is used to bootstrap the BFD session between BDF and DF. After the BFD session is built, when the Ethernet Segment (ES) fault occurs on DF-CE link,
    BDF detects the fault by the state change BFD control packet sent by DF, or BDF detects the fault when the detection timer expires.
    Then BDF becomes DF and will forward the BUM flows to CE.</t>
     </section>

	<section title="Specification"> 
	<t><xref target="I-D.ietf-bess-evpn-lsp-ping"/> section 4.3 defines an Ethernet AD sub-TLV as a new Target FEC Stack sub-TLV.
	It is carried in the LSP-Ping Echo Request message. BDF generates an LSP-Ping Echo Request message
	which carries the associated ES AD sub-TLV. And BDF sends the message with a local discriminator assigned by BDF for this BFD session to DF.
	DF responds with the BFD control packet with 'Your discriminator' set to the discriminator value received in the Echo request message from the BDF.
	BDF can demultiplex the BFD session based on the received 'Your Discriminator' field.</t>

    <t>After the BFD session is established, when the link between DF and CE fails, DF MUST  send a BFD control packet with the value of State field set to AdminDown
    through the established BFD session to BDF. If DF is not operational, BDF also detects the failure when the BFD detection time expires.
    Then BDF becomes DF immediately and forwards the BUM flows to CE.</t>

    <t>When the ES between 'old' DF and CE recovers, the BFD session MAY be reused or a new BFD session can be established for the ES failover monitor.</t>

    <t>For the same example in last section, PE2 generates an LSP-Ping Echo Request message which carries the associated ES AD sub-TLV
    and sends the message with an assigned local discriminator to DF. PE1 responds with a BFD control packet with 'Your Discriminator'
    set to the received discriminator from PE2. PE2 can demultiplex the BFD session based on the received 'Your Discriminator' field.</t>

    <t>When the link between PE1 and CE fails, PE1 sends a BFD control packet with the state set to AdminDown to PE2 through the BFD session.
    If the packet is lost, PE2 also can detect the fault by the session detection time expiration. PE2 becomes DF immediately, then the BUM packets can be forwarded to CE. </t>

    <t>The value of bfd.DetectMult (detect multiplier) determines when a BFD system detects a failure.
    Once BDF detects the loss of the number, equal to the detect multiplier, of consecutive BFD messages
    for the session between DF and BDF are lost, the BDF will elect itself as DF.
    Then, BUM flows are duplicated because of the two DFs.
    To avoid this situation, the bfd.DetectMult MUST be set to more than 1 (common default value is 3).</t>

	<section title="BDF changes"> 
    <t>If a new router, which can become new BDF, joins the network, the 'old' BDF MUST send a number of consecutive
    BFD messages with the State set to AdminDown to DF, then DF will remove this BFD session.
    When DF receives a new session request from the new BDF, DF establishes a new BFD session with the new BDF.</t>
    </section>    
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce any new security considerations
   other than already discussed in <xref target="RFC7432"/> and <xref target="RFC5884"/>. </t>
    </section>
	
    <section anchor="IANA" title="IANA Considerations">
      <t>There is no IANA consideration.</t>
     </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
  
  <references title="Normative References">
  &rfc5884;
  &rfc2119;
  &rfc7432;
  &rfc8174;
	&rfc8584;
	&I-D.ietf-bess-evpn-lsp-ping;
    </references>

	</back>
</rfc>
