idnits 2.17.1 draft-ietf-idr-bgp-open-policy-12.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 lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Of course, any BGP speaker may apply policy to reduce what is announced, and a recipient may apply policy to reduce the set of routes they accept. Violation of the above rules may result in route leaks and MUST not be allowed. Automatic enforcement of these rules should significantly reduce route leaks that may otherwise occur due to manual configuration mistakes. While enforcing the above rules will address most BGP peering scenarios, their configuration is not part of BGP itself; therefore, configuration of ingress and egress prefix filters is still strongly advised. -- The document date (July 3, 2020) is 1365 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 (-10) exists of draft-ietf-grow-route-leak-detection-mitigation-02 -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Azimov 3 Internet-Draft Qrator Labs & Yandex 4 Intended status: Standards Track E. Bogomazov 5 Expires: January 4, 2021 Qrator Labs 6 R. Bush 7 Internet Initiative Japan & Arrcus, Inc. 8 K. Patel 9 Arrcus 10 K. Sriram 11 USA NIST 12 July 3, 2020 14 Route Leak Prevention using Roles in Update and Open messages 15 draft-ietf-idr-bgp-open-policy-12 17 Abstract 19 Route leaks are the propagation of BGP prefixes which violate 20 assumptions of BGP topology relationships; e.g. passing a route 21 learned from one lateral peer to another lateral peer or a transit 22 provider, passing a route learned from one transit provider to 23 another transit provider or a lateral peer. Existing approaches to 24 leak prevention rely on marking routes by operator configuration, 25 with no check that the configuration corresponds to that of the eBGP 26 neighbor, or enforcement that the two eBGP speakers agree on the 27 relationship. This document enhances BGP OPEN to establish agreement 28 of the (peer, customer, provider, Route Server, Route Server client) 29 relationship of two neighboring eBGP speakers to enforce appropriate 30 configuration on both sides. Propagated routes are then marked with 31 an Only to Customer (OTC) attribute according to the agreed 32 relationship, allowing both prevention and detection of route leaks. 34 Requirements Language 36 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 37 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 38 "OPTIONAL" in this document are to be interpreted as described in 39 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 40 capitals, as shown here. 42 Status of This Memo 44 This Internet-Draft is submitted in full conformance with the 45 provisions of BCP 78 and BCP 79. 47 Internet-Drafts are working documents of the Internet Engineering 48 Task Force (IETF). Note that other groups may also distribute 49 working documents as Internet-Drafts. The list of current Internet- 50 Drafts is at https://datatracker.ietf.org/drafts/current/. 52 Internet-Drafts are draft documents valid for a maximum of six months 53 and may be updated, replaced, or obsoleted by other documents at any 54 time. It is inappropriate to use Internet-Drafts as reference 55 material or to cite them other than as "work in progress." 57 This Internet-Draft will expire on January 4, 2021. 59 Copyright Notice 61 Copyright (c) 2020 IETF Trust and the persons identified as the 62 document authors. All rights reserved. 64 This document is subject to BCP 78 and the IETF Trust's Legal 65 Provisions Relating to IETF Documents 66 (https://trustee.ietf.org/license-info) in effect on the date of 67 publication of this document. Please review these documents 68 carefully, as they describe your rights and restrictions with respect 69 to this document. Code Components extracted from this document must 70 include Simplified BSD License text as described in Section 4.e of 71 the Trust Legal Provisions and are provided without warranty as 72 described in the Simplified BSD License. 74 Table of Contents 76 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 77 2. Peering Relationships . . . . . . . . . . . . . . . . . . . . 3 78 3. BGP Role . . . . . . . . . . . . . . . . . . . . . . . . . . 4 79 4. BGP Role Capability . . . . . . . . . . . . . . . . . . . . . 5 80 5. Role correctness . . . . . . . . . . . . . . . . . . . . . . 5 81 5.1. Strict mode . . . . . . . . . . . . . . . . . . . . . . . 6 82 6. BGP Only to Customer (OTC) Attribute . . . . . . . . . . . . 6 83 7. Enforcement . . . . . . . . . . . . . . . . . . . . . . . . . 7 84 8. Additional Considerations . . . . . . . . . . . . . . . . . . 7 85 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 86 10. Security Considerations . . . . . . . . . . . . . . . . . . . 8 87 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 88 11.1. Normative References . . . . . . . . . . . . . . . . . . 9 89 11.2. Informative References . . . . . . . . . . . . . . . . . 9 90 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 10 91 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 10 92 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 94 1. Introduction 96 A BGP route leak occurs when a route is learned from a transit 97 provider or lateral peer and then announced to another provider or 98 lateral peer. See [RFC7908]. These are usually the result of 99 misconfigured or absent BGP route filtering or lack of coordination 100 between two eBGP speakers. 102 The mechanism proposed in 103 [I-D.ietf-grow-route-leak-detection-mitigation] uses large- 104 communities to perform detection and mitigation of route leaks. 105 While signaling using communities is easy to implement and deploy 106 quickly, it normally relies on operator-maintained policy 107 configuration, which is vulnerable to misconfiguration [Streibelt]. 108 The community signal can also be stripped at the ISP boundaries. 110 This document provides configuration automation using 'BGP roles', 111 which are negotiated using a new BGP Capability Code in OPEN message 112 (see Section 4 in [RFC5492]). Either or both BGP speakers MAY be 113 configured to require that this capability be agreed for the BGP OPEN 114 to succeed. 116 A new optional, transitive BGP Path Attribute Only to Customer (OTC) 117 is specified that SHOULD be automatically configured using BGP roles. 118 This attribute prevents networks from creating leaks, and detects 119 leaks created by third parties. 121 In the rest of this document, we use the term "peer" to refer to 122 "lateral peer" for simplicity. 124 2. Peering Relationships 126 Despite the use of terms such as "customer", "peer", etc. in this 127 document, these are not necessarily business relationships based on 128 payment agreements. These terms are used to represent restrictions 129 on BGP route propagation, sometimes known as the Gao-Rexford model 130 [Gao]. The following is a list of various roles in eBGP peering and 131 the corresponding rules for route propagation: 133 Provider: MAY send to a customer all available prefixes. 135 Customer: MAY send to a provider prefixes which the sender 136 originates and prefixes learned from any of their customers. A 137 customer MUST NOT send to a provider prefixes learned from its 138 peers, from other providers, or from Route Servers. 140 Route Server (RS): MAY send to an Route Server client (RS-client) 141 all available prefixes. 143 RS-client: MAY send to an RS prefixes which the sender originates 144 and prefixes learned from its customers. An RS-client MUST NOT 145 send to an RS prefixes learned from its peers or providers, or 146 from another RS. 148 Peer: MAY send to a peer prefixes which the sender originates and 149 prefixes learned from its customers. A peer MUST NOT send to a 150 peer prefixes learned from other peers, from its providers, or 151 from RS(s). 153 Of course, any BGP speaker may apply policy to reduce what is 154 announced, and a recipient may apply policy to reduce the set of 155 routes they accept. Violation of the above rules may result in route 156 leaks and MUST not be allowed. Automatic enforcement of these rules 157 should significantly reduce route leaks that may otherwise occur due 158 to manual configuration mistakes. While enforcing the above rules 159 will address most BGP peering scenarios, their configuration is not 160 part of BGP itself; therefore, configuration of ingress and egress 161 prefix filters is still strongly advised. 163 3. BGP Role 165 BGP Role is a new configuration option that can be configured on any 166 BGP session. BGP Roles reflect the agreement between two BGP 167 speakers about their relationship. One of the Roles described below 168 SHOULD be configured on each eBGP session between ISPs that carry 169 IPv4 and(or) IPv6 unicast prefixes. 171 Allowed Role values for eBGP sessions between ISPs are: 173 o Provider - sender is a transit provider to neighbor; 175 o Customer - sender is a transit customer of neighbor; 177 o RS - sender is a Route Server, usually at an Internet exchange 178 point (IX); 180 o RS-client - sender is client of an RS; 182 o Peer - sender and neighbor are peers. 184 Since BGP Role reflects the relationship between two BGP speakers, it 185 could also be used for other purposes besides route leak mitigation. 187 4. BGP Role Capability 189 The TLV (type, length, value) of the BGP Role capability are: 191 o Type - ; 193 o Length - 1 (byte); 195 o Value - integer corresponding to speaker's BGP Role (see Table 1). 197 +-------+---------------------+ 198 | Value | Role name | 199 +-------+---------------------+ 200 | 0 | Sender is Provider | 201 | 1 | Sender is RS | 202 | 2 | Sender is RS-client | 203 | 3 | Sender is Customer | 204 | 4 | Sender is Peer | 205 +-------+---------------------+ 207 Table 1: Predefined BGP Role Values 209 5. Role correctness 211 Section 3 described how BGP Role encodes the relationship between two 212 eBGP speakers. But the mere presence of BGP Role doesn't 213 automatically guarantee role agreement between two BGP peers. 215 To enforce correctness, the BGP Role check is applied with a set of 216 constraints on how speakers' BGP Roles MUST correspond. Of course, 217 each speaker MUST announce and accept the BGP Role capability in the 218 BGP OPEN message exchange. 220 If a speaker receives a BGP Role capability, it MUST check the value 221 of the received capability (i.e., the sender's role) with its own BGP 222 Role. The allowed pairings are as follows: 224 +---------------+-----------------+ 225 | Sender's Role | Receiver's Role | 226 +---------------+-----------------+ 227 | Provider | Customer | 228 | Customer | Provider | 229 | RS | RS-client | 230 | RS-client | RS | 231 | Peer | Peer | 232 +---------------+-----------------+ 234 Table 2: Allowed Pairs of Role Capabilities 236 If the role of the receiving speaker for the eBGP session in 237 consideration is included in Table 1 and the observed Role pair is 238 not in the above table, then the receiving speaker MUST reject the 239 eBGP connection, send a Role Mismatch Notification (code 2, subcode 240 ), and also send a Connection Rejected Notification [RFC4486] 241 (Notification with error code 6, subcode 5). 243 5.1. Strict mode 245 A new BGP configuration option "strict mode" is defined with values 246 of true or false. If set to true, then the speaker MUST refuse to 247 establish a BGP session with a neighbor which does not announce the 248 BGP Role capability in the OPEN message. If a speaker rejects a 249 connection, it MUST send a send a Role Mismatch Notification (code 2, 250 subcode ), and also send a Connection Rejected Notification 251 [RFC4486] (Notification with error code 6, subcode 5). By default, 252 strict mode SHOULD be set to false for backward compatibility with 253 BGP speakers that do not yet support this mechanism. 255 6. BGP Only to Customer (OTC) Attribute 257 Newly defined here, the Only to Customer (OTC) is an optional, 4 258 bytes long, transitive BGP Path attribute with the Type Code . 259 The purpose of this attribute is to guarantee that once a route is 260 sent to customer, peer, or RS-client, it will subsequently go only to 261 customers. The value of OTC is an AS number determined by policy as 262 described below. The semantics and usage of the OTC attribute are 263 made clear by the ingress and egress policies described below. 265 The following ingress policy applies to the OTC attribute: 267 1. If a route with OTC attribute is received from a Customer or RS- 268 client, then it is a route leak and MUST be rejected. 270 2. If a route with OTC attribute is received from a Peer and its 271 value is not equal to the sending neighbor's Autonomous System 272 (AS) number, then it is a route leak and MUST be rejected. 274 3. If a route is received from a Provider, Peer, or RS and the OTC 275 attribute is not present, then it MUST be added with value equal 276 to the sending neighbor's AS number. 278 The egress policy MUST be: 280 1. A route with the OTC attribute set MUST NOT be sent to Providers, 281 Peers, or RS(s). 283 2. If route is sent to a Customer or Peer, or an RS-client (when the 284 sender is an RS) and the OTC attribute is not present, then it 285 MUST be added with value equal to AS number of the sender. 287 Once the OTC attribute has been set, it MUST be preserved unchanged. 289 7. Enforcement 291 Having the relationship unequivocally agreed between the two peers in 292 BGP OPEN is critical; BGP implementations MUST enforce the 293 relationship/role establishment rules (see Section 5) in order to 294 ameliorate operator policy configuration errors (if any). 296 Similarly, the application of that relationship on prefix propagation 297 using OTC MUST be enforced by the BGP implementations, and not 298 exposed to user misconfiguration. 300 As opposed to communities, BGP attributes may not be generally 301 modified or stripped by the operator; BGP router implementations 302 enforce such treatment. This is the desired property for the OTC 303 marking. Hence, this document specifies OTC as an attribute. 305 8. Additional Considerations 307 There are peering relationships that are 'complex', i.e., both 308 parties are intentionally sending prefixes received from each other 309 to their non-transit peers and/or transit providers. If multiple BGP 310 peerings can segregate the 'complex' parts of the relationship, the 311 complex peering roles can be segregated into different normal BGP 312 sessions, and BGP Roles MUST be used on each of the resulting normal 313 (non-complex) BGP sessions. 315 No Roles SHOULD be configured on a 'complex' BGP session (assuming it 316 is not segregated) and in that case, OTC MUST be set by configuration 317 on a per-prefix basis. However, there are no built-in measures to 318 check correctness of OTC use if BGP Role is not configured. 320 The incorrect setting of BGP Roles and/or OTC attributes may affect 321 prefix propagation. Further, this document doesn't specify any 322 special handling of incorrect/private ASNs in OTC attribute; such 323 errors should not happen with proper configuration. 325 As the BGP Role reflects the peering relationship between neighbors, 326 it might have other uses beyond the route leak solution discussed so 327 far. For example, BGP Role might affect route priority, or be used 328 to distinguish borders of a network if a network consists of multiple 329 ASs. Though such uses may be worthwhile, they are not the goal of 330 this document. Note that such uses would require local policy 331 control. 333 The use of BGP Roles are specified for unicast IPv4 and IPv6 address 334 families. While BGP roles can be configured on other address 335 families its applicability for these cases is out of scope of this 336 document. 338 As BGP role configuration results in automatic creation of inbound/ 339 outbound filters, existence of roles should be treated as existence 340 of Import and Export policy [RFC8212]. 342 9. IANA Considerations 344 This document defines a new Capability Codes option [to be removed 345 upon publication: https://www.iana.org/assignments/capability-codes/ 346 capability-codes.xhtml ] [RFC5492], named "BGP Role" with an assigned 347 value . The length of this capability is 1. 349 The BGP Role capability includes a Value field, for which IANA is 350 requested to create and maintain a new sub-registry called "BGP Role 351 Value". Assignments consist of Value and corresponding Role name. 352 Initially this registry is to be populated with the data in Table 1. 353 Future assignments may be made by a standard action procedure 354 [RFC5226]. The allocation policy for new entries up to and including 355 value 127 is "Expert Review" [RFC5226]. The allocation policy for 356 values 128 through 251 is "First Come First Served". The values from 357 252 through 255 are for "Experimental Use". 359 This document defines a new subcode, "Role Mismatch" with an assigned 360 value in the OPEN Message Error subcodes registry [to be 361 removed upon publication: http://www.iana.org/assignments/bgp- 362 parameters/bgp-parameters.xhtml#bgp-parameters-6] [RFC4271]. 364 This document defines a new optional, transitive BGP Path Attributes 365 option, named "Only to Customer (OTC)" with an assigned value 366 [To be removed upon publication: http://www.iana.org/assignments/bgp- 367 parameters/bgp-parameters.xhtml#bgp-parameters-2] [RFC4271]. The 368 length of this attribute is four bytes. 370 10. Security Considerations 372 This document proposes a mechanism for prevention of route leaks that 373 are the result of BGP policy misconfiguration. 375 A misconfiguration in OTC setup may affect prefix propagation. But 376 the automation that is provided by BGP roles should make such 377 misconfiguration unlikely. 379 11. References 381 11.1. Normative References 383 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 384 Requirement Levels", BCP 14, RFC 2119, 385 DOI 10.17487/RFC2119, March 1997, 386 . 388 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 389 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 390 DOI 10.17487/RFC4271, January 2006, 391 . 393 [RFC4486] Chen, E. and V. Gillet, "Subcodes for BGP Cease 394 Notification Message", RFC 4486, DOI 10.17487/RFC4486, 395 April 2006, . 397 [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement 398 with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 399 2009, . 401 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 402 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 403 May 2017, . 405 11.2. Informative References 407 [Gao] Gao, L. and J. Rexford, "Stable Internet routing without 408 global coordination", IEEE/ACM Transactions on 409 Networking, Volume 9, Issue 6, pp 689-692, DOI 410 10.1109/90.974523, December 2001, 411 . 413 [I-D.ietf-grow-route-leak-detection-mitigation] 414 Sriram, K. and A. Azimov, "Methods for Detection and 415 Mitigation of BGP Route Leaks", draft-ietf-grow-route- 416 leak-detection-mitigation-02 (work in progress), January 417 2020. 419 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 420 IANA Considerations Section in RFCs", RFC 5226, 421 DOI 10.17487/RFC5226, May 2008, 422 . 424 [RFC7908] Sriram, K., Montgomery, D., McPherson, D., Osterweil, E., 425 and B. Dickson, "Problem Definition and Classification of 426 BGP Route Leaks", RFC 7908, DOI 10.17487/RFC7908, June 427 2016, . 429 [RFC8212] Mauch, J., Snijders, J., and G. Hankins, "Default External 430 BGP (EBGP) Route Propagation Behavior without Policies", 431 RFC 8212, DOI 10.17487/RFC8212, July 2017, 432 . 434 [Streibelt] 435 Streibelt, F., Lichtblau, F., Beverly, R., Feldmann, A., 436 Cristel, C., Smaragdakis, G., and R. Bush, "BGP 437 Communities: Even more Worms in the Routing Can", 438 . 441 Acknowledgements 443 The authors wish to thank Andrei Robachevsky, Daniel Ginsburg, Jeff 444 Haas, Ruediger Volk, Pavel Lunin, Gyan Mishra, Ignas Bagdonas, Sue 445 Hares, and John Scudder for comments, suggestions, and critique. 447 Contributors 449 Brian Dickson 450 Independent 451 Email: brian.peter.dickson@gmail.com 453 Doug Montgomery 454 USA National Institute of Standards and Technology 455 Email: dougm@nist.gov 457 Authors' Addresses 459 Alexander Azimov 460 Qrator Labs & Yandex 461 Ulitsa Lva Tolstogo 16 462 Moscow 119021 463 Russian Federation 465 Email: a.e.azimov@gmail.com 466 Eugene Bogomazov 467 Qrator Labs 468 1-y Magistralnyy tupik 5A 469 Moscow 123290 470 Russian Federation 472 Email: eb@qrator.net 474 Randy Bush 475 Internet Initiative Japan & Arrcus, Inc. 476 5147 Crystal Springs 477 Bainbridge Island, Washington 98110 478 United States of America 480 Email: randy@psg.com 482 Keyur Patel 483 Arrcus 484 2077 Gateway Place, Suite #400 485 San Jose, CA 95119 486 US 488 Email: keyur@arrcus.com 490 Kotikalapudi Sriram 491 USA National Institute of Standards and Technology 492 100 Bureau Drive 493 Gaithersburg, MD 20899 494 United States of America 496 Email: ksriram@nist.gov