Border Gateway Protocol 4 (BGP-4) Send Hold Timer
draft-spaghetti-idr-bgp-sendholdtimer-00

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Authors Job Snijders  , Ben Cartwright-Cox 
Last updated 2021-04-20
Stream (None)
Formats pdf htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
IDR                                                          J. Snijders
Internet-Draft                                                    Fastly
Updates: 4271 (if approved)                            B. Cartwright-Cox
Intended status: Standards Track                          April 20, 2021
Expires: October 22, 2021

           Border Gateway Protocol 4 (BGP-4) Send Hold Timer
                draft-spaghetti-idr-bgp-sendholdtimer-00

Abstract

   This document defines the SendHoldTimer session attribute for the
   Border Gateway Protocol (BGP) Finite State Machine (FSM).  A session
   should be terminated if the TCP receive window is zero for the
   duration of the Send Hold Timer, in this situation the peer is
   expected to terminate the connection.  For robustness, this document
   specifies that the local system should also close the connection.
   This document updates RFC4271.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on October 22, 2021.

Copyright Notice

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

Snijders & Cartwright-CoExpires October 22, 2021                [Page 1]
Internet-Draft              BGP SendHoldTimer                 April 2021

   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 Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  Specification of the Send Hold Timer  . . . . . . . . . . . .   3
     2.1.  Session Attributes  . . . . . . . . . . . . . . . . . . .   3
     2.2.  SendHoldTimer_Expires Event Definition  . . . . . . . . .   3
   3.  Send Hold Timer Expired Error Handling  . . . . . . . . . . .   4
   4.  Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION   5
   5.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .   5
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .   5
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   6
   8.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   6
     8.1.  Normative References  . . . . . . . . . . . . . . . . . .   6
     8.2.  Informative References  . . . . . . . . . . . . . . . . .   6
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   7

1.  Introduction

   This document defines the SendHoldTimer session attribute for the
   Border Gateway Protocol (BGP) [RFC4271] Finite State Machine (FSM)
   defined in section 8.

   As BGP runs over TCP [RFC0793] 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 and thus preventing the local
   system from sending KEEPALIVE, CEASE, WITHDRAW, UPDATE, or other
   critical messages across the wire.  At the moment of writing, most
   BGP implementations appear unable to handle this situation in a
   robust fashion.

   Not terminating 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 [l3outage]

Snijders & Cartwright-CoExpires October 22, 2021                [Page 2]
Internet-Draft              BGP SendHoldTimer                 April 2021

   This specification intends to improve this situation by requiring
   sessions to be terminated if the TCP receive window is zero for the
   duration of the Send Hold Timer.  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.

2.  Specification of the Send Hold Timer

   BGP speakers are implemented following a conceptual model "BGP Finite
   State Machine" (FSM), which is outlined in section 8 of [RFC4271].
   This specification updates the BGP FSM as following:

2.1.  Session Attributes

   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 4 minutes is recommended)

2.2.  SendHoldTimer_Expires Event Definition

   Section 8.1.3 [RFC4271] is extended as following:

       Event XX: SendHoldTimer_Expires
       Definition : An event generated when the SendHoldTimer expires.
       Status: Mandatory

   If the SendHoldTimer_Expires (Event XX), 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,

Snijders & Cartwright-CoExpires October 22, 2021                [Page 3]
Internet-Draft              BGP SendHoldTimer                 April 2021

      -  (optionally) performs peer oscillation damping if the
         DampPeerOscillations attribute is set to TRUE, and

      -  changes 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, and

      -  sets the SendHoldTimer to a large value, and

      -  changes 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 initialization

      -  sends an OPEN message to its peer,

      -  sets the HoldTimer to a large value, and

      -  changes its state to OpenSent.

   A HoldTimer value of 4 minutes is suggested.

   A SendHoldTimer value of 4 minutes is suggested.

3.  Send Hold Timer Expired Error Handling

   If a system does not send and receive 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.

Snijders & Cartwright-CoExpires October 22, 2021                [Page 4]
Internet-Draft              BGP SendHoldTimer                 April 2021

4.  Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION

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

   o  OpenBGPD [openbgpd]

   While not a BGP implementation, as a result of investigation into
   this phenomena, the Linux TCP implementation TCP_USER_TIMEOUT option
   was improved, allowing easier termination of TCP sessions which are
   not progressing data [TCP_USER_TIMEOUT].

5.  Acknowledgements

   The authors would like to thank William McCall for their helpful
   review of this document.

6.  Security Considerations

   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.

Snijders & Cartwright-CoExpires October 22, 2021                [Page 5]
Internet-Draft              BGP SendHoldTimer                 April 2021

      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.

7.  IANA Considerations

   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.

8.  References

8.1.  Normative References

   [RFC0793]  Postel, J., "Transmission Control Protocol", STD 7,
              RFC 793, DOI 10.17487/RFC0793, September 1981,
              <https://www.rfc-editor.org/info/rfc793>.

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

8.2.  Informative References

   [l3outage]
              Reuters, "Level 3 problem sparks temporary outage for some
              U.S. telecomms", August 2020,
              <https://www.reuters.com/article/level-3-communi-outages-
              idUSL2N1CB00C>.

Snijders & Cartwright-CoExpires October 22, 2021                [Page 6]
Internet-Draft              BGP SendHoldTimer                 April 2021

   [openbgpd]
              Jeker, C., "bgpd send side hold timer", December 2020,
              <https://marc.info/?l=openbsd-tech&m=160796802508185&w=2>.

   [TCP_USER_TIMEOUT]
              Chen, E., "[Idr] TCP & BGP: Some don't send terminate BGP
              when holdtimer expired, because TCP recv window is 0",
              January 2021, <https://mailarchive.ietf.org/arch/msg/idr/
              KOU59BTIvsqv8OHVBIvcVr97fD4/>.

Authors' Addresses

   Job Snijders
   Fastly
   Amsterdam
   Netherlands

   Email: job@fastly.com

   Ben Cartwright-Cox
   London
   United Kingdom

   Email: ben@benjojo.co.uk

Snijders & Cartwright-CoExpires October 22, 2021                [Page 7]