idnits 2.17.1 draft-ietf-idr-bgp-open-policy-07.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, additionally requiring configuration of ingress and egress prefix filters is still strongly advised. -- The document date (January 9, 2020) is 1568 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: July 12, 2020 R. Bush 6 Internet Initiative Japan & Arrcus 7 K. Patel 8 Arrcus, Inc. 9 K. Sriram 10 US NIST 11 January 9, 2020 13 Route Leak Prevention using Roles in Update and Open messages 14 draft-ietf-idr-bgp-open-policy-07 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 July 12, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 6 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 . . . . . . . . . . . . . . . . . . . . . . . 9 92 1. Introduction 94 BGP route leak occurs when a route is learned from a transit provider 95 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. There 105 is also the vulnerability that the community signal may be stripped, 106 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 RS Client all available prefixes. 136 Route Server Client (RS-client): MAY send to an RS its own prefixes 137 and prefixes learned from its customers. An RS-client MUST NOT 138 send to an RS prefixes learned from its peers or providers, or 139 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, additionally requiring configuration 153 of ingress and egress 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 with its own BGP Role (if it is set). The 212 allowed pairings are (first a sender's Role, second the receiver's 213 Role): 215 +-------------+---------------+ 216 | Sender Role | Receiver Role | 217 +-------------+---------------+ 218 | Provider | Customer | 219 | Customer | Provider | 220 | RS | RS-Client | 221 | RS-Client | RS | 222 | Peer | Peer | 223 +-------------+---------------+ 225 Table 2: Allowed Role Capabilities 227 If the observed Role pair is not in the above table, then the 228 receiving speaker MUST send a Role Mismatch Notification (code 2, 229 subcode ). 231 5.1. Strict mode 233 A new BGP configuration option "strict mode" is defined with values 234 of true or false. If set to true, then the speaker MUST refuse to 235 establish a BGP session with a neighbor which does not announce the 236 BGP Role capability in the OPEN message. If a speaker rejects a 237 connection, it MUST send a Connection Rejected Notification [RFC4486] 238 (Notification with error code 6, subcode 5). By default, strict mode 239 SHOULD be set to false for backward compatibility with BGP speakers 240 that do not yet support this mechanism. 242 6. BGP Only to Customer (OTC) Attribute 244 Newly defined here, the Only to Customer (OTC) is an optional, 245 transitive BGP Path attribute with the Type Code . The OTC 246 attribute is four bytes long and its value equals an AS number. The 247 semantics and usage of the OTC attribute are made clear by the 248 ingress and egress policies described below. 250 The following ingress policy applies to the OTC attribute: 252 1. If a route with OTC attribute is received from a Customer or RS- 253 client, then it is a route leak and MUST be rejected. 255 2. If a route with OTC attribute is received from a Peer and its 256 value is not equal to the neighbor's ASN, then it is a route leak 257 and MUST be rejected. 259 3. If a route is received from a Provider, Peer or RS and the OTC 260 attribute is not present, then it MUST be added with value equal 261 to the neighbor's AS number. 263 The egress policy MUST be: 265 1. A route with the OTC attribute set MUST NOT be sent to providers, 266 peers, or RS(s). 268 2. If route is sent to a customer or peer, or an RS clien and the 269 OTC attribute is not present, then it MUST be added with value 270 equal to AS number of the sender. 272 Once the OTC attribute has been set, it MUST be preserved unchanged. 274 7. Enforcement 276 Having the relationship unequivocally agreed between the two peers in 277 BGP OPEN is critical; BGP implementations MUST enforce the 278 relationship/role establishment rules (see Section 5) in order to 279 overcome operator policy configuration errors (if any). 281 Similarly, the application of that relationship on prefix propagation 282 using OTC MUST BE enforced by the BGP implementations, and not 283 exposed to user mis-configuration. 285 As opposed to communities, BGP attributes may not be generally 286 modified or filtered by the operator; BGP router implementations 287 enforce such treatment. This is the desired property for the OTC 288 marking. Hence, this document specifies OTC as an attribute. 290 8. Additional Considerations 292 There are peering relationships that are 'complex', i.e., both 293 parties are intentionally sending prefixes received from each other 294 to their non-transit peers and/or transit providers. If multiple BGP 295 peerings can segregate the 'complex' parts of the relationship, the 296 complex peering roles can be segregated into different normal BGP 297 sessions, and BGP Roles MUST be used on each of the resulting normal 298 (non-complex) BGP sessions. 300 No Roles SHOULD be configured on a 'complex' BGP session (assuming it 301 is not segregated) and in that case, OTC MUST be set by configuration 302 on a per-prefix basis. However, there can be no measures to check 303 correctness of OTC use if BGP Role is not configured. 305 As the BGP Role reflects the peering relationship between neighbors, 306 it might have other uses beyond the route leaks solution discussed so 307 far. For example, BGP Role might affect route priority, or be used 308 to distinguish borders of a network if a network consists of multiple 309 ASs. Though such uses may be worthwhile, they are not the goal of 310 this document. Note that such uses would require local policy 311 control. 313 As BGP role configuration results in automatic creation of inbound/ 314 outbound filters, existence of roles should be treated as existence 315 of Import and Export policy [RFC8212]. 317 9. IANA Considerations 319 This document defines a new Capability Codes option [to be removed 320 upon publication: http://www.iana.org/assignments/capability-codes/ 321 capability-codes.xhtml] [RFC5492], named "BGP Role" with an assigned 322 value . The length of this capability is 1. 324 The BGP Role capability includes a Value field, for which IANA is 325 requested to create and maintain a new sub-registry called "BGP Role 326 Value". Assignments consist of Value and corresponding Role name. 327 Initially this registry is to be populated with the data in Table 1. 328 Future assignments may be made by a standard action procedure 329 [RFC5226]. 331 This document defines a new subcode, "Role Mismatch" with an assigned 332 value in the OPEN Message Error subcodes registry [to be 333 removed upon publication: http://www.iana.org/assignments/bgp- 334 parameters/bgp-parameters.xhtml#bgp-parameters-6] [RFC4271]. 336 This document defines a new optional, transitive BGP Path Attributes 337 option, named "Only to Customer (OTC)" with an assigned value 338 [To be removed upon publication: http://www.iana.org/assignments/bgp- 339 parameters/bgp-parameters.xhtml#bgp-parameters-2] [RFC4271]. The 340 length of this attribute is four bytes. 342 10. Security Considerations 344 This document proposes a mechanism for prevention of route leaks that 345 are the result of BGP policy mis-configuration. 347 Deliberate sending of a known conflicting BGP Role could be used to 348 sabotage a BGP connection. This is easily detectable. 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 Authors' Addresses 417 Alexander Azimov 418 Qrator Labs 420 Email: a.e.azimov@gmail.com 421 Eugene Bogomazov 422 Qrator Labs 424 Email: eb@qrator.net 426 Randy Bush 427 Internet Initiative Japan & Arrcus 429 Email: randy@psg.com 431 Keyur Patel 432 Arrcus, Inc. 434 Email: keyur@arrcus.com 436 Kotikalapudi Sriram 437 US NIST 439 Email: ksriram@nist.gov