RFC 9687

Border Gateway Protocol 4 (BGP-4) Send Hold Timer

πŸ“… published November 2024, from ietf

Internet Engineering Task Force (IETF) πŸŽ€

Okay so bestie, this is RFC 9687, the one that adds a SendHoldTimer to BGP πŸ¦‹ It's written by J. Snijders (Fastly), B. Cartwright-Cox (Port 179) and Y. Qu (Futurewei), and it's a Standards Track doc, which means it's the real deal ✨ It was published in November 2024 and it updates RFC 4271 (that's the BGP-4 spec, the OG). It doesn't obsolete anything. πŸ’…

Title: Border Gateway Protocol 4 (BGP-4) Send Hold Timer Request for Comments: 9687 ISSN: 2070-1721


Abstract ✨

Okay so the big idea 🧚 This doc defines the SendHoldTimer and the SendHoldTimer_Expires event for the BGP Finite State Machine (FSM). Implementing it helps when a BGP connection never gets closed even though the local system already noticed that the remote system isn't processing BGP messages anymore πŸ’€ The doc says the local system should close the BGP connection itself when the SendHoldTimer expires, and not just wait around for the remote system to close it. It's giving self-reliance energy πŸ’ͺ This document updates RFC 4271.

Status of This Memo 🌸

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9687.

Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.

Table of Contents πŸ“

  1. Introduction
  2. Requirements Language
  3. Example of a Problematic Scenario
  4. Changes to RFC 4271 - SendHoldTimer 4.1. Session Attributes 4.2. Timer Event: SendHoldTimer_Expires 4.3. Changes to the FSM 4.4. Changes to BGP Timers
  5. Send Hold Timer Expired Error Handling
  6. Implementation Considerations
  7. Operational Considerations
  8. Security Considerations
  9. IANA Considerations
  10. References 10.1. Normative References 10.2. Informative References Acknowledgements Authors' Addresses

1. Introduction πŸ¦‹

Okay so this doc defines the SendHoldTimer and the SendHoldTimer_Expires event for the BGP Finite State Machine (FSM) that's defined in Section 8 of [RFC4271] πŸ™ˆ

Failing to shut down a blocked BGP connection can cause network reachability problems. After that, the local system can't generate and deliver BGP UPDATE messages to another BGP speaker, and that's bad news for everyone in the inter-domain routing system 😭 This phenomenon is thought to have helped cause IP traffic packet loss events in the global Internet routing system [bgpzombies].

This spec aims to make things better by requiring that BGP connections get terminated if the local system has detected that the remote system can't possibly have processed any BGP messages for the duration of the SendHoldTime. Once this requirement is standardized, operators get consistent behavior across different BGP implementations, which is so iconic ✨

BGP speakers following this spec don't rely only on remote systems to close blocked connections. They also close blocked connections locally 🫢

2. Requirements Language 🌈

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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

3. Example of a Problematic Scenario πŸ’€

Okay so picture this. In implementations that don't have the concept of a SendHoldTimer, a malfunctioning or overwhelmed remote speaker can make data on the BGP socket in the local system pile up ad infinitum 😭 That can cause forwarding failure and traffic loss, because the overwhelmed speaker keeps using stale routes. Not it πŸ™…β€β™€οΈ

Here's an example fault state πŸŽ€ BGP runs over TCP [RFC9293], so a BGP speaker in the Established state can run into a BGP speaker that's advertising a TCP Receive Window (RCV.WND) of size zero. That zero-size window stops the local system from sending KEEPALIVE, UPDATE, or any other critical BGP messages across the network socket to the remote speaker. Literally stuck πŸ’€

Generally, BGP implementations have no visibility into lower-layer subsystems like TCP or the speaker's current Receive Window size, and there's no existing BGP mechanism for recognizing a blocked connection like this. So BGP implementations can't handle this situation in a consistent way πŸ™ˆ

The main problem when a BGP speaker can't send a BGP message to a remote speaker is that the affected speaker might end up running on outdated routing information. If the BGP speaker can't send (and so the remote speaker can't receive) BGP messages on a single BGP session, that can seriously hurt an entire autonomous system's ability to converge, or even a whole group of autonomous systems 😭πŸ”₯

4. Changes to RFC 4271 - SendHoldTimer πŸ‘‘

BGP speakers are implemented following a conceptual model called the "BGP Finite State Machine" (FSM), which is outlined in Section 8 of [RFC4271]. This spec adds a BGP timer, the SendHoldTimer, and updates the BGP FSM as described in the subsections below 🧚

4.1. Session Attributes πŸ¦‹

The following optional session attributes for each connection get added to the list in Section 8 of [RFC4271], right before "The optional session attributes support different features of the BGP functionality that have implications for the BGP FSM state transitions":

NEW

|     14) SendHoldTimer
|
|     15) SendHoldTime

SendHoldTime decides how long a BGP speaker stays in the Established state before the TCP connection gets dropped, because no BGP messages can be transmitted to its peer. A BGP speaker can configure the value of the SendHoldTime for each peer independently πŸ’–

4.2. Timer Event: SendHoldTimer_Expires 🌸

Another timer event gets added to Section 8.1.3 of [RFC4271] like this:

NEW

|     Event 29: SendHoldTimer_Expires
|
|        Definition: An event generated when the SendHoldTimer
|        expires.
|
|        Status: Optional

4.3. Changes to the FSM ✨

The following changes get made to Section 8.2.2 of [RFC4271].

In "OpenConfirm State", the handling of Event 26 is revised like this:

OLD

|  If the local system receives a KEEPALIVE message (KeepAliveMsg
|  (Event 26)), the local system:
|
|     -  restarts the HoldTimer and
|
|     -  changes its state to Established.

NEW

|  If the local system receives a KEEPALIVE message (KeepAliveMsg
|  (Event 26)), the local system:
|
|     -  restarts the HoldTimer,
|
|     -  starts the SendHoldTimer if the SendHoldTime is non-zero,
|        and
|
|     -  changes its state to Established.

The following paragraph gets added to Section 8.2.2 of [RFC4271] in "Established State", after the paragraph that ends "unless the negotiated HoldTime value is zero":

NEW

|  If the SendHoldTimer_Expires (Event 29) occurs, the local system:
|
|     -  (optionally) sends a NOTIFICATION message with the BGP Error
|        Code "Send Hold Timer Expired" if the local system can
|        determine that doing so will not delay the following actions
|        in this paragraph,
|
|     -  logs an error message in the local system with the BGP Error
|        Code "Send Hold Timer Expired",
|
|     -  releases all BGP resources,
|
|     -  sets the ConnectRetryTimer to zero,
|
|     -  drops the TCP connection,
|
|     -  increments the ConnectRetryCounter by 1,
|
|     -  (optionally) performs peer oscillation damping if the
|        DampPeerOscillations attribute is set to TRUE, and
|
|     -  changes its state to Idle.
|
|     Each time the local system sends a BGP message, it restarts the
|     SendHoldTimer unless the SendHoldTime value is zero or the
|     negotiated HoldTime value is zero, in which case the
|     SendHoldTimer is stopped.
|
|     The SendHoldTimer is stopped following any transition out of
|     the Established state as part of the "release all BGP
|     resources" action.

4.4. Changes to BGP Timers ⏰

Section 10 of [RFC4271] summarizes BGP timers. This doc adds another optional BGP timer: SendHoldTimer.

NEW

|  SendHoldTime is an FSM attribute that stores the initial value for
|  the SendHoldTimer.  If SendHoldTime is non-zero, then it MUST be
|  greater than the value of HoldTime; see Section 6 of [RFC9687] for
|  suggested default values.

5. Send Hold Timer Expired Error Handling 🚨

If the local system doesn't send any BGP messages within the period specified in SendHoldTime, then a NOTIFICATION message with the "Send Hold Timer Expired" Error Code MAY be sent, and the BGP connection MUST be closed. On top of that, an error MUST be logged in the local system, indicating the "Send Hold Timer Expired" Error Code πŸ“

6. Implementation Considerations πŸ§šβ€β™€οΈ

Due to how rare the failure mode this spec is designed for is, and also the fact that network operators may not be familiar with the formal spec of BGP fault detection mechanisms like HoldTimer, it's likely that a lot of operators won't know they need an extra mechanism like SendHoldTimer πŸ™ˆ

So, it is RECOMMENDED that implementations of this spec enable SendHoldTimer by default, without requiring additional configuration of the BGP-speaking device πŸ’–

The default value of SendHoldTime for a BGP connection SHOULD be the greater of:

  • 8 minutes or
  • 2 times the negotiated HoldTime

Implementations MAY make the value of SendHoldTime configurable, either globally or on a per-peer basis, within the constraints set out in Section 4.4 ✨

The subcode for the NOTIFICATION message "Send Hold Timer Expired" is set to 0 and isn't used. No additional data is to be appended to the end of a "Send Hold Timer Expired" NOTIFICATION message 🌟

Part 1 of 2 is done, bestie! Part 2 covers Section 7 (Operational Considerations) onward, including Security Considerations, IANA Considerations, the references, Acknowledgements and Authors' Addresses πŸ’…

7. Operational Considerations πŸŽ€

okay so bestie, this is the part where we talk about what happens when things go sideways 😭 When the local system notices that a remote speaker hasn't processed any BGP messages for the whole SendHoldTime, it's likely not going to be able to tell the remote peer why the connection is closing through a NOTIFICATION message. πŸ’€

So this doc suggests still trying to send a NOTIFICATION with the "Send Hold Timer Expired" Error Code, as long as doing so won't delay closing the BGP connection ✨ Meanwhile, the local system logs an error message. Main character logging behavior πŸ’…

There are other ways to get the info out too! For example, BGP speakers SHOULD provide this reason ("Send Hold Timer Expired") as part of their operational state (for example, bgpPeerLastError in the BGP MIB [RFC4273]) πŸ¦‹


8. Security Considerations πŸ”

Okay, this one is important, so listen up πŸ‘‘ This specification does not change BGP's security characteristics at all. Not one bit πŸ™ˆ

Implementing the BGP SendHoldTimer as specified in this document will enhance network resilience by terminating connections with malfunctioning or overwhelmed remote peers. So it's giving protection and stability vibes, periodt πŸ›‘οΈπŸ’œ


9. IANA Considerations 🧚

IANA has registered value 8 for "Send Hold Timer Expired" in the "BGP Error (Notification) Codes" registry within the "Border Gateway Protocol (BGP) Parameters" registry group 🌸


10. References πŸ“š

10.1. Normative References

Here are the normative ones, and they're literally the foundation of everything in this doc 🫢

[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>.

[RFC4271]  Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A
           Border Gateway Protocol 4 (BGP-4)", RFC 4271,
           DOI 10.17487/RFC4271, January 2006,
           <https://www.rfc-editor.org/info/rfc4271>.

[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>.

[RFC9293]  Eddy, W., Ed., "Transmission Control Protocol (TCP)",
           STD 7, RFC 9293, DOI 10.17487/RFC9293, August 2022,
           <https://www.rfc-editor.org/info/rfc9293>.

10.2. Informative References

And these are the informative ones, the extra reading for when you want to go deeper πŸ”βœ¨

[bgpzombies]
           Fontugne, R., "BGP Zombies", April 2019,
           <https://labs.ripe.net/author/romain_fontugne/bgp-
           zombies/>.

[RFC4273]  Haas, J., Ed. and S. Hares, Ed., "Definitions of Managed
           Objects for BGP-4", RFC 4273, DOI 10.17487/RFC4273,
           January 2006, <https://www.rfc-editor.org/info/rfc4273>.

Acknowledgements πŸ’–

The authors wanted to give a huge shout-out to William McCall, Theo de Raadt, John Heasley, Nick Hilliard, Jeffrey Haas, Tom Petch, Susan Hares, Keyur Patel, Ben Maddison, Claudio Jeker, and John Scudder for their helpful review of this document πŸ™ŒπŸ«Ά Iconic behavior, honestly.


Authors' Addresses 🌈

Job Snijders
Fastly
Amsterdam
Netherlands
Email: job@fastly.com


Ben Cartwright-Cox
Port 179 Ltd
London
United Kingdom
Email: ben@benjojo.co.uk


Yingzhen Qu
Futurewei Technologies
San Jose, CA 95131
United States of America
Email: yingzhen.ietf@gmail.com
πŸ“¦ where this page comes from