idnits 2.17.1 draft-sa-idr-maxprefix-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC4271, updated by this document, for RFC5378 checks: 2006-01-13) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (September 23, 2019) is 1674 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-17) exists of draft-ietf-idr-bgp-model-06 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Inter-Domain Routing J. Snijders 3 Internet-Draft NTT 4 Updates: 4271 (if approved) M. Aelmans 5 Intended status: Standards Track Juniper Networks 6 Expires: March 26, 2020 September 23, 2019 8 Revised BGP Maximum Prefix Limits 9 draft-sa-idr-maxprefix-00 11 Abstract 13 This document updates RFC4271 by revising control mechanism which 14 limit the negative impact of route leaks (RFC7908) and/or resource 15 exhaustion in Border Gateway Protocol (BGP) implementations. 17 Requirements Language 19 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 20 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 21 "OPTIONAL" in this document are to be interpreted as described in BCP 22 14 [RFC2119] [RFC8174] when, and only when, they appear in all 23 capitals, as shown here. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at https://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on March 26, 2020. 42 Copyright Notice 44 Copyright (c) 2019 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (https://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 60 2. Changes to RFC4271 Section 6 . . . . . . . . . . . . . . . . 2 61 3. Changes to RFC4271 Section 8 . . . . . . . . . . . . . . . . 3 62 4. BGP Yang Model Considerations - PERHAPS REMOVE BEFORE 63 PUBLICATION . . . . . . . . . . . . . . . . . . . . . . . . . 4 64 5. Changes to RFC4271 Section 9 . . . . . . . . . . . . . . . . 4 65 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 66 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 67 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 6 68 9. Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION 6 69 10. Appendix: Implementation Guidance . . . . . . . . . . . . . . 7 70 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 71 11.1. Normative References . . . . . . . . . . . . . . . . . . 8 72 11.2. Informative References . . . . . . . . . . . . . . . . . 8 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 75 1. Introduction 77 This document updates [RFC4271] by revising control mechanism which 78 limit the negative impact of route leaks [RFC7908] and/or resource 79 exhaustion in Border Gateway Protocol (BGP) implementations. While 80 [RFC4271] described methods to tear down BGP sessions or discard 81 UPDATES after certain thresholds are exceeded, some nuances in this 82 specification were missing resulting in inconsistencies between BGP 83 implementations. In addition to clarifying "inbound maximum prefix 84 limits", this document also introduces a specification for "outbound 85 maximum prefix limits". 87 2. Changes to RFC4271 Section 6 89 This section updates [RFC4271] to specify what events can result in 90 AutomaticStop (Event 8) in the BGP FSM. 92 The following paragraph replaces the second paragraph of Section 6.7 93 (Cease), which starts with "A BGP speaker MAY support" and ends with 94 "The speaker MAY also log this locally.": 96 A BGP speaker MAY support the ability to impose a locally- 97 configured, upper bound on the number of address prefixes the 98 speaker is willing to accept from a neighbor (inbound maximum 99 prefix limit) or send to a neighbor (outbound prefix limit). The 100 limit on the prefixes accepted from a neighbor can be applied 101 before policy processing (Pre-Policy) or after policy processing 102 (Post-Policy). Outbound prefix limits MUST be measured after 103 policy since the Policy (even a policy of "send all") is run 104 before determining what can be sent. When the upper bound is 105 reached, the speaker, under control of local configuration, 106 either: 108 A. Discards new address prefixes to or from the neighbor (while 109 maintaining the BGP connection with the neighbor) 111 B. Terminates the BGP connection with the neighbor 113 If the BGP peer uses option (b) where the limit causes a CEASE 114 Notification, then the CEASE error codes should use: 116 +---------+---------------------------------------------------------+ 117 | Subcode | Symbolic Name | 118 +---------+---------------------------------------------------------+ 119 | 1 | Maximum Number of Prefixes Reached | 120 | TBD | Threshold exceeded: Self-Destructing, Maximum Number of | 121 | | Prefixes Send | 122 +---------+---------------------------------------------------------+ 124 The speaker MAY also log this locally. 126 3. Changes to RFC4271 Section 8 128 This section updates Section 8 [RFC4271], the paragraph that starts 129 with "One reason for an AutomaticStop event is" and ends with "The 130 local system automatically disconnects the peer." is replaced with: 132 Possible reasons for an AutomaticStop event are: A BGP speaker 133 receives an UPDATE messages with a number of prefixes for a given 134 peer such that the total prefixes received exceeds the maximum 135 number of prefixes configured (either "Pre-Policy" or "Post- 136 Policy"), or announces more prefixes than through local 137 configuration allowed to. The local system automatically 138 disconnects the peer. 140 4. BGP Yang Model Considerations - PERHAPS REMOVE BEFORE PUBLICATION 142 In [I-D.ietf-idr-bgp-model] in container 'prefix-limit', a leaf named 143 "max-prefixes" exists. The authors recommend the BGP Yang Model to 144 be revised to contain the following leaves: 146 max-prefixes-inbound-pre-policy 148 max-prefixes-inbound-post-policy 150 max-prefixes-outbound 152 In addition to the above, the authors suggest that the BGP Yang Model 153 is extended in such a way that per peer per AFI/SAFI pair an operator 154 can specify whether to tear down the session or discard sending or 155 receiving updates. 157 5. Changes to RFC4271 Section 9 159 This section updates [RFC4271] by adding a subsection after 160 Section 9.4 (Originating BGP routes) to specify various events that 161 can lead up to AutomaticStop (Event 8) in the BGP FSM. 163 9.5 Maximum Prefix Limits 165 9.5.1 Pre-Policy Inbound Maximum Prefix Limits 167 The Adj-RIBs-In stores routing information learned from inbound 168 UPDATE messages that were received from another BGP speaker 169 Section 3.2 [RFC4271]. The pre-policy limit uses the number of 170 NLRIs per Address Family Identifier (AFI) per Subsequent 171 Address Family Identifier (SAFI) as input into its threshold 172 comparisons. For example, when an operator configures the pre- 173 policy limit for IPv4 Unicast to be 50 on a given EBGP session, 174 and the other BGP speaker announces its 51st IPv4 Unicast NLRI, 175 the session MUST be terminated. 177 Pre-policy limits are particularly useful to help dampen the 178 effects of full table route leaks and memory exhaustion when 179 the implementation stores rejected routes. 181 9.5.2 Post-Policy Inbound Maximum Prefix Limits 182 RFC4271 describes a Policy Information Base (PIB) that contains 183 local policies that can be applied to the information in the 184 Routing Information Base (RIB). The post-policy limit uses the 185 number of NLRIs per Address Family Identifier (AFI) per 186 Subsequent Address Family Identifier (SAFI), after application 187 of the Import Policy as input into its threshold comparisons. 188 For example, when an operator configures the post-policy limit 189 for IPv4 Unicast to be 50 on a given EBGP session, and the 190 other BGP speaker announces a hundred IPv4 Unicast routes of 191 which none are accepted as a result of the local import policy 192 (and thus not considered for the Loc-RIB by the local BGP 193 speaker), the session is not terminated. 195 Post-policy limits are useful to help prevent FIB exhaustion 196 and prevent accidental BGP session teardown due to prefixes not 197 accepted by policy anyway. 199 9.5.3 Outbound Maximum Prefix Limits 201 An operator MAY configure a BGP speaker to terminate its BGP 202 session with a neighbor when the number of address prefixes to 203 be advertised to that neighbor exceeds a locally configured 204 post-policy upper limit. The BGP speaker then MUST send the 205 neighbor a NOTIFICATION message with the Error Code Cease and 206 the Error Subcode "Threshold reached: Maximum Number of 207 Prefixes Send". Implementations MAY support additional 208 actions. The Hard Cease action is defined in [RFC8538]. 210 Reporting when thresholds have been exceeded is an 211 implementation specific consideration, but SHOULD include 212 methods such as Syslog [RFC5424]. By definition, Outbound 213 Maximum Prefix Limits are Post-Policy. 215 The Adj-RIBs-Out stores information selected by the local BGP 216 speaker for advertisement to its neighbors. The routing 217 information stored in the Adj-RIBs-Out will be carried in the 218 local BGP speaker's UPDATE messages and advertised to its 219 neighbors Section 3.2 [RFC4271]. The Outbound Maximum Prefix 220 Limit uses the number of NLRIs per Address Family Identifier 221 (AFI) per Subsequent Address Family Identifier (SAFI), after 222 application of the Export Policy, as input into its threshold 223 comparisons. For example, when an operator configures the 224 Outbound Maximum Prefix Limit for IPv4 Unicast to be 50 on a 225 given EBGP session, and were about to announce its 51st IPv4 226 Unicast NLRI to the other BGP speaker as a result of the local 227 export policy, the session MUST be terminated. 229 Outbound Maximum Prefix Limits are useful to help dampen the 230 negative effects of a misconfiguration in local policy. In 231 many cases, it would be more desirable to tear down a BGP 232 session rather than causing or propagating a route leak. 234 6. Security Considerations 236 Maximum Prefix Limits are an essential tool for routing operations 237 and SHOULD be used to increase stability. 239 7. IANA Considerations 241 This memo requests that IANA assigns a new subcode named "Threshold 242 exceeded: Self-Destructing, Maximum Number of Prefixes Send" in the 243 "Cease NOTIFICATION message subcodes" registry under the "Border 244 Gateway Protocol (BGP) Parameters" group. 246 8. Acknowledgments 248 The authors would like to thank Saku Ytti and John Heasley (NTT), 249 Jeff Haas, Colby Barth and John Scudder (Juniper Networks), Martijn 250 Schmidt (i3D.net), Teun Vink (BIT), Sabri Berisha (eBay), Martin Pels 251 (Quanza), Steven Bakker (AMS-IX), Aftab Siddiqui (ISOC), Yu Tianpeng, 252 Ruediger Volk (Deutsche Telekom), Robert Raszuk (Bloomberg), Jakob 253 Heitz (Cisco), and Susan Hares (Hickory Hill Consulting) for their 254 support, insightful review, and comments. 256 9. Implementation status - RFC EDITOR: REMOVE BEFORE PUBLICATION 258 This section records the status of known implementations of the 259 protocol defined by this specification at the time of posting of this 260 Internet-Draft, and is based on a proposal described in RFC7942. The 261 description of implementations in this section is intended to assist 262 the IETF in its decision processes in progressing drafts to RFCs. 263 Please note that the listing of any individual implementation here 264 does not imply endorsement by the IETF. Furthermore, no effort has 265 been spent to verify the information presented here that was supplied 266 by IETF contributors. This is not intended as, and must not be 267 construed to be, a catalog of available implementations or their 268 features. Readers are advised to note that other implementations may 269 exist. 271 The below table provides an overview (as of the moment of writing) of 272 which vendors have produced implementation of inbound or outbound 273 maximum prefix limits. Each table cell shows the applicable 274 configuration keywords if the vendor implemented the feature. 276 +-------------+----------------+-------------------------+----------+ 277 | Vendor | Inbound Pre- | Inbound Post-Policy | Outbound | 278 | | Policy | | | 279 +-------------+----------------+-------------------------+----------+ 280 | Cisco IOS | | maximum-prefix | | 281 | XR | | | | 282 +-------------+----------------+-------------------------+----------+ 283 | Cisco IOS | | maximum-prefix | | 284 | XE | | | | 285 +-------------+----------------+-------------------------+----------+ 286 | Juniper | prefix-limit | accepted-prefix-limit, | | 287 | Junos OS | | or prefix-limit | | 288 | | | combined with 'keep | | 289 | | | none' | | 290 +-------------+----------------+-------------------------+----------+ 291 | Nokia SR OS | prefix-limit | | | 292 +-------------+----------------+-------------------------+----------+ 293 | NIC.CZ BIRD | 'import keep | 'import limit' or | export | 294 | | filtered' | 'receive limit' | limit | 295 | | combined with | | | 296 | | 'receive | | | 297 | | limit' | | | 298 +-------------+----------------+-------------------------+----------+ 299 | OpenBSD | max-prefix | | | 300 | OpenBGPD | | | | 301 +-------------+----------------+-------------------------+----------+ 302 | Arista EOS | maximum-routes | maximum-accepted-routes | | 303 +-------------+----------------+-------------------------+----------+ 304 | Huawei | peer route- | | | 305 | VRPv5 | limit | | | 306 +-------------+----------------+-------------------------+----------+ 307 | Huawei | peer route- | peer route-limit | | 308 | VRPv8 | limit | accept-prefix | | 309 +-------------+----------------+-------------------------+----------+ 311 First presented by Snijders at [RIPE77] 313 Table 1: Maximum prefix limits capabilities per implementation 315 10. Appendix: Implementation Guidance 317 1) make it clear who does what: if A sends too many prefixes to B A 318 should see "ABC" in log B should see "DEF" in log to make it clear 319 which of the two parties does what 2) recommended by default 320 automatically restart after between 15 and 30 minutes 322 11. References 324 11.1. Normative References 326 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 327 Requirement Levels", BCP 14, RFC 2119, 328 DOI 10.17487/RFC2119, March 1997, 329 . 331 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 332 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 333 DOI 10.17487/RFC4271, January 2006, 334 . 336 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 337 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 338 May 2017, . 340 [RFC8538] Patel, K., Fernando, R., Scudder, J., and J. Haas, 341 "Notification Message Support for BGP Graceful Restart", 342 RFC 8538, DOI 10.17487/RFC8538, March 2019, 343 . 345 11.2. Informative References 347 [I-D.ietf-idr-bgp-model] 348 Jethanandani, M., Patel, K., and S. Hares, "BGP YANG Model 349 for Service Provider Networks", draft-ietf-idr-bgp- 350 model-06 (work in progress), June 2019. 352 [RFC5424] Gerhards, R., "The Syslog Protocol", RFC 5424, 353 DOI 10.17487/RFC5424, March 2009, 354 . 356 [RFC7908] Sriram, K., Montgomery, D., McPherson, D., Osterweil, E., 357 and B. Dickson, "Problem Definition and Classification of 358 BGP Route Leaks", RFC 7908, DOI 10.17487/RFC7908, June 359 2016, . 361 [RIPE77] Snijders, J., "Robust Routing Policy Architecture", May 362 2018, . 365 Authors' Addresses 366 Job Snijders 367 NTT 368 Theodorus Majofskistraat 100 369 Amsterdam 1065 SZ 370 The Netherlands 372 Email: job@ntt.net 374 Melchior Aelmans 375 Juniper Networks 376 Boeing Avenue 240 377 Schiphol-Rijk 1119 PZ 378 The Netherlands 380 Email: maelmans@juniper.net