idnits 2.17.1 draft-ietf-idr-bgp-open-policy-09.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 (April 19, 2020) is 1461 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: October 21, 2020 R. Bush 6 Internet Initiative Japan & Arrcus 7 K. Patel 8 Arrcus, Inc. 9 K. Sriram 10 US NIST 11 April 19, 2020 13 Route Leak Prevention using Roles in Update and Open messages 14 draft-ietf-idr-bgp-open-policy-09 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 peer to another peer or to a transit provider, 21 passing a route learned from one transit provider to another transit 22 provider or to a peer. Today, approaches to leak prevention rely on 23 marking routes by operator configuration, with no check that the 24 configuration corresponds to that of the BGP neighbor, or enforcement 25 that the two BGP speakers agree on the relationship. This document 26 enhances BGP OPEN to establish agreement of the (peer, customer, 27 provider, Route Server, Route Server client) relationship of two 28 neighboring BGP speakers to enforce appropriate configuration on both 29 sides. Propagated routes are then marked with an OTC attribute 30 according to the agreed relationship, allowing both prevention and 31 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 October 21, 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 . . . . . . . . . . . . . . . . . . . . . 7 85 10. Security Considerations . . . . . . . . . . . . . . . . . . . 8 86 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8 87 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 88 12.1. Normative References . . . . . . . . . . . . . . . . . . 8 89 12.2. Informative References . . . . . . . . . . . . . . . . . 9 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 92 1. Introduction 94 A BGP route leak occurs when a route is learned from a transit 95 provider or peer and then announced to another provider or peer. See 96 [RFC7908]. These are usually the result of misconfigured or absent 97 BGP route filtering or lack of coordination between two BGP speakers. 99 The mechanism proposed in 100 [I-D.ietf-grow-route-leak-detection-mitigation] uses large- 101 communities to perform detection and mitigation of route leaks. 102 While signaling using communities is easy to implement and deploy 103 quickly, it normally relies on operator-maintained policy 104 configuration, which is often vulnerable to misconfiguration and even 105 attack [Streibelt]. There is also the vulnerability that the 106 community signal may be stripped, accidentally or maliciously. 108 This document provides configuration automation using 'BGP roles', 109 which are negotiated using a new BGP Capability Code in OPEN message 110 (see Section 4 in [RFC5492]). Either or both BGP speakers MAY be 111 configured to require that this capability be agreed for the BGP OPEN 112 to succeed. 114 A new BGP Path Attribute is specified that SHOULD be automatically 115 configured using BGP roles. This attribute prevents networks from 116 creating leaks, and detects leaks created by third parties. 118 2. Peering Relationships 120 Despite the use of terms such as "customer", "peer", etc. in this 121 document, these are not necessarily business relationships based on 122 payment agreements. These terms are used to represent restrictions 123 on BGP route propagation, sometimes known as the Gao-Rexford model 124 [Gao]. The following is a list of various roles in BGP peering and 125 the corresponding rules for route propagation: 127 Provider: MAY send to a customer all available prefixes. 129 Customer: MAY send to a provider their own prefixes and prefixes 130 learned from any of their customers. A customer MUST NOT send to 131 a provider prefixes learned from its peers, from other providers, 132 or from Route Servers. 134 Route Server (RS): MAY send to an Route Server client (RS-client) 135 all available prefixes. 137 RS-client: MAY send to an RS its own prefixes and prefixes learned 138 from its customers. An RS-client MUST NOT send to an RS prefixes 139 learned from its peers or providers, or from another RS. 141 Peer: MAY send to a peer its own prefixes and prefixes learned from 142 its customers. A peer MUST NOT send to a peer prefixes learned 143 from other peers, from its providers, or from RS(s). 145 Of course, any BGP speaker may apply policy to reduce what is 146 announced, and a recipient may apply policy to reduce the set of 147 routes they accept. Violation of the above rules may result in route 148 leaks and MUST not be allowed. Automatic enforcement of these rules 149 should significantly reduce route leaks that may otherwise occur due 150 to manual configuration mistakes. While enforcing the above rules 151 will address most BGP peering scenarios, their configuration is not 152 part of BGP itself; therefore, configuration of ingress and egress 153 prefix filters is still strongly advised. 155 3. BGP Role 157 BGP Role is new configuration option that SHOULD be configured on 158 each BGP session. It reflects the real-world agreement between two 159 BGP speakers about their relationship. 161 Allowed Role values for eBGP sessions are: 163 o Provider - sender is a transit provider to neighbor; 165 o Customer - sender is a transit customer of neighbor; 167 o RS - sender is a Route Server, usually at an Internet exchange 168 point (IX); 170 o RS-client - sender is client of an RS; 172 o Peer - sender and neighbor are peers. 174 Since BGP Role reflects the relationship between two BGP speakers, it 175 could also be used for other purposes besides route leak mitigation. 177 4. BGP Role Capability 179 The TLV (type, length, value) of the BGP Role capability are: 181 o Type - ; 183 o Length - 1 (octet); 185 o Value - integer corresponding to speaker's BGP Role. 187 +-------+---------------------+ 188 | Value | Role name | 189 +-------+---------------------+ 190 | 0 | Sender is Provider | 191 | 1 | Sender is RS | 192 | 2 | Sender is RS-client | 193 | 3 | Sender is Customer | 194 | 4 | Sender is Peer | 195 +-------+---------------------+ 197 Table 1: Predefined BGP Role Values 199 5. Role correctness 201 Section 3 described how BGP Role encodes the relationship between two 202 BGP speakers. But the mere presence of BGP Role doesn't 203 automatically guarantee role agreement between two BGP peers. 205 To enforce correctness, the BGP Role check is applied with a set of 206 constraints on how speakers' BGP Roles MUST correspond. Of course, 207 each speaker MUST announce and accept the BGP Role capability in the 208 BGP OPEN message exchange. 210 If a speaker receives a BGP Role capability, it MUST check the value 211 of the received capability (i.e., the sender's role) with its own BGP 212 Role. The allowed pairings are as follow: 214 +---------------+-----------------+ 215 | Sender's Role | Receiver's Role | 216 +---------------+-----------------+ 217 | Provider | Customer | 218 | Customer | Provider | 219 | RS | RS-client | 220 | RS-client | RS | 221 | Peer | Peer | 222 +---------------+-----------------+ 224 Table 2: Allowed Pairs of Role Capabilities 226 If the observed Role pair is not in the above table, then the 227 receiving speaker MUST reject the BGP connection, send a Role 228 Mismatch Notification (code 2, subcode ), and also send a 229 Connection Rejected Notification [RFC4486] (Notification with error 230 code 6, subcode 5). 232 5.1. Strict mode 234 A new BGP configuration option "strict mode" is defined with values 235 of true or false. If set to true, then the speaker MUST refuse to 236 establish a BGP session with a neighbor which does not announce the 237 BGP Role capability in the OPEN message. If a speaker rejects a 238 connection, it MUST send a Connection Rejected Notification [RFC4486] 239 (Notification with error code 6, subcode 5). By default, strict mode 240 SHOULD be set to false for backward compatibility with BGP speakers 241 that do not yet support this mechanism. 243 6. BGP Only to Customer (OTC) Attribute 245 Newly defined here, the Only to Customer (OTC) is an optional, 4 246 bytes long, transitive BGP Path attribute with the Type Code . 247 The purpose of this attribute is to guarantee that once route is sent 248 to customer, peer, or RS-client, it will subsequently go only to 249 customers. The value of OTC is an AS number determined by policy as 250 described below. The semantics and usage of the OTC attribute are 251 made clear by the ingress and egress policies described below. 253 The following ingress policy applies to the OTC attribute: 255 1. If a route with OTC attribute is received from a Customer or RS- 256 client, then it is a route leak and MUST be rejected. 258 2. If a route with OTC attribute is received from a Peer and its 259 value is not equal to the sending neighbor's Autonomous System 260 (AS) number, then it is a route leak and MUST be rejected. 262 3. If a route is received from a Provider, Peer, or RS and the OTC 263 attribute is not present, then it MUST be added with value equal 264 to the sending neighbor's AS number. 266 The egress policy MUST be: 268 1. A route with the OTC attribute set MUST NOT be sent to Providers, 269 Peers, or RS(s). 271 2. If route is sent to a Customer or Peer, or an RS-client (when the 272 sender is an RS) and the OTC attribute is not present, then it 273 MUST be added with value equal to AS number of the sender. 275 Once the OTC attribute has been set, it MUST be preserved unchanged. 277 7. Enforcement 279 Having the relationship unequivocally agreed between the two peers in 280 BGP OPEN is critical; BGP implementations MUST enforce the 281 relationship/role establishment rules (see Section 5) in order to 282 ameliorate operator policy configuration errors (if any). 284 Similarly, the application of that relationship on prefix propagation 285 using OTC MUST BE enforced by the BGP implementations, and not 286 exposed to user misconfiguration. 288 As opposed to communities, BGP attributes may not be generally 289 modified or filtered by the operator; BGP router implementations 290 enforce such treatment. This is the desired property for the OTC 291 marking. Hence, this document specifies OTC as an attribute. 293 8. Additional Considerations 295 There are peering relationships that are 'complex', i.e., both 296 parties are intentionally sending prefixes received from each other 297 to their non-transit peers and/or transit providers. If multiple BGP 298 peerings can segregate the 'complex' parts of the relationship, the 299 complex peering roles can be segregated into different normal BGP 300 sessions, and BGP Roles MUST be used on each of the resulting normal 301 (non-complex) BGP sessions. 303 No Roles SHOULD be configured on a 'complex' BGP session (assuming it 304 is not segregated) and in that case, OTC MUST be set by configuration 305 on a per-prefix basis. However, there are no built-in measures to 306 check correctness of OTC use if BGP Role is not configured. 308 As the BGP Role reflects the peering relationship between neighbors, 309 it might have other uses beyond the route leak solution discussed so 310 far. For example, BGP Role might affect route priority, or be used 311 to distinguish borders of a network if a network consists of multiple 312 ASs. Though such uses may be worthwhile, they are not the goal of 313 this document. Note that such uses would require local policy 314 control. 316 As BGP role configuration results in automatic creation of inbound/ 317 outbound filters, existence of roles should be treated as existence 318 of Import and Export policy [RFC8212]. 320 9. IANA Considerations 322 This document defines a new Capability Codes option [to be removed 323 upon publication: https://www.iana.org/assignments/capability-codes/ 324 capability-codes.xhtml ] [RFC5492], named "BGP Role" with an assigned 325 value . The length of this capability is 1. 327 The BGP Role capability includes a Value field, for which IANA is 328 requested to create and maintain a new sub-registry called "BGP Role 329 Value". Assignments consist of Value and corresponding Role name. 330 Initially this registry is to be populated with the data in Table 1. 331 Future assignments may be made by a standard action procedure 332 [RFC5226]. 334 This document defines a new subcode, "Role Mismatch" with an assigned 335 value in the OPEN Message Error subcodes registry [to be 336 removed upon publication: http://www.iana.org/assignments/bgp- 337 parameters/bgp-parameters.xhtml#bgp-parameters-6] [RFC4271]. 339 This document defines a new optional, transitive BGP Path Attributes 340 option, named "Only to Customer (OTC)" with an assigned value 341 [To be removed upon publication: http://www.iana.org/assignments/bgp- 342 parameters/bgp-parameters.xhtml#bgp-parameters-2] [RFC4271]. The 343 length of this attribute is four bytes. 345 10. Security Considerations 347 This document proposes a mechanism for prevention of route leaks that 348 are the result of BGP policy misconfiguration. 350 A misconfiguration in OTC setup may affect prefix propagation. But 351 the automation that is provided by BGP roles should make such 352 misconfiguration unlikely. 354 11. Acknowledgments 356 The authors wish to thank Douglas Montgomery, Brian Dickson, Andrei 357 Robachevsky, and Daniel Ginsburg for their contributions to a variant 358 of this work. 360 12. References 362 12.1. Normative References 364 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 365 Requirement Levels", BCP 14, RFC 2119, 366 DOI 10.17487/RFC2119, March 1997, 367 . 369 [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A 370 Border Gateway Protocol 4 (BGP-4)", RFC 4271, 371 DOI 10.17487/RFC4271, January 2006, 372 . 374 [RFC4486] Chen, E. and V. Gillet, "Subcodes for BGP Cease 375 Notification Message", RFC 4486, DOI 10.17487/RFC4486, 376 April 2006, . 378 [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement 379 with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 380 2009, . 382 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 383 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 384 May 2017, . 386 12.2. Informative References 388 [Gao] Gao, L. and J. Rexford, "Stable Internet routing without 389 global coordination", IEEE/ACM Transactions on 390 Networking, Volume 9, Issue 6, pp 689-692, DOI 391 10.1109/90.974523, December 2001, 392 . 394 [I-D.ietf-grow-route-leak-detection-mitigation] 395 Sriram, K. and A. Azimov, "Methods for Detection and 396 Mitigation of BGP Route Leaks", draft-ietf-grow-route- 397 leak-detection-mitigation-01 (work in progress), July 398 2019. 400 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 401 IANA Considerations Section in RFCs", RFC 5226, 402 DOI 10.17487/RFC5226, May 2008, 403 . 405 [RFC7908] Sriram, K., Montgomery, D., McPherson, D., Osterweil, E., 406 and B. Dickson, "Problem Definition and Classification of 407 BGP Route Leaks", RFC 7908, DOI 10.17487/RFC7908, June 408 2016, . 410 [RFC8212] Mauch, J., Snijders, J., and G. Hankins, "Default External 411 BGP (EBGP) Route Propagation Behavior without Policies", 412 RFC 8212, DOI 10.17487/RFC8212, July 2017, 413 . 415 [Streibelt] 416 Streibelt, F., Lichtblau, F., Beverly, R., Feldmann, A., 417 Cristel, C., Smaragdakis, G., and R. Bush, "BGP 418 Communities: Even more Worms in the Routing Can", 419 . 422 Authors' Addresses 424 Alexander Azimov 425 Qrator Labs 427 Email: a.e.azimov@gmail.com 429 Eugene Bogomazov 430 Qrator Labs 432 Email: eb@qrator.net 434 Randy Bush 435 Internet Initiative Japan & Arrcus 437 Email: randy@psg.com 439 Keyur Patel 440 Arrcus, Inc. 442 Email: keyur@arrcus.com 444 Kotikalapudi Sriram 445 US NIST 447 Email: ksriram@nist.gov