This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
draft-ietf-idr-bgp-sendholdtimer.xml
466 lines (407 loc) · 20.7 KB
/
draft-ietf-idr-bgp-sendholdtimer.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
<?xml version="1.0" encoding="UTF-8"?>
<?rfc sortrefs="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc
category="std"
docName="draft-ietf-idr-bgp-sendholdtimer-13"
updates="4271"
ipr="trust200902"
submissionType="IETF"
consensus="true">
<front>
<title abbrev="BGP SendHoldTimer">Border Gateway Protocol 4 (BGP-4) Send Hold Timer</title>
<author fullname="Job Snijders" initials="J." surname="Snijders">
<organization>Fastly</organization>
<address>
<postal>
<street />
<city>Amsterdam</city>
<code />
<country>Netherlands</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author fullname="Ben Cartwright-Cox" initials="B." surname="Cartwright-Cox">
<organization abbrev="Port 179">Port 179 Ltd</organization>
<address>
<postal>
<street />
<city>London</city>
<code />
<country>United Kingdom</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<author fullname="Yingzhen Qu" initials="Y" surname="Qu">
<organization abbrev="Futurewei">Futurewei Technologies</organization>
<address>
<postal>
<street />
<city>Santa Clara</city>
<code />
<country>United States</country>
</postal>
<email>[email protected]</email>
</address>
</author>
<date />
<area>Routing</area>
<workgroup>IDR</workgroup>
<keyword>BGP</keyword>
<keyword>TCP</keyword>
<abstract>
<t>
This document defines the SendHoldtimer, along with the SendHoldTimer_Expires event, for the Border Gateway Protocol (BGP) Finite State Machine (FSM).
Implementation of the SendHoldTimer helps overcome situations where a BGP connection is not terminated after the local system detects that the remote system is not processing BGP messages.
This document specifies that the local system should close the BGP connection and not solely rely on the remote system for connection closure when the SendHoldTimer expires.
This document updates RFC4271.
</t>
</abstract>
<note title="Requirements Language">
<t>
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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
</t>
</note>
</front>
<middle>
<section title="Introduction">
<t>
This document defines the <tt>SendHoldtimer</tt>, along with the <tt>SendHoldTimer_Expires</tt> event, for the Border Gateway Protocol (BGP) <xref target="RFC4271" /> Finite State Machine (FSM) defined in section 8.
</t>
<t>
Failure to terminate a blocked BGP connection can result in network reachability issues, and the subsequent failure to generate and deliver BGP UPDATE messages to another BGP speaker of the local system is detrimental to all participants of the inter-domain routing system.
This phenomena is thought to have contributed to IP traffic blackholing events in the global Internet routing system <xref target="bgpzombies"/>.
</t>
<t>
This specification intends to improve this situation by requiring that BGP connections be terminated if the local system has detected that the remote system cannot possibly have processed any BGP messages for the duration of the <tt>SendHoldTime</tt>.
Through standardization of the aforementioned requirement, operators will benefit from consistent behavior across different BGP implementations.
</t>
<t>
BGP speakers following this specification do not rely exclusively on remote systems closing blocked connections, but will also locally close blocked connections.
</t>
</section>
<section title="Example of a problematic scenario">
<t>
In implementations lacking the concept of a <tt>SendHoldTimer</tt>, a malfunctioning or overwhelmed remote speaker 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 speaker continues to utilize stale routes.
</t>
<t>
An example fault state: as BGP runs over TCP <xref target="RFC9293" />, it is possible for a BGP speaker in the Established state to encounter a BGP speaker that is advertising a TCP Receive Window (RCV.WND) of size zero.
This 0 window prevents the local system from sending KEEPALIVE, UPDATE, or any other critical BGP messages across the network socket to the remote speaker.
</t>
<t>
Generally BGP implementations have no visibility into lower-layer subsystems such as TCP or the speaker's current Receive Window size, and there is no existing BGP mechanism for such a blocked connection to be recognized.
Hence BGP implementations are not able to handle this situation in a consistent fashion.
</t>
<t>
The major issue arising from a BGP speaker being unable to send a BGP message to a given remote speaker is that as a result that speaker subsequently is operating based on stale routing information.
Failure of the BGP speaker to send (and thus the remote speaker to receive) BGP messages on a single BGP session can negatively impact the ability of an entire autonomous system (or even a group of autonomous systems) to converge.
</t>
</section>
<section title="Changes to RFC 4271 - SendHoldTimer">
<t>
BGP speakers are implemented following a conceptual model "BGP Finite State Machine" (FSM), which is outlined in section 8 of <xref target="RFC4271"/>.
This specification adds a BGP timer, <tt>SendHoldTimer</tt>, and updates the BGP FSM as follows:
</t>
<section title="Session Attributes">
<t>
The following optional session attributes for each connection are added to Section 8, before "The optional session attributes support different features of the BGP functionality that have implications for the BGP FSM state transitions":
</t>
<t>NEW</t>
<blockquote>
<list style="empty">
<t>
14) SendHoldTimer
</t>
<t>
15) SendHoldTime
</t>
</list>
</blockquote>
<t>
The <tt>SendHoldTime</tt> determines how long a BGP speaker will stay in Established state before the TCP connection is dropped because no BGP messages can be transmitted to its peer.
A BGP speaker can configure the value of the <tt>SendHoldTime</tt> for each peer independently.
</t>
</section>
<section title="Timer Event: SendHoldTimer_Expires">
<t>
Another timer event is added to Section 8.1.3 of <xref target="RFC4271"/> as following:
</t>
<t>NEW</t>
<blockquote>
<dl newline="true">
<dt>
Event 29: SendHoldTimer_Expires
</dt>
<dd>
<dl>
<dt>Definition:</dt>
<dd>An event generated when the SendHoldTimer expires.</dd>
<dt>Status:</dt>
<dd>Optional</dd>
</dl>
</dd>
</dl>
</blockquote>
</section>
<section title="Changes to the FSM">
<t>The following changes are made to section 8.2.2 in <xref target="RFC4271"/>.</t>
<t>In "OpenConfirm State", the handling of Event 26 is revised as follows:</t>
<t>OLD</t>
<blockquote>
<t>
If the local system receives a KEEPALIVE message (KeepAliveMsg (Event 26)), the local system:
<list style="hanging">
<t hangText="-">restarts the HoldTimer and</t>
<t hangText="-">changes its state to Established.</t>
</list>
</t>
</blockquote>
<t>NEW</t>
<blockquote>
<t>
If the local system receives a KEEPALIVE message (KeepAliveMsg (Event 26)), the local system:
<list style="hanging">
<t hangText="-">restarts the HoldTimer,</t>
<t hangText="-">starts the SendHoldTimer if the SendHoldTime is non-zero, and</t>
<t hangText="-">changes its state to Established.</t>
</list>
</t>
</blockquote>
<t>
The following paragraph is added to section 8.2.2 in "Established State", after the paragraph which ends "unless the negotiated HoldTime value is zero.":
</t>
<t>NEW</t>
<blockquote>
<list style="empty">
<t>If the SendHoldTimer_Expires (Event 29) occurs, the local system:
<list style="hanging">
<t hangText="-">(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,</t>
<t hangText="-">logs an error message in the local system with the BGP Error Code "Send Hold Timer Expired",</t>
<t hangText="-">releases all BGP resources,</t>
<t hangText="-">sets the ConnectRetryTimer to zero,</t>
<t hangText="-">drops the TCP connection,</t>
<t hangText="-">increments the ConnectRetryCounter by 1,</t>
<t hangText="-">(optionally) performs peer oscillation damping if the DampPeerOscillations attribute is set to TRUE, and</t>
<t hangText="-">changes its state to Idle.</t>
</list>
</t>
<t>
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 cases the SendHoldTimer is stopped.
</t>
<t>
The SendHoldTimer is stopped following any transition out of the Established state as part of the "release all BGP resources" action.
</t>
</list>
</blockquote>
</section>
<section title="Changes to BGP Timers" anchor="timers">
<t>
<xref target="RFC4271" section="10"/> summarizes BGP Timers.
This document adds another optional BGP timer: <tt>SendHoldTimer</tt>.
</t>
<t>NEW</t>
<blockquote>
<t>
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 <xref section="5" target="I-D.ietf-idr-bgp-sendholdtimer"/> for suggested default values.
</t>
</blockquote>
</section>
</section>
<section title="Send Hold Timer Expired Error Handling">
<t>
If the local system does not send any BGP messages within the period specified in <tt>SendHoldTime</tt>, then a NOTIFICATION message with the "Send Hold Timer Expired" Error Code MAY be sent and the BGP connection MUST be closed.
Additionally, an error MUST be logged in the local system, indicating the Send Hold Timer Expired Error Code.
</t>
</section>
<section title="Implementation Considerations" anchor="implcons">
<t>
Due to the relative rarity of the failure mode that this specification is designed to address, and also the fact that network operators may be unfamiliar with the formal specification of BGP fault detection mechanisms such as <tt>HoldTimer</tt>, it is likely that a large number of operators are unaware of the necessity of an additional mechanism such as <tt>SendHoldtimer</tt>.
</t>
<t>
Accordingly, it is RECOMMENDED that implementations of this specification enable <tt>SendHoldtimer</tt> by default, without requiring additional configuration of the BGP speaking device.
</t>
<t>
The default value of <tt>SendHoldTime</tt> for a BGP connection SHOULD be the greater of:
<ul>
<li>8 minutes; or</li>
<li>2 times the negotiated HoldTime</li>
</ul>
</t>
<t>
Implementations MAY make the value of <tt>SendHoldTime</tt> configurable, either globally or on a per-peer basis, within the constraints set out in <xref target="timers"/> above.
</t>
<t>
The subcode for NOTIFICATION message "Send Hold Timer Expired" is set to 0 and is not used, no additional data is to be appended to the end of a "Send Hold Timer Expired" NOTIFICATION message.
</t>
</section>
<section title="Operational Considerations">
<t>
When the local system recognizes a remote speaker is not processing any BGP messages for the duration of the <tt>SendHoldTime</tt>, it is likely that the local system will not be able to inform the remote peer through a NOTIFICATION message as to why the connection is being closed.
This documents suggests that an attempt to send a NOTIFICATION message with the "Send Hold Timer Expired" error code is still made, if doing so will not delay closing the BGP connection.
Meanwhile an error message is logged into the local system.
</t>
<t>
Other mechanisms can be used as well, for example BGP speakers SHOULD provide this reason as part of their operational state; e.g. bgpPeerLastError in the <xref target="RFC4273">BGP MIB</xref>.
</t>
</section>
<section title="Security Considerations">
<t>
This specification does not change BGP's security characteristics. Implementing the BGP <tt>SendHoldTimer</tt> as specified in this document will enhance network resilience by terminating connections with malfunctioning or overwhelmed remote peers.
</t>
</section>
<section title="IANA Considerations">
<t>
IANA has registered code 8 for "Send Hold Timer Expired" in the "BGP Error (Notification) Codes" registry in the "Border Gateway Protocol (BGP) Parameters" registry group.
</t>
</section>
<section title="Acknowledgements">
<t>
The authors would like to thank
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.
</t>
</section>
</middle>
<back>
<references title="Normative References">
<?rfc include="reference.RFC.2119.xml"?>
<?rfc include="reference.RFC.4271.xml"?>
<?rfc include="reference.RFC.8174.xml"?>
<reference anchor="RFC9293" target="https://www.rfc-editor.org/info/rfc9293">
<front>
<title>Transmission Control Protocol (TCP)</title>
<author fullname="Wesley M. Eddy" initials="W." surname="Eddy" role="editor"/>
<date month="August" year="2022"/>
<abstract>
<t>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.
</t>
</abstract>
</front>
<seriesInfo name="RFC" value="9293"/>
<seriesInfo name="DOI" value="10.17487/RFC9293"/>
</reference>
<!-- NOTE TO RFC-EDITOR:
The below reference is intended as a 'self-reference', but unsure how to do that properly in xml2rfc
See https://mailarchive.ietf.org/arch/msg/idr/sY-om-d3kZC1ypoBXAS17NCXtXk/
and https://mailarchive.ietf.org/arch/msg/idr/L6MinGVjHn94gRhCi2lGAQ9GoHw/
for discussion on the concern of carrying over a literal non-reference into the patched target document content
-->
<reference anchor="I-D.ietf-idr-bgp-sendholdtimer" target="https://datatracker.ietf.org/doc/html/draft-ietf-idr-bgp-sendholdtimer">
<front>
<title>Border Gateway Protocol 4 (BGP-4) Send Hold Timer</title>
<author fullname="Job Snijders" initials="J." surname="Snijders">
<organization>Fastly</organization>
</author>
<author fullname="Ben Cartwright-Cox" initials="B." surname="Cartwright-Cox">
<organization>Port 179 Ltd</organization>
</author>
<author fullname="Yingzhen Qu" initials="Y." surname="Qu">
<organization>Futurewei Technologies</organization>
</author>
<date />
<abstract>
<t>This document defines the SendHoldtimer, along with the SendHoldTimer_Expires event, for the Border Gateway Protocol (BGP) Finite State Machine (FSM). Implementation of the SendHoldTimer helps overcome situations where a BGP connection is not terminated after the local system detects that the remote system is not processing BGP messages. This document specifies that the local system should close the BGP connection and not solely rely on the remote system for connection closure when the SendHoldTimer expires. This document updates RFC4271.</t>
</abstract>
</front>
<seriesInfo name="Internet-Draft" value="draft-ietf-idr-bgp-sendholdtimer"/>
</reference>
</references>
<references title="Informative References">
<reference anchor="openbgpd" target="https://marc.info/?l=openbsd-tech&m=160820754925261&w=2">
<front>
<title>bgpd send side hold timer</title>
<author fullname="Claudio Jeker"><organization>OpenBSD</organization></author>
<date month="December" year="2020" />
</front>
</reference>
<reference anchor="frr" target="https://github.com/FRRouting/frr/pull/11225">
<front>
<title>bgpd: implement SendHoldTimer</title>
<author fullname="David Lamparter"><organization>NetDEF</organization></author>
<date month="May" year="2022" />
</front>
</reference>
<reference anchor="neo-bgp" target="https://bgp.tools/kb/bgp-support">
<front>
<title>What does bgp.tools support</title>
<author fullname="Ben Cartwright-Cox"><organization>Port 179 Ltd</organization></author>
<date month="Aug" year="2022" />
</front>
</reference>
<reference anchor="BIRD" target="https://gitlab.nic.cz/labs/bird/-/commit/bcf2327425d4dd96f381b87501cccf943bed606e">
<front>
<title>BIRD Internet Routing Daemon</title>
<author fullname=" Katerina Kubecova"><organization>CZ.NIC</organization></author>
<date month="Oct" year="2023" />
</front>
</reference>
<reference anchor="bgpzombies" target="https://labs.ripe.net/author/romain_fontugne/bgp-zombies/">
<front>
<title>BGP Zombies</title>
<author fullname="Romain Fontugne"><organization>IIJ Research Lab</organization></author>
<date month="april" year="2019" />
</front>
</reference>
<?rfc include="reference.RFC.4273.xml"?>
</references>
<section title="Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION">
<t>
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.
</t>
<t>
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".
</t>
<t>
<list style="symbols">
<t>
OpenBGPD <xref target="openbgpd"/>
</t>
</list>
<list style="symbols">
<t>
FRRouting <xref target="frr"/>
</t>
</list>
<list style="symbols">
<t>
neo-bgp (bgp.tools) <xref target="neo-bgp"/>
</t>
</list>
<list style="symbols">
<t>
BIRD <xref target="BIRD"/>
</t>
</list>
</t>
<t>
Patches to recognize error code 8 were merged into OpenBSD's and the-tcpdump-group's tcpdump implementations.
</t>
</section>
</back>
</rfc>