BFD for Geneve ZTE Corp.NanjingChina+86 25 88013062xiao.min2@zte.com.cnEricssonUnited States of Americagregimirsky@gmail.comVMwareIndiasantosh.pallagatti@gmail.comMicrosoftUnited States of Americajefftant.ietf@gmail.comGoogleUnited States of Americaaldrin.ietf@gmail.com
Routing
NVO3 Working GroupRequest for CommentsRFCInternet DraftI-D This document describes the use of the Bidirectional Forwarding Detection (BFD) protocol in point-to-point
Generic Network Virtualization Encapsulation (Geneve) tunnels used to make up an overlay network. "Generic Network Virtualization Encapsulation" (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. This document describes the use of Bidirectional Forwarding Detection (BFD) protocol
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. Specifically, the asynchronous mode of BFD,
as defined in , is used to monitor a p2p Geneve tunnel, and support for BFD Echo function is outside
the scope of this document. For simplicity, in this document, NVE is used to represent Geneve tunnel endpoint,
TS (Tenant System) is used to represent the physical or virtual device attached to a Geneve tunnel endpoint from the
outside. VAP (Virtual Access Point) is the NVE side of the interface between the NVE and the TS, and a VAP is a
logical network port (virtual or physical) into a specific virtual network. For detailed definitions and descriptions
of NVE, TS and VAP, please refer to and . The use cases and the deployment of BFD for Geneve are consistent with what's described in Section 1 and 3 of
("Bidirectional Forwarding Detection (BFD) for Virtual eXtensible Local Area Network (VXLAN)"),
except for the usage of Management VNI, which in the case of Geneve is described in ,
and outside the scope of this document. The major difference between Geneve and VXLAN is that
Geneve supports multi-protocol payload and variable length options. BFD: Bidirectional Forwarding Detection Geneve: Generic Network Virtualization Encapsulation NVE: Network Virtualization Edge TS: Tenant System VAP: Virtual Access Point VNI: Virtual Network Identifier VXLAN: Virtual eXtensible Local Area Network 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
when, and only when, they appear in all capitals, as shown here. Since the Geneve data packet payload may be either an Ethernet frame or an IP packet, this document defines two
formats of BFD packet encapsulation in Geneve. The BFD session is originated and terminated at the VAP of an NVE, selection
of the BFD packet encapsulation is based on how the VAP encapsulates the data packets. Specifically, if the payload is
IP, then BFD over IP is carried in the payload; if the payload is Ethernet, then BFD over IP over Ethernet is carried in
the payload, in the same manner as BFD over IP in the IP payload case, regardless of what the Ethernet payload might normally carry. If the VAP that originates the BFD packets is used to encapsulate Ethernet data frames, then BFD packets are
encapsulated in Geneve as described below. The Geneve packet formats over IPv4 and IPv6 are defined in Section 3.1 and
3.2 of respectively. The Outer IP/UDP and Geneve headers MUST be encoded by the sender
as defined in . 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. The BFD packet MUST be carried inside the inner Ethernet frame of the Geneve packet.
The inner Ethernet frame carrying the BFD Control packet has the following format:
Inner Ethernet Header:
Source MAC: MAC address of a VAP of the originating NVE.Destination MAC: MAC address of a VAP of the terminating NVE.IP Header:
Source IP: IP address of a VAP of the originating NVE. If the VAP of the originating NVE
has no IP address, then the IP address 0.0.0.0 for IPv4 or ::/128 for IPv6 MUST be used.Destination IP: IP address of a VAP of the terminating NVE. If the VAP of the terminating
NVE has no IP address, then the IP address 127.0.0.1 for IPv4 or ::1/128 for IPv6 MUST be used.TTL or Hop Limit: MUST be set to 255 in accordance with . The fields of the UDP header and the BFD Control packet are encoded as specified in . When the BFD packets are encapsulated in Geneve in this way, the Geneve header defined in
follows the value set below. Opt Len field SHOULD be set to 0, which indicates there isn't any variable length option. O bit MUST be set to 1, which indicates this packet contains a control message. C bit MUST be set to 0, which indicates there isn't any critical option. Protocol Type field MUST be set to 0x6558 (Ethernet frame). Virtual Network Identifier (VNI) field SHOULD be set to the VNI number that the originating VAP is mapped to. Once a packet is received, the NVE MUST validate the packet as described in . When the
payload is Ethernet, the Protocol Type field equals 0x6558, and the Destination MAC of the inner Ethernet frame
matches the MAC address of a VAP which is mapped to the same as received VNI, then the Destination IP, the UDP
destination port and the TTL or Hop Limit of the inner IP packet MUST be validated to determine whether the received
packet can be processed by BFD. In BFD over Geneve, a BFD session is originated and terminated at VAP, usually one NVE owns
multiple VAPs, so multiple BFD sessions may be running between two NVEs, there needs to be a mechanism
for demultiplexing received BFD packets to the proper session. Furthermore, due to the fact that
allows for N-to-1 mapping between VAP and VNI at one NVE, multiple BFD sessions
between two NVEs for the same VNI are allowed. Also note that a BFD session can only be established between
two VAPs that are mapped to the same VNI and use the same way to encapsulate data packets. If the BFD packet is received with Your Discriminator equals to 0, the BFD session MUST be identified using
the VNI number, and the inner Ethernet/IP/UDP Header, i.e., the source MAC, the source IP, the destination MAC,
the destination IP, and the source UDP port number present in the inner Ethernet/IP/UDP header. If the BFD packet is received with non-zero Your Discriminator, then the BFD session MUST be demultiplexed
only with Your Discriminator as the key. If the VAP that originates the BFD packets is used to encapsulate IP data packets, then BFD packets are
encapsulated in Geneve as described below. The Geneve packet formats over IPv4 and IPv6 are defined in Section 3.1 and
3.2 of respectively. The Outer IP/UDP and Geneve headers MUST be encoded by the sender
as defined in . 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. The BFD packet MUST be carried inside the inner IP packet of the Geneve packet.
The inner IP packet carrying the BFD Control packet has the following format:
Inner IP header:
Source IP: IP address of a VAP of the originating NVE.Destination IP: IP address of a VAP of the terminating NVE.TTL or Hop Limit: MUST be set to 255 in accordance with . The fields of the UDP header and the BFD Control packet are encoded as specified in . When the BFD packets are encapsulated in Geneve in this way, the Geneve header defined in
follows the value set below. Opt Len field SHOULD be set to 0, which indicates there isn't any variable length option. O bit MUST be set to 1, which indicates this packet contains a control message. C bit MUST be set to 0, which indicates there isn't any critical option. Protocol Type field MUST be set to 0x0800 (IPv4) or 0x86DD (IPv6), depending on the address family
of the inner IP packet. Virtual Network Identifier (VNI) field SHOULD be set to the VNI number that the originating VAP is mapped to. Once a packet is received, the NVE MUST validate the packet as described in . When the
payload is IP, the Protocol Type field equals 0x0800 or 0x86DD, and the Destination IP of the inner IP packet matches
the IP address of a VAP which is mapped to the same as received VNI, then the UDP destination port and the TTL or Hop
Limit of the inner IP packet MUST be validated to determine whether the received packet can be processed by BFD. If the BFD packet is received with Your Discriminator equals to 0, the BFD session MUST be identified using the VNI
number, and the inner IP/UDP header, i.e., the source IP, the destination IP, and the source UDP port number present in
the inner IP/UDP header. If the BFD packet is received with non-zero Your Discriminator, then the BFD session MUST be demultiplexed
only with Your Discriminator as the key. Security issues discussed in apply to this document. Particularly, BFD is an application
that is run at the two Geneve tunnel endpoints. Geneve provides security between the peers, and subject to the issue
of overload described below, BFD introduces no security vulnerabilities when run in this manner. This document supports establishing multiple BFD sessions between the same pair of NVEs, each BFD session over
a pair of VAPs residing in the same pair of NVEs, there SHOULD be a mechanism to control the maximum number of such
sessions that can be active at the same time. Particularly, assuming each NVE of the pair of NVEs has N VAPs, all of
them use Ethernet as the payload, then there could be N squared BFD sessions running between the pair of NVEs, considering
each VAP may support multiple VNIs, the number of BFD sessions could be much higher. In this case, it's recommended that
N BFD sessions covering all N VAPs and one selected VNI are enough for the pair of NVEs. This document has no IANA action requested. The authors would like to acknowledge Reshad Rahman, Jeffrey Haas and Matthew Bocci for their guidance
on this work. The authors would like to acknowledge David Black for his explanation on the mapping relation between VAP
and VNI. The authors would like to acknowledge Stewart Bryant for his thorough review and very helpful comments.