RFC 9521
Bidirectional Forwarding Detection (BFD) for Generic Network Virtualization Encapsulation (Geneve)
Bidirectional Forwarding Detection (BFD) for Generic Network Virtualization Encapsulation (Geneve) π
okay bestie, let's get into it β¨ this one is an RFC (basically the official rulebook the Internet runs on), and it's a Standards Track document, which means it's the real deal π it's from the IETF, it's got consensus, and it was approved by the IESG π«Ά
Document number: RFC 9521 Category: Standards Track Date: January 2024 Obsoletes / Updates: this doc isn't listed as obsoleting or updating anything in the title block π
Authors: X. Min (ZTE Corp.), G. Mirsky (Ericsson), S. Pallagatti (VMware), J. Tantsura (Nvidia), and S. Aldrin (Google) π
The ISSN is 2070-1721 π
Abstract
This doc describes how to use Bidirectional Forwarding Detection (BFD) in point-to-point Generic Network Virtualization Encapsulation (Geneve) unicast tunnels, the ones that build an overlay network π¦
Status of This Memo
It's an Internet Standards Track document π It came from the IETF, it represents the IETF community's consensus, it got public review, and the IESG signed off on it. If you want more on Internet Standards, check out Section 2 of RFC 7841. Errata and feedback info live at https://www.rfc-editor.org/info/rfc9521 π₯
Copyright Notice
Copyright (c) 2024 IETF Trust and the document authors. All rights reserved π
This doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the publication date. Read those carefully, because they spell out your rights and restrictions. Code Components pulled out of this document have to include Revised BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, same as the Revised BSD License says π«Ά
Table of Contents
- 1. Introduction
- 2. Conventions Used in This Document
- 2.1. Abbreviations
- 2.2. Requirements Language
- 3. BFD Packet Transmission over a Geneve Tunnel
- 4. BFD Encapsulation with the Inner Ethernet/IP/UDP Header
- 4.1. Demultiplexing a BFD Packet When the Payload Is Ethernet
- 5. BFD Encapsulation with the Inner IP/UDP Header
- 5.1. Demultiplexing a BFD Packet When the Payload Is IP
- 6. Security Considerations
- 7. IANA Considerations
- 8. References
- 8.1. Normative References
- 8.2. Informative References
- Acknowledgements
- Authors' Addresses
1. Introduction β¨
okay so the first part of the story is Geneve π§ [RFC8926] gives you an encapsulation scheme for building overlay networks of tunnels, and the big win is that it decouples the address space of the attached virtual hosts from the address space of the network itself. no more address drama π
This doc is about using BFD [RFC5880] to keep an eye on whether the path between two Geneve tunnel endpoints is still working. Those endpoints can be a Network Virtualization Edge (NVE) or some other device acting as a Geneve tunnel endpoint π¦ Specifically, BFD's asynchronous mode (from [RFC5880]) is what gets used to monitor a point-to-point (P2P) Geneve tunnel. BFD Echo support is out of scope here π For simplicity, the doc uses "NVE" to mean the Geneve tunnel endpoint π
Some more vocab, because it's giving alphabet soup π A Tenant System (TS) is the physical or virtual device hanging off a Geneve tunnel endpoint, seen from the outside. A Virtual Access Point (VAP) is the NVE side of the NVE-to-TS interface, and it's a logical network port (virtual or physical) into one specific virtual network. For the full definitions of NVE, TS, and VAP, go check [RFC7365] and [RFC8014] πΈ
The use cases and deployment of BFD for Geneve are mostly the same as what's in Sections 1 and 3 of [RFC8971] β¨ The one exception is the Management Virtual Network Identifier (VNI). That's covered in [GENEVE-OAM] and it's outside this doc's scope π«Ά
Now the serious part π As Section 4.2 of [RFC8926] says, Geneve MUST be used with congestion controlled traffic, or inside a Traffic-Managed Controlled Environment (TMCE), to avoid congestion. That requirement applies to BFD traffic too π Since BFD's congestion control mechanism is complicated and still pretty new, BFD for Geneve MUST be used within a TMCE unless BFD is actually congestion controlled. If you're an operator of a TMCE and you deploy BFD for Geneve, you are REQUIRED to provision the rates BFD is sent at, to avoid congestion and false failure detection π That's the alternative to real congestion control.
2. Conventions Used in This Document
2.1. Abbreviations
- BFD: Bidirectional Forwarding Detection
- FCS: Frame Check Sequence
- Geneve: Generic Network Virtualization Encapsulation
- NVE: Network Virtualization Edge
- TMCE: Traffic-Managed Controlled Environment
- TS: Tenant System
- VAP: Virtual Access Point
- VNI: Virtual Network Identifier
- VXLAN: Virtual eXtensible Local Area Network
2.2. Requirements Language
Okay this part is important π 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 read as described in BCP 14 [RFC2119] [RFC8174], but ONLY when they show up in ALL CAPITALS, exactly like that π
3. BFD Packet Transmission over a Geneve Tunnel
Since a Geneve data packet's payload can be either an Ethernet frame or an IP packet, this doc defines two formats for BFD packet encapsulation in Geneve π¦ The BFD session is originated and terminated at the VAP of an NVE. Which encapsulation you get depends on how the VAP encapsulates its data packets. If the payload is IP, then BFD over IP rides in the payload. If the payload is Ethernet, then BFD over IP over Ethernet rides in the payload. That works the same way as BFD over IP in the IP payload case, no matter what the Ethernet payload would normally carry π§
4. BFD Encapsulation with the Inner Ethernet/IP/UDP Header β¨
If the VAP that originates the BFD packets is used to encapsulate Ethernet data frames, then the BFD packets get encapsulated in Geneve like this π The Geneve packet formats over IPv4 and IPv6 are defined in Sections 3.1 and 3.2 of [RFC8926], respectively. The sender encodes the outer IP/UDP and Geneve headers as defined in [RFC8926] π Heads up: the outer IP header and the inner IP header don't have to be the same address family π So an outer IPv6 header with an inner IPv4 header is possible, and so is an outer IPv4 header with an inner IPv6 header π«Ά
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 Packet ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Outer Ethernet FCS |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: Geneve Encapsulation of a BFD Control Packet with the Inner
Ethernet/IP/UDP Header
The BFD packet MUST be carried inside the inner Ethernet frame of the Geneve packet π«Ά The inner Ethernet frame that carries the BFD Control packet has this format:
- Inner Ethernet Header:
- Destination MAC: Media Access Control (MAC) address of a VAP of the terminating NVE.
- Source MAC: MAC address of a VAP of the originating NVE.
- IP Header:
- Source IP: IP address of a VAP of the originating NVE. If the originating NVE's VAP 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 terminating NVE's VAP 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: The TTL for IPv4 or Hop Limit for IPv6 MUST be set to 255, following [RFC5881], which covers IPv4/IPv6 single-hop BFD β¨
- The fields of the UDP header and the BFD Control packet are encoded as [RFC5881] specifies π§
When BFD packets are encapsulated in Geneve this way, the Geneve header from [RFC8926] follows the values set below π
- The Opt Len field MUST be set consistently with the Geneve specification ([RFC8926]), depending on whether or not Geneve options are present in the frame. Using Geneve options with BFD is outside this doc's scope π
- The O bit MUST be set to 1, which indicates this packet contains a control message π
- The C bit MUST be set to 0, which indicates there isn't any critical option π
- The Protocol Type field MUST be set to 0x6558 (Ethernet frame) π¦
- The Virtual Network Identifier (VNI) field MUST be set to the VNI number that the originating VAP is mapped to π
Part 1 of 3 is done, bestie π Keep the next part coming, I'm obsessed π«Ά
4.1. Demultiplexing a BFD Packet When the Payload Is Ethernet π
okay bestie, once a packet lands, the NVE validates it as described in [RFC8926] π«Ά When the payload is Ethernet, the Protocol Type field equals 0x6558 β¨ The destination MAC address of the inner Ethernet frame has to match the MAC address of a VAP that's mapped to the same VNI as the 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 see if BFD can process the packet. The three field values MUST be in compliance with what's defined in Section 4 of this document, as well as Section 4 of [RFC5881] π₯ If validation fails, the received packet MUST NOT be processed by BFD π
In BFD over Geneve, a BFD session is originated and terminated at a VAP πΈ Usually one NVE owns multiple VAPs π Since multiple BFD sessions may be running between two NVEs, there needs to be a way to demultiplex received BFD packets to the right session π§ Also, [RFC8014] allows N-to-1 mapping between VAPs and VNIs at one NVE, so multiple BFD sessions between two NVEs for the same VNI are allowed π Just note that a BFD session can only be established between two VAPs that are mapped to the same VNI and that use the same way to encapsulate data packets π
If the BFD packet is received with the value of the Your Discriminator field set to 0, then the BFD session SHOULD be identified using the VNI number and the inner Ethernet/IP header π The inner Ethernet/IP header covers the source MAC, the source IP, the destination MAC, and the destination IP. An implementation MAY use the inner UDP port source number to help with demultiplexing incoming BFD Control packets π If it fails to identify the BFD session, the incoming BFD Control packets MUST be dropped, and an exception event indicating the failure should be reported to the management π
If the BFD packet is received with a non-zero Your Discriminator, then the BFD session MUST be demultiplexed only with the Your Discriminator as the key π
5. BFD Encapsulation with the Inner IP/UDP Header β¨
If the VAP that originates the BFD packets is used to encapsulate IP data packets, then the BFD packets are encapsulated in Geneve as described below π¦ The Geneve packet formats over IPv4 and IPv6 are defined in Sections 3.1 and 3.2 of [RFC8926], respectively. The outer IP/UDP and Geneve headers are encoded by the sender as defined in [RFC8926] π«Ά Also, the outer IP header and the inner IP header don't have to be the same address family. So an outer IPv6 header with an inner IPv4 header is possible, and so is an outer IPv4 header with an inner IPv6 header π
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Ethernet Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Outer IPvX Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Outer UDP Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Geneve Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Inner IPvX Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Inner UDP Header ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ BFD Control Packet ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FCS |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 2: Geneve Encapsulation of a BFD Control Packet with the
Inner IP/UDP Header
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: The TTL for IPv4 or Hop Limit for IPv6 MUST be set to
255in accordance with [RFC5881], which specifies the IPv4/IPv6 single-hop BFD π₯
The fields of the UDP header and the BFD Control packet are encoded as specified in [RFC5881] π¦
When the BFD packets are encapsulated in Geneve this way, the Geneve header defined in [RFC8926] follows the values set below π
- The Opt Len field MUST be set as consistent with the Geneve specification ([RFC8926]) depending on whether or not Geneve options are present in the frame. The use of Geneve options with BFD is beyond the scope of this document π§
- The O bit MUST be set to
1, which indicates this packet contains a control message π - The C bit MUST be set to
0, which indicates there isn't any critical option π«Ά - The Protocol Type field MUST be set to
0x0800(IPv4) or0x86DD(IPv6), depending on the address family of the inner IP packet π - The Virtual Network Identifier (VNI) field MUST be set to the VNI number that the originating VAP is mapped to π
5.1. Demultiplexing a BFD Packet When the Payload Is IP πΈ
Once a packet is received, the NVE validates the packet as described in [RFC8926] β¨ When the payload is IP, the Protocol Type field equals 0x0800 or 0x86DD π¦ The destination IP address of the inner IP packet has to match the IP address of a VAP that's mapped to the same VNI as the received VNI. Then the UDP destination port and the TTL or Hop Limit of the inner IP packet MUST be validated to see whether or not BFD can process the received packet. The two field values of the inner IP packet MUST be in compliance with what's defined in Section 5 of this document, as well as Section 4 of [RFC5881] π₯ If the validation fails, the received packet MUST NOT be processed by BFD π
If the BFD packet is received with the value of the Your Discriminator field set to 0, then the BFD session SHOULD be identified using the VNI number and the inner IP header π The inner IP header covers the source IP and the destination IP. An implementation MAY use the inner UDP port source number to help with demultiplexing incoming BFD Control packets π If it fails to identify the BFD session, the incoming BFD Control packets MUST be dropped, and an exception event indicating the failure should be reported to the management π
If the BFD packet is received with a non-zero Your Discriminator, then the BFD session MUST be demultiplexed only with the Your Discriminator as the key π
6. Security Considerations π
Okay bestie, this section is seriously important, so read it carefully π
Security issues discussed in [RFC8926] and [RFC5880] apply to this document. Particularly, BFD is an application that runs at the two Geneve tunnel endpoints π The IP underlay network and/or the Geneve option can provide security between the peers, which are subject to the issue of overload described below π‘οΈ BFD introduces no security vulnerabilities when run in this manner. Since Geneve doesn't have any inherent security mechanisms, BFD authentication as specified in [RFC5880] is RECOMMENDED to be utilized π₯
This document supports establishing multiple BFD sessions between the same pair of NVEs. For 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, imagine each NVE of the pair has N VAPs using Ethernet as the payload. Then there could be N squared BFD sessions running between the pair of NVEs π Since N could be a high number, those N squared BFD sessions could result in overload of the NVE. In this case, it's recommended that N BFD sessions covering all N VAPs are run for the pair of NVEs π«Ά Generally speaking, the number of BFD sessions is supposed to be enough as long as all VAPs of the pair of NVEs are covered β¨
7. IANA Considerations π
This document has no IANA actions. πΈ
8. References π
8.1. Normative References
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. π - [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010,
<https://www.rfc-editor.org/info/rfc5880>. π¦ - [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, DOI 10.17487/RFC5881, June 2010,
<https://www.rfc-editor.org/info/rfc5881>. π§ - [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017,
<https://www.rfc-editor.org/info/rfc8174>. π - [RFC8926] Gross, J., Ed., Ganga, I., Ed., and T. Sridhar, Ed., "Geneve: Generic Network Virtualization Encapsulation", RFC 8926, DOI 10.17487/RFC8926, November 2020,
<https://www.rfc-editor.org/info/rfc8926>. π
8.2. Informative References β¨
okay so these are the "good to know" reads π they're not required to implement the spec, but they give you the background π
- [GENEVE-OAM] Mirsky, G., Boutros, S., Black, D., and S. Pallagatti, "OAM for use in GENEVE", Work in Progress, Internet-Draft, draft-ietf-nvo3-geneve-oam-09, 6 December 2023,
https://datatracker.ietf.org/doc/html/draft-ietf-nvo3-geneve-oam-09. - [RFC7365] Lasserre, M., Balus, F., Morin, T., Bitar, N., and Y. Rekhter, "Framework for Data Center (DC) Network Virtualization", RFC 7365, DOI 10.17487/RFC7365, October 2014,
https://www.rfc-editor.org/info/rfc7365. - [RFC8014] Black, D., Hudson, J., Kreeger, L., Lasserre, M., and T. Narten, "An Architecture for Data-Center Network Virtualization over Layer 3 (NVO3)", RFC 8014, DOI 10.17487/RFC8014, December 2016,
https://www.rfc-editor.org/info/rfc8014. - [RFC8971] Pallagatti, S., Ed., Mirsky, G., Ed., Paragiri, S., Govindan, V., and M. Mudigonda, "Bidirectional Forwarding Detection (BFD) for Virtual eXtensible Local Area Network (VXLAN)", RFC 8971, DOI 10.17487/RFC8971, December 2020,
https://www.rfc-editor.org/info/rfc8971.
Acknowledgements π«Ά
the authors wanna give a huge shoutout to Reshad Rahman, Jeffrey Haas, and Matthew Bocci for their guidance on this work π
they also thanked David Black for explaining the mapping relation between VAPs and VNIs π§
and a massive thank you to Stewart Bryant, Anoop Ghanwani, Jeffrey Haas, Reshad Rahman, Matthew Bocci, Andrew Alston, Magnus Westerlund, Paul Kyzivat, Sheng Jiang, Carl Wallace, Roman Danyliw, John Scudder, Donald Eastlake 3rd, Γric Vyncke, Zaheduzzaman Sarker, and Lars Eggert for their thorough review and super helpful comments π the whole review squad is iconic π
Authors' Addresses π
these are the people who wrote it, so here's how to reach them π¦
Xiao Min
Xiao Min
ZTE Corp.
Nanjing
China
Phone: +86 18061680168
Email: xiao.min2@zte.com.cn
Greg Mirsky
Greg Mirsky
Ericsson
United States of America
Email: gregimirsky@gmail.com
Santosh Pallagatti
Santosh Pallagatti
VMware
India
Email: santosh.pallagatti@gmail.com
Jeff Tantsura
Jeff Tantsura
Nvidia
United States of America
Email: jefftant.ietf@gmail.com
Sam Aldrin
Sam Aldrin
Google
United States of America
Email: aldrin.ietf@gmail.com
and that's a wrap on RFC 9521!! πβ¨ the whole squad is slay π π
π¦ where this page comes from
- ietf: rfc9521 2024-01
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms