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