Network Working Group A. Azimov Internet-Draft E. Bogomazov Intended status: Standards Track Qrator Labs Expires:August 19, 2019January 9, 2020 R. Bush Internet Initiative Japan & Arrcus K. Patel Arrcus, Inc. K. Sriram US NISTFebruary 15,July 8, 2019 Route Leak Prevention using Roles in Update and Open messagesdraft-ietf-idr-bgp-open-policy-05draft-ietf-idr-bgp-open-policy-06 Abstract Route Leaks are the propagation of BGP prefixes which violate assumptions of BGP topology relationships; e.g. passing a route learned from one peer to another peer or to a transit provider, passing a route learned from one transit provider to another transit provider or to a peer. Today, approaches to leak prevention rely on marking routesaccording toby operatorconfiguration options,configuration, with no check that the configuration corresponds to that of the BGP neighbor, or enforcement that the two BGP speakers agree on the relationship. This document enhances BGPOpenOPEN to establish agreement of the (peer, customer, provider,RS, RS-client, internal)Route Server, Route Server client) relationship of two neighboring BGP speakers to enforce appropriate configuration on both sides. Propagated routes are then marked with aniOTCOTC attribute according to the agreedrelationshiprelationship, allowing both prevention and detection of route leaks. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described inRFC 2119BCP 14 [RFC2119] [RFC8174] when, and onlywhenwhen, they appear in allupper case. They may also appear in lower or mixed casecapitals, asEnglish words, without normative meaning.shown here. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onAugust 19, 2019.January 9, 2020. Copyright Notice Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . .23 2. Peering Relationships . . . . . . . . . . . . . . . . . . . . 3 3. BGP Role . . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Role capability . . . . . . . . . . . . . . . . . . . . . . . 4 5. Role correctness . . . . . . . . . . . . . . . . . . . . . . 5 5.1. Strict mode . . . . . . . . . . . . . . . . . . . . . . .65 6. BGPInternalOnly To Customer attribute . . . . . . . . . . .6 7. Attribute or Community . . . . . . . .. . . . 6 7. Enforcement . . . . . . .6 8. Compatibility with BGPsec. . . . . . . . . . . . . . . . . .7 9.6 8. Additional Considerations . . . . . . . . . . . . . . . . . . 710.9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 711.10. Security Considerations . . . . . . . . . . . . . . . . . . . 812.11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 813.12. References . . . . . . . . . . . . . . . . . . . . . . . . . 813.1.12.1. Normative References . . . . . . . . . . . . . . . . . . 813.2.12.2. Informative References . . . . . . . . . . . . . . . . . 9 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 1. IntroductionThis document specifies a new BGP Capability Code, [RFC5492] Sec 4, which two BGP speakers MAY use to ensure that they MUST agree on their relationship; i.e. customer and provider or peers. Either or both MAY optionally be configured to require that this option be exchanged for the BGP Open to succeed. Also this document specifies a way to mark routes according to BGP Roles established in OPEN message and a way to create double-boundary filters for prevention of route leaks using the new BGP Path Attribute. For the purpose of this document,BGP route leaks arewhen aBGProute wasroute(s) which were learned from transit provider or peer andisthen announced to another provider or peer.See[RFC7908].See [RFC7908]. These are usually the result of misconfigured or absent BGP route filtering or lack of coordination between two BGP speakers.[I-D.ietf-idr-route-leak-detection-mitigation]The mechanism proposed inthat draft provides the opportunity[I-D.ietf-idr-route-leak-detection-mitigation] uses large-communities todetectattempt detection of routeleaks made by third parties but provides no mechanismleaks. While signaling using communities is easy tostrongly prevent route leak creation. Also, route tagging whichimplement, ut relies on operator maintained policy configuration which is too easily, and too often, misconfigured. Another problem may occur if the community signal is stripped, accidentally or maliciously. This document provides configuration automation using 'BGP roles', which are negotiated using a new BGP Capability Code in OPEN message, [RFC5492] Sec 4. Either or both BGP speakers MAY be configured to require that this capability be agreed for the BGP OPEN to succeed. A new BGP Path Attribute is specified that SHOULD be automatically configured using BGP roles. This attribute prevents networks from creating leaks, and detects leaks created by third-parties. 2. Peering Relationships Despite uses of words such as "Customer," "Peer."etc. described aboveetc.; these are not business relationships, who pays whom, etc. These are common terms to represent restrictions on BGP route propagation, sometimes known as the Gao-Rexfordmodel.model [cite]. A Provider: MAY send to a customer all available prefixes. A Customer: MAY send to a provider their own prefixes and prefixes learned from any of their customers. A customer MUST NOT send to a provider prefixes learned from its peers, from other providers, orRS.from Route Servers. A Route Server (RS) MAY send to a RSclientClient all available prefixes. A Route Server Client (RS-client) MAY send to an RS its own prefixes and prefixes learned from its customers. A RS-client MUST NOT send to an RS prefixes learned from peers, from its providers, or from otherRS.RS(s). A Peer: MAY send to a peer its own prefixes and prefixes learned from its customers. A peer MUST NOT send to a peer prefixes learned from other peers, from its providers, orRS. An Internal: MAY send all available prefixes through internal link.from RS(s). 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.But violationViolation of the above rulesmarked MUST NOTmay result in routeleaks.leaks so MUST not be allowed. Automatic enforment of these rules should significantly reduce configuration mistakes. While these enforcing the above rules will address most BGP peeringrelations cover 99% of possiblescenarios, their configuration isn't part oftheBGPitself, thusitself; therefore requiring configuration ofcommunitiesingress andcorrespondingegress prefixfilters. The automation of this process may significantly decrease number of configuration mistakes.filters is still strongly advised. 3. BGP Role BGP Role is new configuration option that SHOULD be configured on each BGP session. It reflects the real-world agreement between two BGP speakers about theirpeeringrelationship. Allowed Role values for eBGP sessions are: o Provider - sender is a transit provider to neighbor; o Customer - sender is transit customer of neighbor; o RS - sender isroute servera Route Server, usually at internet exchange point (IX) oRS-clientRS-Client - sender is client of RSat internet exchange point (IX)o Peer - sender and neighbor are peers;o Internal - sender and neighbor are part of the same organization. For iBGP sessions, only the Internal role MAY be configured.Since BGP Role reflects the relationship between two BGP speakers, it could also be used for more than route leak mitigation. 4. Role capability The TLV (type, length, value) of the BGP Role capability are: o Type - <TBD1>; o Length - 1 (octet); o Value - integer corresponding to speaker' BGP Role. +-------+---------------------+ | Value | Role name | +-------+---------------------+ | 0 | Sender isInternal | | 1 | Sender isProvider | |21 | Sender is RS | |32 | Sender is RS-Client | |43 | Sender is Customer | |54 | Sender is Peer | +-------+---------------------+ Table 1: Predefined BGP Role Values 5. Role correctness Section 3 described how BGP Roleis a reflection ofencodes the relationship between two BGP speakers. But the mere presence of BGP Role doesn't automatically guarantee role agreement between two BGP peers. To enforce correctness, the BGP Role check is used with a set of constrains on how speakers' BGP Roles MUST correspond. Of course, each speaker MUST announce and accept the BGP Role capability in the BGP OPEN message exchange. If a speaker receives a BGP Role capability, it MUST check the value of the received capability with its own BGP Role (if it is set). The allowed pairings are (first a sender's Role, second the receiver's Role): +-------------+---------------+ | Sender Role | Receiver Role | +-------------+---------------+ |Internal | Internal | |Provider | Customer | | Customer | Provider | | RS | RS-Client | | RS-Client | RS | | Peer | Peer | +-------------+---------------+ Table 2: Allowed Role CapabilitiesIn case of any other pairs of roles,If the Role pair is not in the above table, a speaker MUST send a Role Mismatch Notification (code 2, sub-code <TBD2>). 5.1. Strict mode A new BGP configuration option "strict mode" is defined with values of true or false. If set to true, then the speaker MUST refuse to establish a BGP session with a neighbor which does not announce the BGP Role capability intheirthe OPEN message. If a speaker rejects a connection, it MUST send a Connection Rejected Notification [RFC4486] (Notification with error code 6, subcode 5). By default, strict mode SHOULD be set to false for backward compatibility with BGP speakers that do not yet support this mechanism. 6. BGPInternalOnly To Customer attribute TheInternalOnly To Customer(iOTC) attribute(OTC) BGP Attribute is a new optional,non-transitivetransitive BGP Path attribute with the Type Code <TBD3>. Thisattribute has zero length as it is used only as a flag. There arefourrules of iOTCbyte attributeusage:MUST apply the following policy: 1.The iOTCIf a route with OTC attribute is received from Customer or RS- client - it's a route leak and MUST beaddedrejected. 2. If a route with OTC attribute is received from Peer and its value isn't equal toall incoming routes ifthereceiver's Roleneighbor's ASN - it's a route leak and MUST be rejected. 3. If a route isCustomer, Peer,received from a Provider, Peer orRS-client; 2. Routes withRS and theiOTCOTC attribute has not been set it MUSTNOTbeannounced by a sender whose Role is Customer, Peer, or RS-client; 3.added with value equal to AS number of the neighbor (sender). The egress policy MUST be: 1. Asenderroute with the OTC attribute set MUST NOTinclude iOTC in UPDATE messages advertisedbe sent toeBGP neighbor if its Role isn't Internal. 4.providers, peers, or RS(s). 2. IfiOTCroute iscontained in an UPDATE message from eBGP speakersent to customer or peer andreceiver's Role isn't Internal then thisthe OTC attribute is not set it MUST beremoved. These rules provide mechanismadded with value equal tostrongly prevent route leak creation by an AS.AS number of the sender. Once the OTC attribute has been set, it MUST be preserved unchanged. 7.Attribute or CommunityEnforcement Having the relationshiphard set by agreementunequivocally agreed between the two peers in BGP OPEN is critical; theroutersBGP implementations enforce the relationship irrespective of operator policy configuration errors. Similarly,it is critical thatthe application of that relationship on prefix propagation usingiOTC isOTC MUST BE enforced by therouter(s),BGP implementations, andminimallynot exposed to user mis-configuration.There is a question whether the iOTC marking should be an attribute or a well-known community. There is a long and sordid history of mis-configurations inserting incorrect communities, deleting communities, ignoring well-known community markings etc. In this mechanism's case, an operator could, for example, accidentally strip the well-known community on receipt.As opposed to communities, BGP attributes may not be generally modified or filtered by the operator. The router(s) enforce them. This is the desired property for theiOTCOTC marking. Hence, this document specifiesiOTCOTC as an attribute. 8.Compatibility with BGPsec As the iOTC attribute is non-transitive, it is not seen by or signed by BGPsec [RFC8205]. 9.Additional Considerations As the BGP Role reflects the peering relationship between neighbors, itcan alsomight have other uses.As anFor example, BGP Role might affect route priority, or be used to distinguish borders of a network if a network consists of multiple ASs. Though such uses may be worthwhile, they are not the goal of this document. Note that such uses would require local policy control. As BGP role configuration results in automatic creation of inbound/ outbound filters, existence of roles should be treated as existence of Import and Export policy. [RFC8212]This document doesn't provide any securityThere are peering relationships which are 'complex'; e.g. when both parties are intentionally sending prefixes received from each other to their peers and/or upstreams. If multiple BGP peerings can segregate the 'complex' parts of the relationship, the complex peering roles can be segregated into different BGP sessions, and normal BGP Roles MUST be used on the non-complex sessions. No Roles SHOULD be configured on 'complex' BGP sessions, and OTC MUST be set by configuration on a per-prefix basis. There can be no measures to check correctness ofiOTC usageOTC use ifrole isn'tRole is not configured.10.9. IANA Considerations This document defines a new Capability Codes option [to be removed upon publication: http://www.iana.org/assignments/capability-codes/ capability-codes.xhtml] [RFC5492], named "BGP Role", assigned value <TBD1> . The length of this capability is 1. The BGP Role capability includes a Value field, for which IANA is requested to create and maintain a new sub-registry called "BGP Role Value". Assignments consist of Value and corresponding Role name. Initially this registry is to be populated with the data in Table 1. Future assignments may be made by a standard action procedure[RFC5226]. This document defines new subcode, "Role Mismatch", assigned value <TBD2> in the OPEN Message Error subcodes registry [to be removed upon publication: http://www.iana.org/assignments/bgp-parameters/bgp- parameters.xhtml#bgp-parameters-6] [RFC4271]. This document defines a new optional,non-transitivetransitive BGP Path Attributes option, named"Internal Only"Only To Customer", assigned value <TBD3> [To be removed upon publication:http://www.iana.org/assignments/bgp-parameters/bgp- parameters.xhtml#bgp-parameters-2]http://www.iana.org/assignments/bgp- parameters/bgp-parameters.xhtml#bgp-parameters-2] [RFC4271]. The length of this attribute is 0.11.10. Security Considerations This document proposes a mechanism for prevention of route leaks that are the result of BGP policy mis-configuration. Deliberate sending of a known conflicting BGP Role could be used to sabotage a BGP connection. This is easily detectable.BGP RoleA misconfiguration in OTC setup may affect prefix propagation. But the automation that isdisclosed only to an immediateprovided by BGPneighbor, so it will not itself reveal any sensitive information to third parties. 12.roles should make such misconfiguration unlikely. 11. Acknowledgments The authors wish to thank Douglas Montgomery, Brian Dickson, AndreiRobachevskyRobachevsky, and Daniel Ginsburg for their contributions to a variant of this work.13.12. References13.1.12.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>. [RFC4271] Rekhter, Y., Ed., Li, T., Ed., and S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006, <https://www.rfc-editor.org/info/rfc4271>. [RFC4486] Chen, E. and V. Gillet, "Subcodes for BGP Cease Notification Message", RFC 4486, DOI 10.17487/RFC4486, April 2006, <https://www.rfc-editor.org/info/rfc4486>. [RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 2009, <https://www.rfc-editor.org/info/rfc5492>.13.2.[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>. 12.2. Informative References [I-D.ietf-idr-route-leak-detection-mitigation] Sriram, K. and A. Azimov, "Methods for Detection and Mitigation of BGP Route Leaks", draft-ietf-idr-route-leak- detection-mitigation-10 (work in progress), October 2018. [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", RFC 5226, DOI 10.17487/RFC5226, May 2008, <https://www.rfc-editor.org/info/rfc5226>. [RFC7908] Sriram, K., Montgomery, D., McPherson, D., Osterweil, E., and B. Dickson, "Problem Definition and Classification of BGP Route Leaks", RFC 7908, DOI 10.17487/RFC7908, June 2016, <https://www.rfc-editor.org/info/rfc7908>.[RFC8205] Lepinski, M., Ed. and K. Sriram, Ed., "BGPsec Protocol Specification", RFC 8205, DOI 10.17487/RFC8205, September 2017, <https://www.rfc-editor.org/info/rfc8205>.[RFC8212] Mauch, J., Snijders, J., and G. Hankins, "Default External BGP (EBGP) Route Propagation Behavior without Policies", RFC 8212, DOI 10.17487/RFC8212, July 2017, <https://www.rfc-editor.org/info/rfc8212>. Authors' Addresses Alexander Azimov Qrator Labs Email: a.e.azimov@gmail.com Eugene Bogomazov Qrator Labs Email: eb@qrator.net Randy Bush Internet Initiative Japan & Arrcus Email: randy@psg.com Keyur Patel Arrcus, Inc. Email: keyur@arrcus.com Kotikalapudi Sriram US NIST Email: ksriram@nist.gov