<?xml version="1.0" encoding="US-ASCII"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC4271 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY RFC7908 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7908.xml">
<!ENTITY I-D.ietf-idr-route-leak-detection-mitigation SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-idr-route-leak-detection-mitigation-03.xml">
<!ENTITY I-D.ietf-sidr-bgpsec-protocol SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-sidr-bgpsec-protocol-15.xml">
<!ENTITY I-D.ietf-idr-bgp-open-policy SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-idr-bgp-open-policy-02.xml">
]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" docName="draft-ymbk-idr-bgp-eotr-policy-02" ipr="trust200902">
 <front>

   <title abbrev="Route Leak Detection and Filtering"> Route Leak Detection and Filtering using Roles in Update and Open messages </title>

   <author fullname="Alexander Azimov" initials="A"
           surname="Azimov">
     <organization>Qrator Labs</organization>
     <address>
       <email>aa@qrator.net</email>
     </address>
   </author>

   <author fullname="Eugene Bogomazov" initials="E"
           surname="Bogomazov">
     <organization>Qrator Labs</organization>
     <address>
       <email>eb@qrator.net</email>
     </address>
   </author>

   <author fullname="Randy Bush" initials="R"
           surname="Bush">
     <organization>Internet Initiative Japan</organization>
     <address>
       <email>randy@psg.com</email>
     </address>
   </author>

   <author fullname="Keyur Patel" initials="K"
           surname="Patel">
     <organization>Arrcus, Inc.</organization>
     <address>
       <email>keyur@arrcus.com</email>
     </address>
   </author>

   <date month="March" year="2018"/>

   <keyword>BGP</keyword>
   <keyword>Route leak</keyword>
   <keyword>BGP role</keyword>

   <abstract>
     <t>
       [draft-ietf-idr-bgp-open-policy] defines a BGP OPEN capability
       and consequent route marking which enforces a valley-free
       peering relationship.  This document defines an eOTC (external
       Only To Customer) transitive BGP attribute which propagates the
       specific marking to automatically detect route leaks.
       The goal is to allow a distant AS to determine a violation of valley-free peering.
     </t>
   </abstract>

   <note title="Requirements Language">
     <t>
       The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
       "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be
       interpreted as described in <xref target="RFC2119">RFC 2119</xref>
       only when they appear in all upper case.  They may also appear in lower
       or mixed case as English words, without normative meaning.
     </t>
   </note>
 </front>

 <middle>
   <section title="Introduction" anchor="intro">
     <t>
       For the purpose of this document, BGP route leaks are when a BGP
       route was learned from transit provider or peer is announced
       to another provider or peer.  See <xref target="RFC7908"/>. These
       are usually the result of misconfigured or absent BGP route
       filtering or lack of coordination between two BGP speakers.
     </t>

     <t>
       <xref target="I-D.ietf-idr-route-leak-detection-mitigation"/>
       describes a method of marking and detecting leaks which relies on
       operator maintained markings.  Unfortunately, in most cases, a
       leaking router will likely also be misconfigured to mark
       incorrectly.
     </t>

     <t>
       It has been suggested to use white list filtering, relying on
       knowing the prefixes in the peer's customer cone as import
       filtering, in order to detect route leaks.  Unfortunately, a
       large number of medium transit operators use a
       single prefix list as only the ACL for export filtering, without
       community tagging and without paying attention to the source of a
       learned route. So, if they learn a customer's route from their
       provider or peer - they will announce it in all directions,
       including other providers or peers.  This misconfiguration
       affects a limited number of prefixes; but such route leaks will
       obviously bypass customer cone import filtering made by upper
       level upstream providers.
     </t>

     <t>
       This document specifies a way to to create automatic
       filters for detection of route leaks via new BGP Path Attribute which is set
       according to BGP Roles (<xref target="I-D.ietf-idr-bgp-open-policy"/>) .
       While iOTC provides
       strong vendor-code-based enforcement of route leak prevention, route leaks
       could still exist as result of misconfigured old BGP implementations. Route leaks could
       also be result of malicious activity such as MITM attacks or DoS.
       The goal of this proposal is to allow a distant AS to determine
       a violation of valley-free peering that is made by mistake or by purpose.
     </t>


   </section>

   <section anchor="detection_attribute" title="BGP External Only To Customer attribute">
     <t> The External Only To Customer (eOTC) attribute is a new
     optional, transitive BGP Path attribute with the Type Code
     &lt;TBD1&gt;.  This attribute is four bytes and contains an AS
     number of the AS that added the attribute to the route.</t>
       <t> There are two rules for setting the eOTC attribute:
       <list style="numbers">
         <t>
           If eOTC is not set and the sender's Role is Provider or Peer,
           the eOTC attribute MUST be added with value equal to the
           sender's AS number.</t>
         <t>
           If eOTC is set, the receiver's Role is Provider or Peer, and
           its value is not the neighbor's AS number then the incoming
           route is route leak and MUST be given a lower local
           preference, or MAY be dropped.</t>
         </list>
       These two rules provide mechanism for route leak detection that
       is created by a distant party in the AS_Path.
       </t>
   </section>

   <section anchor="security" title="Compatibility with BGPsec">
     <t>
       For BGPsec <xref target="I-D.ietf-sidr-bgpsec-protocol"></xref>
       enabled routers, the Flags field will have a bit added to
       indicate that an eOTC attribute exists.  The eOTC value will
       be automatically carried in AS field of the added Secure_Path
       Segment.
     </t>
     <t>
       When a route is translated from a BGPsec enabled router to a
       non-BGPsec router, in addition to AS_PATH reconstruction,
       reconstruction MUST be performed for the eOTC attribute. If Flag
       bit was set in one of Secure_Path Segments, the eOTC attribute
       SHOULD be added with the AS number of the segment in which it
       appears for the first time.
     </t>
   </section>
   
   <section anchor="IANA" title="IANA Considerations">
     <t>
       This document defines a new optional, transitive BGP Path
       Attributes option, named "External Only To Customer", assigned value
       &lt;TBD1&gt; [To be removed upon publication:
       http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-parameters-2]
       <xref target="RFC4271"/>. The length of this attribute is 4.
     </t>
   </section>

   <section anchor="Security" title="Security Considerations">
     <t>
       This document proposes a mechanism for detection
       of route leaks that are the result of BGP policy misconfiguration.
       If BGPSec is enabled it will also provide mechanism to detect leaks
       that are result of malicious activity.
     </t>
     <t>
       Deliberate mis-marking of the eOTC flag could be used to affect
       the BGP decision process, but could not sabotage a route's
       propagation.
     </t>
     <t>
       eOTC is a transitive BGP AS_PATH attribute which reveals a
       information about a BGP speaker's peering relationship.  It will
       give a strong hint that some link isn't customer to provider, but
       will not help to distinguish if it is provider to customer or
       peer to peer. In addition it could reveal sequence of p2c
       to downstream ISPs. If eOTC is BGPsec signed, it can not be removed
       for peering confidentiality.
     </t>
     <t>
       Still, any Tier-1 number in AS_PATH could be used in the same way
       to reveal possible p2c sequence.
     </t>

   </section>

</middle>

 <back>
   <references title="Normative References">
     &RFC2119;
     &RFC4271;
     &RFC7908;
     &I-D.ietf-idr-bgp-open-policy;
   </references>

   <references title="Informative References">
     &I-D.ietf-idr-route-leak-detection-mitigation;
     &I-D.ietf-sidr-bgpsec-protocol;
  </references>
 </back>
</rfc>


