Network Working Group | A. Azimov |
Internet-Draft | E. Bogomazov |
Intended status: Standards Track | Qrator Labs |
Expires: December 20, 2017 | R. Bush |
Internet Initiative Japan | |
K. Patel | |
Arrcus, Inc. | |
K. Sriram | |
US NIST | |
June 18, 2017 |
Route Leak Prevention using Roles in Update and Open messages
draft-ietf-idr-bgp-open-policy-00
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 routes according to operator configuration options without any 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 BGP Open to establish agreement of the (peer, customer, provider, internal) relationship of two neighboring BGP speakers to enforce appropriate configuration on both sides. Propagated routes are then marked with an iOTC attribute according to agreed relationship allowing prevention of route leaks.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119 only when they appear in all upper case. They may also appear in lower or mixed case as English words, without normative meaning.
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 http://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 on December 20, 2017.
Copyright (c) 2017 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 (http://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.
Despite uses of words such as "Customer," "Peer." etc. the intent is not business relationships, who pays whom, etc. These are common terms to represent restrictions on BGP propagation, some times known as Gao/Rexford. E.g. if A is a "peer" of B and C, A does not propagate B's prefixes to C. If D is a "customer" of E and F, D does not propagate prefixes learned from E to F.
As the whole point of route leak detection and prevention is to prevent vioation of these relationships, they are inescapable.
This 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 and a way to create double-boundary filters for prevention of route leaks via new BGP Path Attribute.
For the purpose of this document, BGP route leaks are when a BGP route was learned from transit provider or peer and is announced to another provider or peer. See [I-D.ietf-grow-route-leak-problem-definition]. 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 in that draft provides the opportunity to detect route leaks made by third parties but provides no support to strongly prevent route leak creation.
Also, route tagging which relies on operator maintained policy configuration is too easily and too often misconfigured.
As many of these terms are used differently in various contexts, it is worth being explicit.
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.
BGP Role is new mandatory configuration option. It reflects the real-world agreement between two BGP speakers about their peering relationship.
Allowed Role values are:
Since BGP Role reflects the relationship between two BGP speakers, it could also be used for more than route leak mitigation.
The TLV (type, length, value) of the BGP Role capability are:
Value | Role name |
---|---|
0 | Undefined |
1 | Sender is Peer |
2 | Sender is Provider |
3 | Sender is Customer |
4 | Sender is Internal |
5 | Sender is Complex |
Section 4 described how BGP Role is a reflection of 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 corresponded. 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 SHOULD check value of the received capability with its own BGP Role. The allowed pairings are (first a sender's Role, second the receiver's Role):
Sender Role | Receiver Role |
---|---|
Peer | Peer |
Provider | Customer |
Customer | Provider |
Internal | Internal |
Complex | Complex |
In all other cases speaker MUST send a Role Mismatch Notification (code 2, sub-code <TBD2>).
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 peers which do not announce the BGP Role capability in their 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.
The Complex role should be set only if the relationship between BGP neighbors can not be described using simple Customer/Provider/Peer roles. For a example, if neighbor is literal peer, but for some prefixes it provides full transit; the complex role SHOULD be set on both sides. In this case roles Customer/Provider/Peer should be set on per-prefix basis, keeping the abstraction from filtering mechanisms (Section 8).
If role is not Complex all per-prefix role settings MUST be ignored.
The Internal Only To Customer (iOTC) attribute is a new optional, non-transitive BGP Path attribute with the Type Code <TBD3>. This attribute has zero length as it is used only as a flag.
There are four rules for setting the iOTC attribute:
These four rules provide mechanism that strongly prevents route leak creation by an AS.
As the iOTC field is non-transitive, it is not seen by or signed by BGPsec [I-D.ietf-sidr-bgpsec-protocol].
As the BGP Role reflects the relationship between neighbors, it can also have other uses. As an example, BGP Role might affect route priority, or be used to distinguish borders of a network if a network consists of multiple AS.
Though such uses may be worthwhile, they are not the goal of this document. Note that such uses would require local policy control.
This document doesn't provide any security measures to check correctness of per-prefix roles, so the Complex role should be used with great caution. It is as dangerous as current BGP peering.
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-transitive BGP Path Attributes option, named "Internal Only To Customer", assigned value <TBD3> [To be removed upon publication: http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-parameters-2] [RFC4271]. The length of this attribute is 0.
This document proposes a mechanism for prevention of route leaks that are the result of BGP policy misconfiguration.
Deliberate sending of a known conflicting BGP Role could be used to sabotage a BGP connection. This is easily detectable.
BGP Role is disclosed only to an immediate BGP neighbor, so it will not itself reveal any sensitive information to third parties.
The authors wish to thank Douglas Montgomery, Brian Dickson, and Andrei Robachevsky for their contributions to a variant of this work.
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[RFC4271] | Rekhter, Y., Li, T. and S. Hares, "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006. |
[RFC4486] | Chen, E. and V. Gillet, "Subcodes for BGP Cease Notification Message", RFC 4486, DOI 10.17487/RFC4486, April 2006. |
[RFC5492] | Scudder, J. and R. Chandra, "Capabilities Advertisement with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 2009. |
[I-D.ietf-grow-route-leak-problem-definition] | Sriram, K., Montgomery, D., McPherson, D., Osterweil, E. and B. Dickson, "Problem Definition and Classification of BGP Route Leaks", Internet-Draft draft-ietf-grow-route-leak-problem-definition-06, May 2016. |
[I-D.ietf-idr-route-leak-detection-mitigation] | Sriram, K., Montgomery, D., Dickson, B., Patel, K. and A. Robachevsky, "Methods for Detection and Mitigation of BGP Route Leaks", Internet-Draft draft-ietf-idr-route-leak-detection-mitigation-03, May 2016. |
[I-D.ietf-sidr-bgpsec-protocol] | Lepinski, M. and K. Sriram, "BGPsec Protocol Specification", Internet-Draft draft-ietf-sidr-bgpsec-protocol-15, March 2016. |
[RFC5226] | Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, DOI 10.17487/RFC5226, May 2008. |