Network Working Group                                          A. Azimov
Internet-Draft                                              E. Bogomazov
Intended status: Standards Track                             Qrator Labs
Expires: July 4, 2019                                            R. Bush
                                               Internet Initiative Japan
                                                                K. Patel
                                                            Arrcus, Inc.
                                                               K. Sriram
                                                                 US NIST
                                                       December 31, 2018

     Route Leak Prevention using Roles in Update and Open messages


   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, rs, rs-client, 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.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   be interpreted as described in RFC 2119 [RFC2119] only when they
   appear in all upper case.  They may also appear in lower or mixed
   case as English words, without normative meaning.

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

Azimov, et al.            Expires July 4, 2019                  [Page 1]

Internet-Draft            Route Leak Prevention            December 2018

   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at

   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 July 4, 2019.

Copyright Notice

   Copyright (c) 2018 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
   ( 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  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Peering Relationships . . . . . . . . . . . . . . . . . . . .   3
   3.  BGP Role  . . . . . . . . . . . . . . . . . . . . . . . . . .   4
   4.  Role capability . . . . . . . . . . . . . . . . . . . . . . .   4
   5.  Role correctness  . . . . . . . . . . . . . . . . . . . . . .   5
     5.1.  Strict mode . . . . . . . . . . . . . . . . . . . . . . .   6
   6.  BGP Internal Only To Customer attribute . . . . . . . . . . .   6
   7.  Attribute or Community  . . . . . . . . . . . . . . . . . . .   6
   8.  Compatibility with BGPsec . . . . . . . . . . . . . . . . . .   7
   9.  Additional Considerations . . . . . . . . . . . . . . . . . .   7
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   11. Security Considerations . . . . . . . . . . . . . . . . . . .   8
   12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .   8
   13. References  . . . . . . . . . . . . . . . . . . . . . . . . .   8
     13.1.  Normative References . . . . . . . . . . . . . . . . . .   8
     13.2.  Informative References . . . . . . . . . . . . . . . . .   9
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .   9

Azimov, et al.            Expires July 4, 2019                  [Page 2]

Internet-Draft            Route Leak Prevention            December 2018

1.  Introduction

   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 message 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

   Also, route tagging which relies on operator maintained policy
   configuration is too easily and too often misconfigured.

2.  Peering Relationships

   Despite uses of words such as "Customer," "Peer." etc. described
   above are not business relationships, who pays whom, etc.  These are
   common terms to represent restrictions on BGP route propagation,
   sometimes known as Gao-Rexford model.

   A Provider:  MAY send to customer all available prefixes.

   A Customer:  MAY send to provider own prefixes and prefixes learned
      from its customers.  A customer MUST NOT send to a provider
      prefixes learned from peers, other providers or RS.

   A Route Server (rs)  MAY send to a rs client all available prefixes.

   A Route Server Client (rs-client)  MAY send to a RS own prefixes and
      prefixes learned from its customers.  A rs-client MUST NOT send to
      a RS prefixes learned from peers, providers or other RS.

Azimov, et al.            Expires July 4, 2019                  [Page 3]

Internet-Draft            Route Leak Prevention            December 2018

   A Peer:  MAY send to a peer own prefixes and prefixes learned from
      its customers.  A peer MUST NOT send to a peer prefixes learned
      from other peers, providers or RS.

   An Internal:  MAY send all available prefixes through internal link.

   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 violation of listed MUST NOT rules may
   result in route leaks.  While these peering relations cover 99% of
   possible scenarios, their configuration isn't part of the BGP itself,
   thus requiring configuration of communities and corresponding egress
   prefix filters.  The automation of this process may significantly
   decrease number of configuration mistakes.

3.  BGP Role

   BGP Role is new configuration option that SHOULD be configured at
   each BGP session.  It reflects the real-world agreement between two
   BGP speakers about their peering relationship.

   Allowed Role values for eBGP sessions are:

   o  Provider - sender is a transit provider to neighbor;

   o  Customer - sender is customer of neighbor;

   o  RS - sender is route server at internet exchange point (IX)

   o  RS-client - sender is client of RS at internet exchange point (IX)

   o  Peer - sender and neighbor are peers;

   o  Internal - sender and neighbor is part of same organization.

   For iBGP sessions only 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);

Azimov, et al.            Expires July 4, 2019                  [Page 4]

Internet-Draft            Route Leak Prevention            December 2018

   o  Value - integer corresponding to speaker' BGP Role.

                      | Value | Role name           |
                      |   0   | Sender is Internal  |
                      |   1   | Sender is Provider  |
                      |   2   | Sender is RS        |
                      |   3   | Sender is RS-Client |
                      |   4   | Sender is Customer  |
                      |   5   | Sender is Peer      |

                    Table 1: Predefined BGP Role Values

5.  Role correctness

   Section 3 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 MUST check 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

                      | Sender Role | Receiver Role |
                      | Internal    | Internal      |
                      | Provider    | Customer      |
                      | Customer    | Provider      |
                      | RS          | RS-Client     |
                      | RS-Client   | RS            |
                      | Peer        | Peer          |

                    Table 2: Allowed Role Capabilities

   In case of any other pair of roles, speaker MUST send a Role Mismatch
   Notification (code 2, sub-code <TBD2>).

Azimov, et al.            Expires July 4, 2019                  [Page 5]

Internet-Draft            Route Leak Prevention            December 2018

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 neighbors 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]
   (Notfication 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.  BGP Internal Only To Customer attribute

   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 of iOTC attribute usage:

   1.  The iOTC attribute MUST be added to all incoming routes if the
       receiver's Role is Customer, Peer or RS-client;

   2.  Routes with the iOTC attribute set MUST NOT be announced by a
       sender whose Role is Customer, Peer or RS-client;

   3.  A sender MUST NOT include iOTC in UPDATE messages advertised to
       eBGP neighbor if its Role isn't Internal.

   4.  If iOTC is contained in an UPDATE message from eBGP speaker and
       receiver's Role isn't Internal then this attribute MUST be

   These rules provide mechanism that strongly prevents route leak
   creation by an AS.

7.  Attribute or Community

   Having the relationship hard set by agreement between the two peers
   in BGP OPEN is critical; the routers enforce the relationship
   irrespective of operator configuration errors.

   Similarly, it is critical that the application of that relationship
   on prefix propagation using iOTC is enforced by the router(s), and
   minimally exposed to user misconfiguration.  There is a question
   whether the iOTC marking should be an attribute or a well-known

Azimov, et al.            Expires July 4, 2019                  [Page 6]

Internet-Draft            Route Leak Prevention            December 2018

   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 the iOTC marking.  Hence, this
   document specifies iOTC as an attribute.

8.  Compatibility with BGPsec

   As the iOTC field is non-transitive, it is not seen by or signed by
   BGPsec [I-D.ietf-sidr-bgpsec-protocol].

9.  Additional Considerations

   As the BGP Role reflects the peerin 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.

   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.  [I-D.ietf-grow-bgp-reject]

   This document doesn't provide any security measures to check
   correctness of iOTC usage if role isn't configured.

10.  IANA Considerations

   This document defines a new Capability Codes option [to be removed
   upon publication:
   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

   This document defines new subcode, "Role Mismatch", assigned value
   <TBD2> in the OPEN Message Error subcodes registry [to be removed

Azimov, et al.            Expires July 4, 2019                  [Page 7]

Internet-Draft            Route Leak Prevention            December 2018

   upon publication:
   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:
   parameters.xhtml#bgp-parameters-2] [RFC4271].  The length of this
   attribute is 0.

11.  Security Considerations

   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.

12.  Acknowledgments

   The authors wish to thank Douglas Montgomery, Brian Dickson, Andrei
   Robachevsky and Daniel Ginsburg for their contributions to a variant
   of this work.

13.  References

13.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,

   [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,

   [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, <>.

Azimov, et al.            Expires July 4, 2019                  [Page 8]

Internet-Draft            Route Leak Prevention            December 2018

13.2.  Informative References

              Mauch, J., Snijders, J., and G. Hankins, "Default EBGP
              Route Propagation Behavior Without Policies", draft-ietf-
              grow-bgp-reject-08 (work in progress), May 2017.

              Sriram, K., Montgomery, D., McPherson, D., Osterweil, E.,
              and B. Dickson, "Problem Definition and Classification of
              BGP Route Leaks", draft-ietf-grow-route-leak-problem-
              definition-06 (work in progress), May 2016.

              Sriram, K., Montgomery, D., Dickson, B., Patel, K., and A.
              Robachevsky, "Methods for Detection and Mitigation of BGP
              Route Leaks", draft-ietf-idr-route-leak-detection-
              mitigation-03 (work in progress), May 2016.

              Lepinski, M. and K. Sriram, "BGPsec Protocol
              Specification", draft-ietf-sidr-bgpsec-protocol-15 (work
              in progress), March 2016.

   [RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
              IANA Considerations Section in RFCs", RFC 5226,
              DOI 10.17487/RFC5226, May 2008,

Authors' Addresses

   Alexander Azimov
   Qrator Labs


   Eugene Bogomazov
   Qrator Labs


   Randy Bush
   Internet Initiative Japan


Azimov, et al.            Expires July 4, 2019                  [Page 9]

Internet-Draft            Route Leak Prevention            December 2018

   Keyur Patel
   Arrcus, Inc.


   Kotikalapudi Sriram


Azimov, et al.            Expires July 4, 2019                 [Page 10]