<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<?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;">
]>
<!-- 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
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-pavann-bess-evpn-vlan-tag-00"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">
   <front>
      <title abbrev="EVPN VLAN Tag Extended Community">EVPN VLAN Tag Extended Community</title>

      <seriesInfo name="Internet-Draft" value="draft-pavann-bess-evpn-vlan-tag-00"/>

      <author fullname="Pavan Narasimhaprasad" initials="P" surname="Narasimhaprasad">
         <organization>Arista Networks</organization>
         <address>
            <email>pavann@arista.com</email>
         </address>
      </author>

      <author fullname="Mason Rumuly" initials="M" surname="Rumuly">
         <organization>Arista Networks</organization>
         <address>
            <email>mrumuly@arista.com</email>
         </address>
      </author>

      <author fullname="Akhil Shashidhar" initials="A" surname="Shashidhar">
         <organization>Arista Networks</organization>
         <address>
            <email>akhil@arista.com</email>
         </address>
      </author>

      <date year="2026"/>
      <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
      -->

      <area>rtg</area>
      <workgroup>BGP Enabled Services</workgroup>
      <!-- "Internet Engineering Task Force" 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 RFC Series. -->

      <keyword>EVPN</keyword>
      <keyword>VLAN</keyword>
      <keyword>Type-2</keyword>

      <abstract>
         <t>
            Ethernet Virtual Private Network (EVPN), as defined in RFC 7432, provides a 
            control plane for distributing MAC and IP address bindings using BGP MAC/IP 
            Advertisement routes. In several deployment scenarios, policy decisions depend 
            not only on MAC/IP bindings but also on VLAN encapsulation information,
            particularly in environments using - IEEE 802.1Q VLAN tagging and IEEE 802.1ad 
            provider bridging (QinQ). 
         </t>
         
         <t>
            However, RFC 7432 does not define a mechanism to propagate VLAN information associated 
            with MAC/IP bindings. This document defines a new EVPN Extended Community that carries 
            VLAN identifiers to enable consistent policy enforcement across EVPN Provider Edge devices. 
            This document does not modify EVPN route selection or forwarding behavior defined in RFC 7432.
         </t>
      </abstract>
   </front>

   <middle>
      <section>
         <name>Introduction</name>
         <t>
            <xref target="RFC7432"/> defines MAC/IP Advertisement Route, which can optionally 
            carry IPv4 or IPv6 addresses associated with a MAC address. The MPLS Label1 field is 
            encoded as 3 octets, where the high-order 20 bits contain the label value. The MPLS 
            Label1 must be downstream assigned, and it is associated with the MAC address being 
            advertised by the advertising PE.  The advertising PE uses this label for applying 
            policies on the received route and  performs forwarding based on the destination 
            MAC address toward the CE.
         </t>

         <t>
            In case any routing policies need to be made on an additional label such as a VLAN 
            identifier, then the information conveyed in the EVPN MAC/IP Advertisement Route may 
            not be enough for the remote PE to apply the right policies and eventually make the 
            correct forwarding decision towards the CE.
         </t>

         <t>
         A new Extended Community that is advertised along with an EVPN MAC/IP Advertisement Route 
         and carries information relevant to the VLAN identifiers so that an EVPN PE can apply the 
         right policies based on this information is defined in this document.
         </t>
      </section>

      <section>
         <name>Terminology</name>

         <section>
            <name>Requirements Language</name>
            <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>
            <name>Terms and Abbreviations</name>
            <dl newline="true">
               <dt>EVPN</dt>
               <dd>
                  Ethernet Virtual Private Network.  A BGP-based protocol for building
                  VPNs and network overlays.  Defined in <xref target="RFC7432"/> for
                  use with MPLS encapsulation, and extended in <xref target="RFC8365"/>
                  for use with alternative encapsulations, including VXLAN
               </dd>
               <dt>PE</dt>
               <dd>Provider Edge device</dd>
               <dt>VLAN</dt>
               <dd>Virtual LAN.  A single bridging domain local to a device.</dd>
               <dt>CE</dt>
               <dd>Customer Edge device</dd>
               <dt>BD</dt>
               <dd>Broadcast Domain</dd>
               <dt>ARP</dt>
               <dd>Address Resolution Protocol</dd>
               <dt>ND</dt>
               <dd>Neighbor Discovery protocol, specified in <xref target="RFC4861"/></dd>       
            </dl>
         </section>
      </section>

      <section>
         <name>The EVPN VLAN-Tag Extended Community</name>

         <t>
         This document defines a transitive EVPN Extended Community
         (Type field value of 0x06) with a Sub-Type of TBD, as
         allocated by IANA. It is advertised along with EVPN MAC/IP
         Advertisement routes that carry an IPv4 or IPv6 address.
         </t>

   <artwork type="ascii-art" name="">
   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=0x06   |  Sub-Type=TBD |   Flags   |  Reserved |       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    VLANID3    |         VLANID2       |        VLANID1        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Flags field

   0 1 2 3 4 5
   +-+-+-+-+-+-+
   |Stacke.|VL.|
   +-+-+-+-+-+-+
      </artwork>

         <t>
            The Flags field is a composite value of Stacked VLAN Type and VLAN count.
            Stacked VLAN Type can be one of the following values:
         </t>
         <t>0x01 - Host was learnt via Single-tagged IEEE 802.1Q frames. The following represents a Single-tagged 802.1Q packet format </t>
         
<artwork type="ascii-art" name="">
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|DestMAC | SrcMAC | 802.1Q  | EtherType | Payload | CRC/FCS |
|                            TPID=0x8100                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
         
         
<t>0x02 - Host was learnt via IEEE 802.1Q double-tagged frames. The following represents a 802.1Q double-tagged packet format </t>
         
<artwork type="ascii-art" name="">
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|DestMAC | SrcMAC |   802.1Q      | 802.1Q     | EtherType | Payload | CRC/FCS| 
|                   TPID=0x8100    TPID=0x8100                                | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
         

         <t>0x03 - Host was learnt via IEEE 802.1ad frames. The following represents a IEEE 802.1ad double-tagged packet format </t>

<artwork type="ascii-art" name="">

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|DestMAC | SrcMAC |   802.1Q      | 802.1Q     | EtherType | Payload | CRC/FCS| 
|                   TPID=0x88A8    TPID=0x8100                                | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

</artwork>
         
         
         <t>VLAN Count indicates the number of VLAN IDs present in the extended community
            The valid range of this field must be 1-3. All other values are invalid.
            The receiver PE  MUST treat an invalid value as an invalid Extended Community and MUST ignore it.
         </t>

         <t>VLANID1, VLANID2, VLANID3 must be in the range of 1 through 4094. Any other value MUST be considered
            as invalid.
         </t>
         <t>Reserved field MUST be set to zero on transmission and MUST be ignored on receipt.</t>

         <t>
            If more than one instance of this Extended Community is present in the EVPN MAC/IP route Advertisement,
            then the first EVPN VLAN Extended community is considered and the rest of the EVPN VLAN Extended communities
            MUST be ignored.
         </t>
      
         <section>
            <name>Use of the EVPN VLAN Tag Extended Community</name>
            <t>
               This section describes the relevant procedures when advertising and processing the EVPN VLAN Tag Extended Community.
               In this section, the term "PE" refers to a PE that supports the procedures defined in this document.
            </t>
            <section>
               <name>Transmission of the EVPN VLAN Tag Extended Community</name>
               <t>A PE MAY learn IP-to-MAC bindings through mechanisms other than EVPN, including:</t>
               <ul>
                  <li>Static configuration via the management plane</li>
                  <li>ARP or Neighbor Discovery (ND) learning (including proxy ARP/ND)</li>
                  <li>Snooping of ARP or Neighbor Advertisement (NA) messages received from a CE</li>
               </ul>
               <t>When advertising the EVPN VLAN Tag community using EVPN MAC/IP Advertisement routes:</t>
               <ul>
                  <li>
                     If the binding is learned from a single-tagged IEEE 802.1Q frames, the PE MAY include the EVPN VLAN Tag Extended Community
                     with Stacked VLANs = 0x01.
                  </li>
                  <li>
                     If the binding is learned from double-tagged IEEE 802.1Q frames, the PE MAY include the EVPN VLAN Tag Extended Community with:
                     Stacked VLANs = 0x02.
                  </li>
                  <li>
                     If the binding is learned from IEEE 802.1ad frames, the PE MAY include the EVPN VLAN Tag Extended Community with:
                     Stacked VLANs = 0x03.
                  </li>
                  <li>
                     Based on the number of VLAN IDs that are present as part of the VLANIDs field, the count field is set appropriately 
                     whose value will have a range of 1-3.
                  </li>
                  <li>
                     The Reserved bits of the VLANIDs  are always set to 0.
                  </li>  
               </ul>
               <t>This Extended Community does not modify procedures defined in RFC 7432, including the use of the MAC Mobility Extended Community.</t>
            </section>

            <section>
               <name>Reception of the EVPN VLAN Tag Extended Community</name>
               <t>
                  Upon receiving an EVPN MAC/IP Advertisement route, a PE MUST process the EVPN VLAN Tag Extended Community as follows:
               </t>
               <ul>
                  <li>
                     A route MUST NOT have more than one such Extended Community. If multiple instances are received then the first 
                     community is processed and all other  instances MUST be ignored.
                  </li>
                  <li>
                     Based on the VLAN Count received, VLANIDs starting from VLANID1 are appropriately read.
                  </li>
               </ul>
            </section>
         </section>
      </section>

      <section anchor="IANA">
         <name>IANA Considerations</name>
         <t>
            A new transitive extended community Type of 0x06 and Sub-Type of TBD for EVPN VLAN Tag Extended Community
            needs to be allocated by IANA.
         </t>
      </section>

      <section anchor="Security">
         <name>Security Considerations</name>
         <t>
             This document relies on the EVPN control plane defined in <xref target="RFC9742"/>. Therefore, all security considerations 
             described therein apply.
         </t>
         <t>
            An attacker MAY exploit ARP or ND mechanisms to create excessive state in PEs within the same Broadcast Domain, potentially leading to resource exhaustion.
            Implementations SHOULD consider mitigation techniques, including:
         </t>
         <ul>
            <li>Limiting the number of proxy ARP/ND entries per BD or per interface.</li>
            <li>Monitoring and rate-limiting the creation of dynamic entries.</li>
         </ul>
         <t>
            This document does not introduce new security considerations beyond those already present in EVPN.
         </t>
      </section>
   </middle>

   <back>
       <references>
         <name>References</name>
         <references>
            <name>Normative References</name>
            
            <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.4861.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.8174.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8365.xml"/>
            <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9742.xml"/>
         </references>
      </references>
   </back>
</rfc>
