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

<!-- 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="8971" 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">
    Bidirectional Forwarding Detection (BFD) for Virtual eXtensible Local Area
    Network (VXLAN)
    </title>
    <seriesInfo name="RFC" value="8971"/>

     <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="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="December" />
    <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 the building of 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 the 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, because 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 Network Virtualization Endpoint (NVE) and the MSN.
      </t>
      <t>
    This document describes the use of the Bidirectional Forwarding Detection (BFD) protocol
        to enable monitoring continuity of the path between VXLAN VTEPs that are
        performing as VNEs,
        and/or between the source NVE and a replicator MSN using a Management
	VXLAN Network Identifier (VNI) (<xref target="management-vni-sec" format="default"/>).
        All other uses of the specification to test toward other VXLAN endpoints are out of scope.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <section numbered="true" toc="default">
        <name>Abbreviations</name>
<dl indent="9">
        <dt>BFD:</dt><dd>Bidirectional Forwarding Detection</dd>
        <dt>CC:</dt><dd>Continuity Check</dd>
	<dt>FCS:</dt><dd>Frame Check Sequence</dd>
        <dt>MSN:</dt><dd>Multicast Service Node</dd>
        <dt>NVE:</dt><dd>Network Virtualization Endpoint</dd>
	 <dt>p2p:</dt><dd>Point-to-point</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 a scenario with two servers: each hosting two VMs. 
       The servers host VTEPs that terminate two VXLAN tunnels with 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 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>
      <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 Media Access Control (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="false" 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 00-52-02 <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>This is set to 0x0800 if the inner IP header is
	    IPv4 and set to 0x86DD if the inner IP header is IPv6.</dd>
          </dl>
</dd>

          <dt>IP header:</dt>
<dd>
          <dl newline="false" spacing="normal">
            <dt>Destination IP:</dt><dd>This 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 and from the range
	    ::ffff:127.0.0.0/104 for IPv6.
	    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 destination UDP port is set to 3784 and the fields of 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 a
	BFD Control packet addressed to the VTEP,
        then the packet can be processed further. Processing of BFD Control
	packets received on a 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 has assigned a single MAC address of the value 00-52-02 from the "Unassigned (small allocations)" block of the "IANA Unicast 48-bit MAC Addresses" registry as follows:
the "Usage" field is "BFD for VXLAN". The "Reference" is 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 the
       ::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, in
        accordance with <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>
  </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"/>
    </references>
      <references>
        <name>Informative 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>

    <section numbered="false" toc="default">
      <name>Acknowledgments</name>
      <t>The authors would like to thank <contact fullname="Jeff Haas"/> of
      Juniper Networks for his reviews and feedback on this material.</t>
      <t>The 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>
    <section numbered="false" toc="default">
      <name>Contributors</name>
<contact fullname="Reshad Rahman">
<organization>Cisco</organization>
<address>
<email>rrahman@cisco.com</email>
</address>
</contact>
    </section>

  </back>
</rfc>
