Border Gateway Protocol 4 (BGP-4) Send Hold TimerFastlyAmsterdamNetherlandsjob@fastly.comPort 179 LtdLondonUnited Kingdomben@benjojo.co.uk
Routing
IDRBGPsessionTCPEBGP
This document defines the SendHoldTimer session attribute for the Border Gateway Protocol (BGP) Finite State Machine (FSM).
Implementation of a SendHoldTimer should help overcome situations where BGP sessions are not terminated after it has become detectable for the local system that the remote system is not processing BGP messages.
For robustness, this document specifies that the local system should close BGP connections and not solely rely on the remote system for session closure when BGP timers have expired.
This document updates RFC4271.
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.
This document defines the SendHoldTimer session attribute for the Border Gateway Protocol (BGP) Finite State Machine (FSM) defined in section 8.
Failure to terminate a 'stuck' BGP session can result in Denial Of Service, the subsequent failure to generate and deliver BGP WITHDRAW messages to other BGP peers of the local system is detrimental to all participants of the inter-domain routing system.
This phenomena is theorised to have contributed to IP traffic backholing events in global Internet routing system .
This specification intends to improve this situation by requiring sessions to be terminated if the local system has detected that the remote system cannot possibly have received any BGP messages for the duration of the SendHoldTimer.
Through codification of the aforementioned requirement, operators will benefit from consistent behavior across different BGP implementations.
BGP speakers following this specification do not exclusively rely on remote systems robustly closing connections, but will also locally close connections.
In implementations lacking the concept of a SendHoldTimer, a malfunctioning or overwhelmed remote peer may cause data on the BGP socket in the local system to accumulate ad infinitum.
This could result in forwarding failure and traffic loss, as the overwhelmed peer continues to utilize stale routes.
An example fault state: as BGP runs over TCP it is possible for hosts in the ESTABLISHED state to encounter a BGP peer that is advertising a TCP Receive Window (RCV.WND) of size zero, this 0 window prevents the local system from sending KEEPALIVE, CEASE, WITHDRAW, UPDATE, or any other critical BGP messages across the network socket to the remote peer.
Historically, many BGP implementations were unable to handle this situation in a robust fashion.
Previous BGP RFC specifications would not give cause for the session to be torn down in such situations.
Generally BGP implementation have no visibility into lower-layer subsystems such as TCP or the peer's current Receive Window.
Therefore, this document relies upon BGP implementations having the ability to detect whether the TCP socket to a BGP peer is progressing (data is being transmitted), or persisting in a stalled state.
BGP speakers are implemented following a conceptual model "BGP Finite State Machine" (FSM), which is outlined in section 8 of .
This specification updates the BGP FSM as following:
The following mandatory session attributes are added to paragraph 6 of Section 8, before "The state session attribute indicates the current state of the BGP FSM":
9) SendHoldTimer
10) SendHoldTime (an initial value of 8 minutes is recommended)
Section 8.1.3 is extended as following:
If the SendHoldTimer_Expires (Event XX1), the local system:
logs a message with the BGP Error Notification Code "Send Hold Timer Expired",releases all BGP resources,sets the ConnectRetryTimer to zero,drops the TCP connection,increments the ConnectRetryCounter,(optionally) performs peer oscillation damping if the DampPeerOscillations attribute is set to TRUE, andchanges its state to Idle.
If the DelayOpenTimer_Expires event (Event 12) occurs in the Connect state, the local system:
sends an OPEN message to its peer,sets the HoldTimer to a large value, andsets the SendHoldTimer to a large value, andchanges its state to OpenSent.
If the DelayOpen attribute is set to FALSE, the local system:
stops the ConnectRetryTimer (if running) and sets the ConnectRetryTimer to zero,completes BGP initializationsends an OPEN message to its peer,sets the HoldTimer to a large value, andsets the SendHoldTimer to a large value, andchanges its state to OpenSent.
A HoldTimer value of 4 minutes is suggested.
A SendHoldTimer value of 8 minutes is suggested.
Section 8.1.5 is extended as following:
On page 74 before "If the local system receives an UPDATE message, and the UPDATE message error handling procedure (see Section 6.3) detects an error (Event 28), the local system:", add the following:
If the local system transmits a KEEPALIVE or UPDATE message (MsgSent (Event XX2)), the local system:
restarts the SendHoldTimer, andremains in the Established state.
If a system does not send successive KEEPALIVE, UPDATE, and/or NOTIFICATION messages within the period specified in the Send Hold Time, then the BGP connection is closed and a log message is emitted.
When the local system recognizes a remote peer is not processing any BGP messages for the duration of the Send Hold Timer, the local system will not be able to inform the remote peer through a BGP message as to why the session is being closed (i.e. a NOTIFICATION message with the "Send Hold Timer Expired" error code).
Even so, BGP speakers SHOULD provide this reason as part of their operational state; e.g. bgpPeerLastError in the BGP MIB.
This specification addresses the vulnerability of a BGP speaker to a potential attack whereby a BGP peer can pretend to be unable to process BGP messages and in doing so create a scenario where the local system is poisoned with stale routing information.
There are three detrimental aspects to the problem of not robustly handling 'stuck' peers:
Failure to send BGP messages to a peer implies the peer is operating based on stale routing information.
Failure to disconnect from a 'stuck' peer hinders the local system's ability to construct a non-stale local Routing Information Base (RIB).
Failure to disconnect from a 'stuck' peer hinders the local system's ability to inform other BGP peers with current network reachability information.
In other respects, this specification does not change BGP's security characteristics.
This document requests IANA to assign a value named "Send Hold Timer Expired" in the "BGP Error (Notification) Codes" sub-registry under the "Border Gateway Protocol (BGP) Parameters" registry.
The authors would like to thank
William McCall,
Theo de Raadt,
John Heasley,
Nick Hilliard,
Jeffrey Haas,
and
Tom Petch
for their helpful review of this document.
Transmission Control Protocol (TCP)This document specifies the Transmission Control Protocol (TCP). TCP is an important transport-layer protocol in the Internet protocol stack, and it has continuously evolved over decades of use and growth of the Internet. Over this time, a number of changes have been made to TCP as it was specified in RFC 793, though these have only been documented in a piecemeal fashion. This document collects and brings those changes together with the protocol specification from RFC 793. This document obsoletes RFC 793, as well as RFCs 879, 2873, 6093, 6429, 6528, and 6691 that updated parts of RFC 793. It updates RFCs 1011 and 1122, and it should be considered as a replacement for the portions of those documents dealing with TCP requirements. It also updates RFC 5961 by adding a small clarification in reset handling while in the SYN-RECEIVED state. The TCP header control bits from RFC 793 have also been updated based on RFC 3168.
bgpd send side hold timerOpenBSDbgpd: implement SendHoldTimerNetDEFWhat does bgp.tools supportPort 179 LtdBGP ZombiesIIJ Research Lab
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in RFC 7942.
The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs.
Please note that the listing of any individual implementation here does not imply endorsement by the IETF.
Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors.
This is not intended as, and must not be construed to be, a catalog of available implementations or their features.
Readers are advised to note that other implementations may exist.
According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.
It is up to the individual working groups to use this information as they see fit".
OpenBGPD
FRRouting
neo-bgp (bgp.tools)