<?xml version="1.0" encoding="iso-8859-1"?>
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc5586 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5586.xml">
<!ENTITY rfc5880 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5880.xml">
<!ENTITY rfc5881 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5881.xml">
<!ENTITY rfc6428 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6428.xml">
<!ENTITY rfc7348 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7348.xml">
<!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY I-D.ietf-nvo3-geneve PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-nvo3-geneve.xml">
<!ENTITY I-D.ietf-bfd-vxlan PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-bfd-vxlan.xml">
<!ENTITY I-D.mmbb-nvo3-geneve-oam PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.mmbb-nvo3-geneve-oam.xml">
]>
<rfc category="info" ipr="trust200902" docName="draft-xiao-nvo3-bfd-geneve-00">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<front>
        <title abbrev="BFD for Geneve"> BFD for Geneve </title>

  <author fullname="Xiao Min" initials="X" surname="Min">
      <organization>ZTE</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region/>

         <code/>

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

       <phone>+86 25 88016574</phone>

       <email>xiao.min2@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Greg Mirsky" initials="G" surname="Mirsky">
      <organization>ZTE</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city/>

         <region/>

         <code/>

         <country>USA</country>
       </postal>

       <phone/>

       <email>gregimirsky@gmail.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

    <date year="2019"/>
  
    <area>Routing</area>
    <workgroup>NVO3 Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
  <t> This document describes the use of the Bidirectional Forwarding Detection (BFD) protocol in point-to-point 
  Generic Network Virtualization Encapsulation (Geneve) tunnels forming up an overlay network.</t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">

  <t> "Generic Network Virtualization Encapsulation" (Geneve) <xref target="I-D.ietf-nvo3-geneve"/> 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> This document describes the use of Bidirectional Forwarding Detection (BFD) protocol <xref target="RFC5880"/>
  to enable monitoring continuity of the path between two Geneve tunnel endpoints, which may be NVE (Network Virtualization Edge) or 
  other device acting as a Geneve tunnel endpoint. For simplicity, in this document, NVE is used to represent 
  Geneve tunnel endpoint, Virtual Machine (VM) is used to represent the device attached to a Geneve tunnel 
  endpoint from the outside.</t>
  
  <t> The use cases and the deployment of BFD for Geneve are consistent with what's described in Section 1 and 
  Section 3 of <xref target="I-D.ietf-bfd-vxlan"/>. The major difference between Geneve and "Virtual eXtensible 
  Local Area Network" (VXLAN) <xref target="RFC7348"/> encapsulation is that Geneve supports multi-protocol payload
  and variable length options. </t>
  </section>
  
  <section title="Conventions Used in This Document">
   
    <section title="Terminology">
    <t> BFD: Bidirectional Forwarding Detection</t>
	<t> CC: Continuity Check</t>
    <t> GAL: Generic Associated Channel Label</t>
    <t> G-ACh: Generic Associated Channel</t>
    <t> Geneve: Generic Network Virtualization Encapsulation</t>
    <t> MPLS: Multiprotocol Label Switching</t>	
    <t> NVE: Network Virtualization Edge</t>
    <t> VM: Virtual Machine</t>
	<t> VNI: Virtual Network Identifier</t>
	<t> VXLAN: Virtual eXtensible Local Area Network</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="BFD Packet Transmission over Geneve Tunnel">

  <t> Concerning whether or not the Geneve data packets include an IP protocol data unit, and whether or not the Geneve 
  data packets include an MPLS protocol data unit, this document considers four options of BFD packet encapsulation in Geneve.</t>
  
  <section anchor="ethernet-ip-encaps-section" title="BFD Encapsulation With Inner Ethernet/IP/UDP Header">
	
  <t> If the Protocol Type field (as defined in Section 3.4 of <xref target="I-D.ietf-nvo3-geneve"/>) 
  of data packets indicates that there exists an inner Ethernet header, i.e., the Protocol Type equals to 0x6558 (Ethernet frame),
  then BFD packets are encapsulated in Geneve as described below. The Geneve packet format 
  over IPv4 is defined in Section 3.1 of <xref target="I-D.ietf-nvo3-geneve"/>. The Geneve packet format over IPv6 is
  defined in Section 3.2 of <xref target="I-D.ietf-nvo3-geneve"/>. The Outer IP/UDP and Geneve headers
  MUST be encoded by the sender as defined in <xref target="I-D.ietf-nvo3-geneve"/>. Note that the
  outer IP header and the inner IP header may not be of the same address family, in other words,
  outer IPv6 header accompanied with inner IPv4 header and outer IPv4 header accompanied
  with inner IPv6 header are both possible. </t>
	
     <figure anchor="Figure_1" title="Geneve Encapsulation of BFD Control Message With the Inner Ethernet/IP/UDP Header">
     <artwork align="left">
     <![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                       ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                          Geneve Header                        ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                      Inner Ethernet Header                    ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                        Inner IPvX Header                      ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                         Inner UDP Header                      ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                       BFD Control Message                     ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               FCS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
	 
     <t> The BFD packet MUST be carried inside the inner Ethernet frame of the Geneve packet, as specified in 
	 Section 4 of <xref target="I-D.ietf-bfd-vxlan"/>.
	 </t>
	 
     <t> When the BFD packets are encapsulated in Geneve in this way, the Geneve header follows the value set below.</t>	
	 
     <figure anchor="Figure_2" title="Geneve Header">
     <artwork align="left">
     <![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Virtual Network Identifier (VNI)       |    Reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Variable Length Options                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
        
     <t> Opt Len field SHOULD be set to 0, which indicates there isn't any variable length option.</t>
	 
			<t>[Ed.Note]: Use of O bit is still being discussed in the NVO3 WG, so the value is undetermined.</t>
	 
     <t> C bit MUST be set to 0.</t>
	 
     <t> Protocol Type field MUST be set to 0x6558 (Ethernet frame).</t>
  </section>
  
  <section anchor="ip-encaps-section" title="BFD Encapsulation With Inner IP/UDP Header">
	
  <t> If the Protocol Type field (as defined in Section 3.4 of <xref target="I-D.ietf-nvo3-geneve"/>) 
  of data packets indicates that there exists an inner IP header, i.e., the Protocol Type equals to 
  0x0800 (IPv4) or 0x86DD (IPv6), then BFD packets are encapsulated in Geneve as described below. The Geneve packet format 
  over IPv4 is defined in Section 3.1 of <xref target="I-D.ietf-nvo3-geneve"/>. The Geneve packet format over IPv6 is
  defined in Section 3.2 of <xref target="I-D.ietf-nvo3-geneve"/>. The Outer IP/UDP and Geneve headers
  MUST be encoded by the sender as defined in <xref target="I-D.ietf-nvo3-geneve"/>. Note that the
  outer IP header and the inner IP header may not be of the same address family, in other words,
  outer IPv6 header accompanied with inner IPv4 header and outer IPv4 header accompanied
  with inner IPv6 header are both possible. </t>
	
     <figure anchor="Figure_3" title="Geneve Encapsulation of BFD Control Message With the Inner IP/UDP Header">
     <artwork align="left">
     <![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                       ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                          Geneve Header                        ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                        Inner IPvX Header                      ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                         Inner UDP Header                      ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                       BFD Control Message                     ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               FCS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
	 
     <t> The BFD packet MUST be carried inside the inner IP packet of the Geneve packet.
     The inner IP packet carrying the BFD payload has the following format:
		   <list>
			   <t>IP header:
				   <list>
					   <t>Source IP: IP address of the VM-facing interface of the originating NVE.</t>
					   <t>Destination IP: IP address of the VM-facing interface of the terminating NVE.</t>
					   <t>TTL: MUST be set to 1 to ensure that the BFD packet is not routed within the L3 underlay network.</t>
				   </list>
			   </t>

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

		   </list>
	 </t>
	 
     <t> When the BFD packets are encapsulated in Geneve in this way, the Geneve header follows the value set below.</t>	
	 
	<!-- 
     <figure anchor="Figure_2" title="Geneve Header">
     <artwork align="left">
     <![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Virtual Network Identifier (VNI)       |    Reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Variable Length Options                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
-->
        
     <t> Opt Len field SHOULD be set to 0, which indicates there isn't any variable length option.</t>
	 
			<t>[Ed.Note]: Use of O bit is still being discussed in the NVO3 WG, so the value is undetermined.</t>
	 
     <t> C bit MUST be set to 0.</t>
	 
     <t> Protocol Type field MUST be set to 0x0800 (IPv4) or 0x86DD (IPv6), depending on the address family of the inner IP packet.</t>
  </section>
	 
  <section anchor="mpls-encaps-section" title="BFD Encapsulation With Inner MPLS Header">
	 
  <t> If the Protocol Type field (as defined in Section 3.4 of <xref target="I-D.ietf-nvo3-geneve"/>) 
  of data packets indicates that there exists an inner MPLS header, i.e., the Protocol Type equals to 0x8847 (MPLS) or 0x8848 (MPLS with the upstream-assigned label), then BFD packets are encapsulated in Geneve as described below. The Geneve packet format over IPv4 is
  defined in Section 3.1 of <xref target="I-D.ietf-nvo3-geneve"/>. The Geneve packet format over IPv6 is
  defined in Section 3.2 of <xref target="I-D.ietf-nvo3-geneve"/>. The Outer IP/UDP and Geneve headers
  MUST be encoded by the sender as defined in <xref target="I-D.ietf-nvo3-geneve"/>. </t>
	 
     <figure anchor="Figure_4" title="Geneve Encapsulation of BFD Control Message With the Inner MPLS GAL/G-ACh">
     <artwork align="left">
     <![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                       ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                          Geneve Header                        ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 MPLS Interface Context Label                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            MPLS GAL                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           MPLS G-ACh                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                       BFD Control Message                     ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               FCS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
	 
     <t> The BFD packet MUST be carried inside the inner MPLS packet of the Geneve packet.
     The inner MPLS packet carrying the BFD payload has the following format:
		   <list>
			   <t>MPLS Interface Context Label: This Label would be used to identify the VM-facing interface 
			   of the originating NVE and the VM-facing interface of the terminating NVE.</t>
			   <t>MPLS GAL(Generic Associated Channel Label):
				   <list>
					   <t>Label value: MUST be set to 13, as specified in <xref target="RFC5586"/>.</t>
					   <t>S bit: MUST be set to 1.</t>
					   <t>TTL: MUST be set to 1.</t>
				   </list>
			   </t>

		   <t> The fields of the MPLS G-ACh(Generic Associated Channel) and the BFD control packet are encoded as specified 
		   for MPLS-TP CC(Continuity Check) message in <xref target="RFC6428"/>.</t>

		   </list>
	 </t>
	 
     <t> When the BFD packets are encapsulated in Geneve in this way, the Geneve header follows the value set below.</t>
	 
	<!-- 
     <figure anchor="Figure_4" title="Geneve Header">
     <artwork align="left">
     <![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Ver|  Opt Len  |O|C|    Rsvd.  |          Protocol Type        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Virtual Network Identifier (VNI)       |    Reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Variable Length Options                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
-->
	 
     <t> Opt Len field SHOULD be set to 0, which indicates there isn't any variable length option.</t>
	 
			<t>[Ed.Note]: Use of O bit is still being discussed in the NVO3 WG, so the value is undetermined.</t>
	 
     <t> C bit MUST be set to 0.</t>
	 
     <t> Protocol Type field MUST be set to 0x8847 (MPLS).</t>

  </section>
	 
  <section anchor="non-ip-mpls-encaps-section" title="BFD Encapsulation With Inner OAM Shim">
	 
     <t>Also, if the BFD control packet is encapsulated in Geneve without the use
     of IP/UDP header or MPLS G-ACh header, the BFD control packet MAY be identified through the Geneve OAM shim.
     The layout of the Ethernet frame is shown in <xref target="Figure_5"/>.
    Protocol Type field MUST be set to the value which indicates a Geneve OAM shim that will have a
     field to indicate the inner BFD control packet. The value of the Protocol Type field and the format of 
	 the Geneve OAM shim are defined in <xref target="I-D.mmbb-nvo3-geneve-oam"/>. The Geneve OAM shim 
	immediately follows the Geneve header, and the BFD control packet immediately follows the Geneve OAM shim.</t>
     
     <figure anchor="Figure_5" title="Geneve Encapsulation of BFD Control Message With Geneve OAM Shim">
     <artwork align="left">
     <![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                       ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                         Geneve Header                         ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Geneve OAM Shim                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
~                       BFD Control Message                     ~
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               FCS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
	 
  </section>
  </section> 

  <section title="Reception of BFD packet from Geneve Tunnel"> 
  
  <t> Once a packet is received, NVE MUST validate the packet as described in <xref target="I-D.ietf-nvo3-geneve"/>.</t>
  
  <t> If the Protocol Type field equals 0x0800 (IPv4) or 0x86DD (IPv6),
  and the Destination IP of the inner IP packet matches the VM-facing interface IP address of
  the NVE, the UDP destination port and the TTL of the inner IP packet MUST
  be validated to determine whether the received packet can be processed by BFD.
  BFD packet with inner IP set to NVE MUST NOT be forwarded to VMs.</t>
  
  <t> If the Protocol Type field equals 0x8847 (MPLS), the MPLS Interface Context Label, the 
  MPLS GAL and the MPLS G-ACh of the inner MPLS packet MUST be validated to determine whether 
  the received packet can be processed by BFD.
  BFD packet with MPLS GAL MUST NOT be forwarded to VMs.</t>

  <t> If the Protocol Type field equals 0x8902 which indicates a Geneve OAM shim 
  that will have a field to indicate the inner BFD control message, as specified 
  in <xref target="I-D.mmbb-nvo3-geneve-oam"/>, the received packet MUST be processed
  by BFD and MUST NOT be forwarded to VMs.</t>
  
  <section title="Demultiplexing of the BFD packet"> 
    
  <t> Since multiple BFD sessions may be running between two NVEs, and multiple BFD sessions 
  may be originating or terminating at one NVE, there needs to be a mechanism for demultiplexing 
  received BFD packets to the proper session.</t>
  
  <t> If the BFD packet is received with Your Discriminator equals to 0, for different BFD encapsulation, 
  the procedure for demultiplexing the received BFD packets is different.
  				   <list>
					   <t>When the BFD Encapsulation With Inner Ethernet/IP/UDP Header is used, the BFD session 
					   MUST be identified using the procedure specified in Section 5.1 of <xref target="I-D.ietf-bfd-vxlan"/>.</t>
					   <t>When the BFD Encapsulation With Inner IP/UDP Header is used, the BFD session MUST be 
					   identified using the inner IP/UDP header, i.e., the source IP and the destination IP present in the inner IP/UDP header.</t>
					   <t>When the BFD Encapsulation With Inner MPLS Header is used, the BFD session MUST be 
					   identified using the inner MPLS header, i.e., the MPLS Interface Context Label present in the inner MPLS header.</t>
					   <t>When the BFD Encapsulation With Inner OAM Shim is used, the procedure for demultiplexing 
					   the received BFD packets to the proper session is for further study.</t>
				   </list>
  </t>
  
  <t> If the BFD packet is received with non-zero Your Discriminator, then BFD session MUST be demultiplexed only 
  with Your Discriminator as the key.</t>
  
  <t> With respect to BFD for Geneve, the use of the specific VNI would follow the principle as specified 
  in Section 6 of <xref target="I-D.ietf-bfd-vxlan"/>.</t>
    
  </section>
	
  </section>
  
  <section title="Security Considerations">
  <t> This document does not raise any additional security issues beyond those of the specifications referred to in the list of normative references.</t>
  </section>
  
  <section title="IANA Considerations"> 
  <t> This document has no IANA action requested.</t>
  </section>

  <section title="Acknowledgements">
  <t> The authors would like to acknowledge Reshad Rahman, Jeffrey Haas and Matthew Bocci for their guidance on this work.</t>
  </section>  
  
</middle>
  
<back>

    <references title="Normative References">
	 &rfc5586;
	 &rfc5880;
	 &rfc5881;
	 &rfc6428;
	 &rfc7348;	 
	 &rfc2119;
     &rfc8174;
	 &I-D.ietf-nvo3-geneve;
	 &I-D.ietf-bfd-vxlan;
	 &I-D.mmbb-nvo3-geneve-oam;
    </references>

</back>
</rfc>
