<?xml version="1.0" encoding="US-ASCII"?>

<?xml-model href="rfc7991bis.rnc"?>

<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> --> 
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
  <!ENTITY I-D.ietf-bess-evpn-l2gw-proto SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-evpn-l2gw-proto.xml">
  <!ENTITY I-D.ietf-bess-evpn-mh-pa SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-evpn-mh-pa.xml">
  <!ENTITY I-D.draft-ietf-bess-rfc7432bis SYSTEM "https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-bess-rfc7432bis.xml">

]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->

<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->

<rfc category="std"
    xmlns:xi="http://www.w3.org/2001/XInclude"
    docName="draft-kriswamy-bess-evpn-perflow-df-01"
    updates=""
    consensus="true"
    submissionType="IETF"
    ipr="trust200902"
    tocInclude="true"
    tocDepth="4"
    symRefs="true"
    sortRefs="true">

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the 
        full title is longer than 39 characters -->
    <title abbrev="Per-Flow EVPN Designated Forwarder Election">Per-Flow EVPN Designated Forwarder Election</title>
    <seriesInfo name="Internet-Draft" value="draft-kriswamy-bess-evpn-perflow-df-01"/>

    <author fullname="Krishnaswamy Ananthamurthy" initials="K." surname="Ananthamurthy">
     <organization>Cisco</organization>
     <address>
	    <postal>
          <street>170 W. Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
       <email>kriswamy@cisco.com</email>
     </address>
   </author>

  <author fullname="Ali Sajassi" initials="A." surname="Sajassi">
     <organization>Cisco</organization>
     <address>
	    <postal>
          <street>170 W. Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
       <email>sajassi@cisco.com</email>
     </address>
   </author>
  
  <author fullname="Lukas Krattiger" initials="L." surname="Krattiger">
     <organization>Cisco</organization>
     <address>
	    <postal>
          <street>170 W. Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
       <email>lkrattig@cisco.com</email>
     </address>
   </author>   
   <date year="2026" />

   <!-- Meta-data Declarations -->
   <area>Routing</area>
   <workgroup>BESS Working Group</workgroup>

   <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions. 
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>BGP</keyword>

   <abstract>
	<t> The Ethernet Virtual Private Network (EVPN) solution offers procedures for electing a Designated Forwarder (DF) for multihomed Ethernet Segments.
		In this context, the Provider Edge (PE) router is responsible for sending Broadcast, Unknown Unicast, and Multicast (BUM) traffic to a multihomed 
		device or network. This applies in cases of an all-active multihomed Ethernet Segment (ES) as well as for BUM and unicast traffic in the case of 
		single-active multihoming. 
		While the Default Algorithm provides an efficient and automated mechanism for selecting the DF across Ethernet Tags within an Ethernet Segment,
		it does not provide Per-flow DF selection within an EVPN Instance (EVI).

		This document defines a new DF Election Algorithm that performs Per-flow DF selection by defining a new DF Algorithm value.
	</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 anchor="intro" title="Introduction">	
		<t> The EVPN solution offers procedures for electing a Designated Forwarder (DF) for multihomed Ethernet Segments.
			In this context, the PE router is responsible for sending BUM traffic to a multihomed 
			device or network. This applies in cases of an all-active multihomed ES as well as for BUM and unicast traffic in the case of 
			single-active multihoming. While the Default Algorithm provides an efficient and automated mechanism for selecting the DF across
			Ethernet Tags within an Ethernet Segment, it does not provide Per-flow DF selection within an EVPN Instance (EVI).
		</t>
		<t> This document defines a Per-flow DF Election Algorithm to provide fine-grained load sharing. This document updates <xref target="RFC8584"/> 
			by defining a new DF Algorithm value.
		</t>
	</section>
	
	<section title="Designated Forwarder Election Extended Community Extensions" anchor="DFEXT">

	<t> This solution reuses and extends the Designated Forwarder Election Extended Community defined in <xref target="RFC8584"/>
		that is advertised along with the Ethernet Segment route. This document defines a new DF Algorithm type Per-flow. 
		The format of the DF Election Extended Community that is used in this document follows:
	 </t>
		
		
	<figure anchor="df-election-extended-community"
			 title="DF Election Extended Community">
	<artwork><![CDATA[
 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=0x06     | Sub-Type(0x06)| RSV |  DF Alg |    Bitmap     ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~     Bitmap    |   Reserved                                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>

	<t> The DF Alg field identifies the DF Election Algorithm used for the Ethernet Segment. </t>
	<t> This document defines a new DF Algorithm value, Per-flow.
		IANA is requested to assign the value 6 from the "DF Alg" registry defined in  <xref target="RFC8584"/>. 
		The assigned value is encoded in the DF Algorithm field of the DF Election Extended Community.
	</t>

	<t>
		The procedures defined in <xref target="RFC8584"/> to handle Designated Forwarder Election Extended Community are applicable. 
	</t>
	
	<t>
		A PE MUST use the Per-flow DF Algorithm only if all participating PEs advertise the same DF Algorithm value for the Ethernet Segment.
		Otherwise, the procedures of <xref target="RFC8584"/> apply.
	</t>
	
	</section>
	
	<section anchor="Operation" title="Operation">
	<t>
		A PE that supports the Per-flow DF Algorithm MUST advertise the ES route with the DF Election Extended Community, with the DF Algorithm field set to Per-flow.
	</t>
	<t>
		A PE that supports the Per-flow DF Algorithm SHOULD perform DF election on a Per-flow basis when it receives an ES route containing the
		DF Election Extended Community with the DF Algorithm field set to Per-flow.
	</t>
	<t>
		A PE that does not recognize the advertised DF Algorithm SHALL process the DF Election Extended Community according to <xref target="RFC8584"/>.
	</t>
	<t>
		The ordered PE list defined in <xref target="RFC8584"/> SHALL be used.
		When operating in Per-flow Designated Forwarder (DF) mode, the hash computation SHALL use a set of packet header fields
		that are applicable to the packet being processed. The selection of fields is dependent on the packet format and protocol type.
		The exact choice of fields is outside the scope of this document. However, all participating PEs MUST use a consistent set of
		packet header fields for a given packet format to ensure that identical packets produce the same hash value across all participating PEs.
		
		The hash function MAY use a Cyclic Redundancy Check (CRC) or any other implementation-specific hashing algorithm.
		The choice of hash function is outside the scope of this document.
		To ensure consistent Per-flow DF selection across all PE routers participating in the ES, all such PE routers
		MUST use the same hashing algorithm. 
		Let H denote the hash value computed over the flow key, and let N denote the number of active PE routers in the ordered PE
		list defined by <xref target="RFC8584"/>. The number of participating PE routers MUST be used in the DF selection algorithm.
		The DF index, I, MUST be computed as follows:
		
	<artwork><![CDATA[
I = H mod N
	]]></artwork>

		The PE at position I in the ordered PE list defined by <xref target="RFC8584"/> SHALL be elected as the Designated Forwarder for the corresponding flow.
		This approach allows multiple flows within the same VLAN to be forwarded by different PE routers elected as the Designated Forwarder for a given Ethernet Segment.
		
		As long as the ordered PE list remains unchanged, a given flow is always mapped to the same DF.
		Whenever the set of active PE routers changes,
		the value of N changes, and the resulting DF assignment for existing flows may also change.
	</t>
	</section>
	
	<section title="Security Considerations">
		<t> 
			This document introduces no new security considerations beyond those discussed in <xref target="RFC7432"/> and <xref target="RFC8584"/>.
		</t>
	</section>
		<section anchor="iana" title="IANA Considerations">
			<t>This document solicits:</t>
			
		
		
		<t><list style="symbols">
          <t>The allocation of one new value in the "DF Alg" registry created
          by <xref target="RFC8584"/> as follows:<figure>
              <artwork><![CDATA[
Alg         Name                               Reference
----        -----------------------------      -------------
6           Per-flow                           This document]]>
              </artwork>
            </figure></t>
        </list></t>
		</section>


</middle>

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

<back>
    <!-- References split into informative and normative -->
    <references title="Normative References">
	    <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7432.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8584.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
    </references> 

</back>
</rfc>

