<?xml version="1.0" encoding="UTF-8"?>

<!-- [rfced] updated by Chris 10/29/20 -->

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="draft-ietf-bfd-vxlan-16" number="0000" ipr="trust200902"
     obsoletes="" updates="" submissionType="IETF" category="info"
     consensus="true" xml:lang="en" tocInclude="true" tocDepth="4"
     symRefs="true" sortRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 3.3.0 -->

  <front>
    <title abbrev="BFD for VXLAN">
    BFD for VXLAN
    </title>
    <seriesInfo name="RFC" value="0000"/>

     <author fullname="Santosh Pallagatti" role="editor" initials="S." surname="Pallagatti">
      <organization>VMware</organization>
      <address>
        <email>santosh.pallagatti@gmail.com</email>
      </address>
    </author>
    <author fullname="Greg Mirsky" role="editor" initials="G." surname="Mirsky">
      <organization>ZTE Corp.</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    <!--
    <author fullname="Basil Saji" initials="B."
            surname="Saji">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
        <street>Embassy Business Park</street>
        <city>Bangalore</city>
        <region>KA</region>
        <code>560093</code>
        <country>India</country>
        </postal>
        <email>sbasil@juniper.net</email>
      </address>
    </author>
-->	
	<author fullname="Sudarsan Paragiri " initials="S." surname="Paragiri">
      <organization>Individual Contributor</organization>
      <address>
        <email>sudarsan.225@gmail.com</email>
      </address>
    </author>
    <author fullname="Vengada Prasad Govindan" initials="V." surname="Govindan">
      <organization>Cisco</organization>
      <address>
        <email>venggovi@cisco.com</email>
      </address>
    </author>
    <author fullname="Mallik Mudigonda" initials="M." surname="Mudigonda">
      <organization>Cisco</organization>
      <address>
        <email>mmudigon@cisco.com</email>
      </address>
    </author>
    <date year="2020" month="November" />
    <area>Routing</area>
    <workgroup>BFD</workgroup>
    <keyword>BFD</keyword>
    <keyword>BFD for VXLAN</keyword>

    <abstract>
      <t>This document describes the use of the Bidirectional Forwarding Detection (BFD) protocol
        in point-to-point Virtual eXtensible Local Area Network (VXLAN) tunnels
        used to form an overlay network.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="Intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
    "Virtual eXtensible Local Area Network" (VXLAN) <xref target="RFC7348" format="default"/> provides
   an encapsulation scheme that allows building an overlay network by 
  decoupling the address space of the attached virtual hosts from that of the network.
      </t>
      <t>
One use of VXLAN is in data centers interconnecting virtual machines (VMs)
of a tenant. VXLAN addresses requirements of the Layer 2 and 
Layer 3 data center network infrastructure in the presence of VMs in a multi-tenant environment by
 providing a Layer 2 overlay scheme on a Layer 3 network <xref target="RFC7348" format="default"/>.
 Another use is as an encapsulation for Ethernet VPN <xref target="RFC8365" format="default"/>.
      </t>
      <t>
 This document is written assuming the use of VXLAN for virtualized
hosts and refers to VMs and VXLAN Tunnel End Points (VTEPs) in hypervisors.  However, the
concepts are equally applicable to non-virtualized hosts attached to
VTEPs in switches.
</t>
      <t>In the absence of a router in the overlay, a VM can communicate with another VM only if they are on the same VXLAN segment.
        VMs are unaware of VXLAN tunnels as a VXLAN tunnel is terminated on a VTEP.
        VTEPs are responsible for encapsulating and decapsulating frames exchanged among
        VMs. </t>
      <t>
    The ability to monitor path continuity, i.e., perform proactive continuity check (CC) for point-to-point (p2p) VXLAN tunnels, is important. 
       The asynchronous mode of BFD, as defined in <xref target="RFC5880" format="default"/>, is used to monitor a p2p VXLAN tunnel. 
</t>
      <t>
	In the case where a Multicast Service Node (MSN) (as described in
	<xref target="RFC8293" sectionFormat="of" section="3.3"/>) participates in VXLAN, the
	mechanisms described in this 
	document apply and can, therefore, be used to test the continuity of the path between 
	the source NVE and the MSN.
      </t>
      <t>
    This document describes the use of Bidirectional Forwarding Detection (BFD) protocol
        to enable monitoring continuity of the path between VXLAN VTEPs that are
        performing as Network Virtualization Endpoints,
        and/or between the source NVE and a replicator MSN using a Management VNI (<xref target="management-vni-sec" format="default"/>).
        All other uses of the specification to test toward other VXLAN endpoints are out of the scope.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Conventions Used in this Document</name>
      <section numbered="true" toc="default">
        <name>Acronyms</name>
<dl>
        <dt>BFD</dt><dd>Bidirectional Forwarding Detection</dd>
        <dt>CC</dt><dd>Continuity Check</dd>
        <!--<t>GTSM    Generalized TTL Security Mechanism</t>-->
         <dt>p2p</dt><dd>Point-to-point</dd>
        <dt>MSN</dt><dd>Multicast Service Node</dd>
        <dt>NVE</dt><dd>Network Virtualization Endpoint</dd>
        <dt>VFI</dt><dd>Virtual Forwarding Instance</dd>
        <dt>VM</dt><dd>Virtual Machine</dd>
        <dt>VNI</dt><dd>VXLAN Network Identifier (or VXLAN Segment ID)</dd>
        <dt>VTEP</dt><dd>VXLAN Tunnel End Point</dd>
        <dt>VXLAN</dt><dd>Virtual eXtensible Local Area Network</dd>
</dl>
      </section>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>

      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Deployment</name>
      <t>
    <xref target="ref-vxlan-fig" format="default"/> illustrates the scenario with two servers, each of them hosting two VMs. 
       The servers host VTEPs that terminate two VXLAN tunnels with VXLAN Network Identifier (VNI) number 100
       and 200 respectively. Separate BFD sessions can be
       established between the VTEPs (IP1 and IP2) for monitoring
       each of the VXLAN tunnels (VNI 100 and 200). Using a BFD session to monitor a set of VXLAN VNIs
       between the same pair of VTEPs might help to detect and localize problems caused by misconfiguration.
An implementation that supports this specification <bcp14>MUST</bcp14>
be able to control the number of BFD sessions 
			that can be created between the same pair of VTEPs.
       This method is applicable whether  the VTEP is a virtual or physical device.
      </t>
      <t keepWithNext="true"/>
      <figure anchor="ref-vxlan-fig">
        <name>Reference VXLAN Domain</name>
        <artwork align="left" name="" type="" alt=""><![CDATA[
                     
   +------------+-------------+
   |        Server 1          |
   | +----+----+  +----+----+ |
   | |VM1-1    |  |VM1-2    | |
   | |VNI 100  |  |VNI 200  | |
   | |         |  |         | |
   | +---------+  +---------+ |
   |        VTEP (IP1)        |
   +--------------------------+
                         |
                         |   +-------------+
                         |   |   Layer 3   |
                         +---|   Network   |
                             +-------------+
                                 |
                                 +-----------+
                                             |
                                      +------------+-------------+
                                      |         VTEP (IP2)       |
                                      | +----+----+  +----+----+ |
                                      | |VM2-1    |  |VM2-2    | |
                                      | |VNI 100  |  |VNI 200  | |
                                      | |         |  |         | |
                                      | +---------+  +---------+ |
                                      |      Server 2            |
                                      +--------------------------+
  
 ]]></artwork>
      </figure>
      <t>
       At the same time, a service layer BFD session may be used between the tenants of VTEPs IP1 and IP2
       to provide end-to-end fault management (this use case is outside the scope of this document). In
       such a case, for VTEPs, the BFD Control packets of that session are indistinguishable from data packets.
      </t>
      <t>
       For BFD Control packets encapsulated in VXLAN (<xref target="vxlan-bfd-encap-fig" format="default"/>),
       the inner destination IP address
       <bcp14>SHOULD</bcp14> be set to one of the loopback addresses from 
       127/8 range for IPv4 or to one of IPv4-mapped IPv6 loopback addresses from ::ffff:127.0.0.0/104 range for IPv6.
      </t>
    </section>
    <section anchor="management-vni-sec" numbered="true" toc="default">
      <name>Use of the Management VNI</name>
      <t>
In most cases, a single BFD session is sufficient for the given VTEP to monitor
the reachability of a remote VTEP, regardless of the number of VNIs.
    BFD control messages <bcp14>MUST</bcp14> be sent using the Management VNI which acts
    as the as control and management channel between VTEPs.
    An implementation <bcp14>MAY</bcp14> support operating BFD on another
    (non-Management) VNI although the implications of this are outside
    the scope of this document. The selection of the VNI number
of the Management VNI <bcp14>MUST</bcp14> be controlled through a management plane. An implementation <bcp14>MAY</bcp14> use VNI number 1 as
the default value for the Management VNI. All VXLAN packets received on the Management VNI <bcp14>MUST</bcp14> be processed locally
and <bcp14>MUST NOT</bcp14> be forwarded to a tenant.
</t>
    </section>
    <section anchor="bfd-transmit-vxlan-sec" numbered="true" toc="default">
      <name>BFD Packet Transmission over VXLAN Tunnel</name>
      <t>
	BFD packets <bcp14>MUST</bcp14> be encapsulated and sent to a remote VTEP as explained in this section. 
	Implementations <bcp14>SHOULD</bcp14> ensure that the BFD packets follow the same 
	forwarding path as VXLAN data packets within the sender system.
      </t>
      <!--
		<section title="BFD Packet Encapsulation in VXLAN" anchor="encap">
		-->
			<t>
			BFD packets are encapsulated in VXLAN as described below. 
			The VXLAN packet format is defined in
			<xref target="RFC7348" sectionFormat="of" section="5"/>. 
			The value in the VNI field of the VXLAN header <bcp14>MUST</bcp14>
			be set to the value selected as the Management VNI.
			The Outer IP/UDP and VXLAN headers <bcp14>MUST</bcp14>
				be encoded by the sender as defined in <xref target="RFC7348" format="default"/>.</t>
      <figure anchor="vxlan-bfd-encap-fig">
        <name>VXLAN Encapsulation of BFD Control Packet</name>
        <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                      Outer Ethernet Header                    ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                        Outer IPvX Header                      ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                        Outer UDP Header                       ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                           VXLAN Header                        ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                    Inner Ethernet Header                      ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                        Inner IPvX Header                      ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                         Inner UDP Header                      ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                       BFD Control Packet                     ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                   Outer Ethernet FCS                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <t>
	The BFD packet <bcp14>MUST</bcp14> be carried inside the inner Ethernet frame of the VXLAN packet.
	The choice of Destination MAC and Destination IP addresses for the inner Ethernet frame <bcp14>MUST</bcp14>
	ensure that the BFD Control packet is not forwarded to a tenant but is processed locally at the remote VTEP.
	The inner Ethernet frame carrying the BFD Control packet has the following format:
      </t>
<dl newline="true">

          <dt>Ethernet Header:</dt>
<dd>
          <dl newline="true" spacing="normal">
            <dt>Destination MAC:</dt><dd>A Management VNI, which does not have
	    any tenants, will have no dedicated MAC address for decapsulated
	    traffic.&nbsp; The value (TBD1) <bcp14>SHOULD</bcp14> be used in
	    this field.</dd>
            <dt>Source MAC:</dt><dd>MAC address associated with the originating VTEP.</dd>
            <dt>Ethertype:</dt><dd>is set to 0x0800 if the inner IP header is
	    IPv4, and is set to 0x86DD if the inner IP header is IPv6.</dd>
          </dl>
</dd>

          <dt>IP header:</dt>
<dd>
          <dl newline="true" spacing="normal">
            <dt>Destination IP:</dt><dd>IP address <bcp14>MUST NOT</bcp14> be of one of tenant's IP addresses.
	    The IP address <bcp14>SHOULD</bcp14> be selected
	    from the range 127/8 for IPv4, for IPv6 - from the range ::ffff:127.0.0.0/104.
	    Alternatively, the destination IP address <bcp14>MAY</bcp14> be set to VTEP's IP address.</dd>
            <dt>Source IP:</dt><dd>IP address of the originating VTEP.</dd>
            <dt>TTL or Hop Limit:</dt><dd><bcp14>MUST</bcp14> be set to 255 in
	    accordance with <xref target="RFC5881" format="default"/>.</dd>
	  </dl>
</dd>
</dl>

<t>
  The fields of the UDP header and the BFD Control packet are encoded as
specified in <xref target="RFC5881" format="default"/>.</t>


    </section>
    <section numbered="true" toc="default">
      <name>Reception of BFD Packet from VXLAN Tunnel</name>
      <t>
        Once a packet is received, the VTEP <bcp14>MUST</bcp14> validate the packet.
        If the packet is received on the management VNI and is identified as BFD control packet addressed to the VTEP,
        and then the packet can be processed further. Processing of BFD control packets received on non-management VNI
        is outside the scope of this specification.
      </t>
      <t>
        The received packet's inner IP payload is then validated according to
	Sections <xref target="RFC5881" sectionFormat="bare" section="4" />
	and <xref target="RFC5881" sectionFormat="bare" section="5"/> in <xref target="RFC5881" format="default"/>.
      </t>
    </section>
	
    <section numbered="true" toc="default">
      <name>Echo BFD</name>
      <t>Support for echo BFD is outside the scope of this document.</t>
    </section>
    <section anchor="iana-consideration" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
IANA is requested to assign a single MAC address to the value TBD1 from the
"IANA Unicast 48-bit MAC Address" registry from the "Unassigned (small allocations)" block.
The Usage field will be "BFD for VXLAN" with a Reference field of this document.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
                <t> 
        Security issues discussed in <xref target="RFC5880"
	format="default"/>, <xref target="RFC5881" format="default"/>, and
	<xref target="RFC7348" format="default"/>
        apply to this document.
      </t>
      <t>
        This document recommends using an address from the Internal host loopback addresses
       127/8 range for IPv4 or an IP4-mapped IPv6 loopback address from ::ffff:127.0.0.0/104 range for IPv6
        as the destination IP address in the inner IP header. Using such an address prevents
        the forwarding of the encapsulated BFD control message by a transient node in case the VXLAN tunnel is broken as
        according to <xref target="RFC1812" format="default"/>.
      </t>
      <aside>
	<t>
      A router <bcp14>SHOULD NOT</bcp14> forward, except over a loopback interface, any
      packet that has a destination address on network 127.  A router
      <bcp14>MAY</bcp14> have a switch that allows the network manager to disable these
      checks.  If such a switch is provided, it <bcp14>MUST</bcp14> default to
      performing the checks.</t>
      </aside>
      <t>
        
        The use of IPv4-mapped IPv6 addresses
        has the same property as using the IPv4 network 127/8, moreover, the IPv4-mapped
        IPv6 addresses prefix is not advertised in any routing protocol.</t>
      <t>
        If the implementation supports establishing multiple BFD sessions
        between the same pair of VTEPs, there <bcp14>SHOULD</bcp14> be a mechanism
        to control the maximum number of such sessions that can be active
        at the same time.
</t>
    </section>
    <section numbered="true" toc="default">
      <name>Contributors</name>
<contact fullname="Reshad Rahman">
<organization>Cisco</organization>
<address>
<email>rrahman@cisco.com</email>
</address>
</contact>

    </section>
    <section numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>Authors would like to thank <contact fullname="Jeff Haas"/> of
      Juniper Networks for his reviews and feedback on this material.</t>
      <t>Authors would also like to thank <contact fullname="Nobo Akiya"/>,
      <contact fullname="Marc Binderberger"/>, <contact fullname="Shahram Davari"/>,
	 <contact fullname="Donald E. Eastlake 3rd"/>, <contact
	 fullname="Anoop Ghanwani"/>, <contact fullname="Dinesh Dutt"/>,
	 <contact fullname="Joel Halpern"/>, and <contact fullname="Carlos
	 Pignataro"/> for the extensive reviews
	 and the most detailed and constructive comments.</t>
    </section>
  </middle>

  <back>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5880.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5881.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7348.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1812.xml"/>
        <!-- <?rfc include="reference.RFC.5082"?> -->
 <!--  
  <?rfc include="reference.I-D.ietf-bfd-seamless-base"?>
 -->
<!--
<?rfc include="reference.I-D.ashwood-nvo3-operational-requirement"?>
-->
<!--	  
<?rfc include="reference.I-D.ietf-nvo3-vxlan-gpe"?>
 -->
 <!--
	  <?rfc include="reference.I-D.ietf-bfd-multipoint"?>
	  -->
<!--	  
<?rfc include="reference.I-D.ooamdt-rtgwg-ooam-header"?>
 -->
    </references>
      <references>
        <name>Informational References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8293.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8365.xml"/>
      </references>
    </references>
  </back>
</rfc>
