<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" docName="draft-ietf-idr-deprecate-as-set-confed-set-18" number="9774" consensus="true" updates="4271, 5065" obsoletes="6472" ipr="trust200902" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">

  <front> 
    <title abbrev="Deprecation of AS_SET and AS_CONFED_SET">Deprecation of AS_SET and AS_CONFED_SET in BGP</title>
    <seriesInfo name="RFC" value="9774"/>
    <author fullname="Warren Kumari" initials="W" surname="Kumari">
      <organization>Google, Inc.</organization>
      <address>
        <postal>
          <street>1600 Amphitheatre Parkway</street>
          <city>Mountain View</city>
          <region>CA</region>
          <code>94043</code>
          <country>United States of America</country>
        </postal>
        <phone>+1 571 748 4373</phone>
        <email>warren@kumari.net</email>
      </address>
    </author>
    <author fullname="Kotikalapudi Sriram" initials="K" surname="Sriram">
      <organization>USA NIST</organization>
      <address>
        <postal>
          <street>100 Bureau Drive</street>
          <city>Gaithersburg</city>
          <region>MD</region>
          <code>20899</code>
          <country>United States of America</country>
        </postal>
        <phone>+1 301 975 3973</phone>
        <email>ksriram@nist.gov</email>
      </address>
    </author>
    <author fullname="Lilia Hannachi" initials="L" surname="Hannachi">
      <organization>USA NIST</organization>
      <address>
        <postal>
          <street>100 Bureau Drive</street>
          <city>Gaithersburg</city>
          <region>MD</region>
          <code>20899</code>
          <country>United States of America</country>
        </postal>
        <phone>+1 301 975 3259</phone>
        <email>lilia.hannachi@nist.gov</email>
      </address>
    </author>
    <author fullname="Jeffrey Haas" initials="J." surname="Haas">
      <organization>Juniper Networks, Inc.</organization>
      <address>
        <postal>
          <street>1133 Innovation Way</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94089</code>
          <country>United States of America</country>
        </postal>
        <email>jhaas@juniper.net</email>
      </address>
    </author>
    <date year="2025" month="May"/>

    <area>RTG</area>
    <workgroup>idr</workgroup>
    <abstract>
      <t>BCP 172 (i.e., RFC 6472) recommends not using AS_SET and AS_CONFED_SET
      AS_PATH segment types in the Border Gateway Protocol (BGP). This document
      advances that recommendation to a standards requirement in BGP; it
      prohibits the use of the AS_SET and AS_CONFED_SET path segment types
      in the AS_PATH.  This is done to simplify the design and implementation
      of BGP and to make the semantics of the originator of a BGP route clearer.
      This will also simplify the design, implementation, and deployment of
      various BGP security mechanisms. This document updates RFC 4271 by
      deprecating the origination of BGP routes with AS_SET (Type 1 AS_PATH segment) and
      updates RFC 5065 by deprecating the origination of BGP
      routes with AS_CONFED_SET (Type 4 AS_PATH segment).
      Finally, it obsoletes RFC 6472.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="BCP172"/> recommends not
      using AS_SET <xref target="RFC4271" format="default"/> and AS_CONFED_SET <xref target="RFC5065" format="default"/> AS_PATH path segment types in the Border
      Gateway Protocol (BGP).  This document advances the BCP recommendation to
      a standards requirement in BGP; it prohibits the use of the AS_SET and
      AS_CONFED_SET types of path segments in the AS_PATH. The purpose is to
      simplify the design and implementation of BGP and to make the semantics
      of the originator of a BGP route clearer. This will also simplify the design,
      implementation, and deployment of various BGP security mechanisms. In
      particular, the prohibition of AS_SETs and AS_CONFED_SETs removes any
      ambiguity about the origin AS in RPKI-based Route Origin
      Validation (RPKI-ROV)
      <xref target="RFC6811" format="default"/> <xref target="RFC6907" format="default"/>
        <xref target="RFC9319" format="default"/>.</t>
      <t> The AS_SET path segment in the AS_PATH attribute (Sections <xref
      target="RFC4271" sectionFormat="bare" section="4.3"/> and <xref
      target="RFC4271" sectionFormat="bare" section="5.1.2"/> of <xref
      target="RFC4271" format="default"/>) is created by a router that is
      performing route aggregation and contains an unordered set of Autonomous
      Systems (ASes) that contributing prefixes in the aggregate have
      traversed.</t>
      <t>The AS_CONFED_SET path segment <xref target="RFC5065" format="default"/> in
      the AS_PATH attribute is created by a router that is performing route
      aggregation and contains an unordered set of Member AS Numbers in the
      local confederation that contributing prefixes in the aggregate have
      traversed. It is very similar to an AS_SET but is used within a
      confederation.</t>
      <t>By performing aggregation, a router is combining multiple BGP routes
      for more specific destinations into a new route for a less specific
      destination (see <xref target="RFC4271" sectionFormat="comma" section="9.1.2.2"/>). Aggregation
      may blur the semantics of the origin AS for the prefix being announced by
      producing an AS_SET or AS_CONFED_SET.  Such sets can cause operational
      issues, such as not being able to authenticate a route origin for the
      aggregate prefix in new BGP security technologies such as those that take
      advantage of X.509 extensions for IP addresses and AS identifiers
      (see <xref target="RFC6480" format="default"/>, <xref target="RFC6811" format="default"/>, <xref target="RFC6907" format="default"/>, 
      <xref target="RFC8205" format="default"/>, and <xref target="RFC9319" format="default"/>).
      This could result in reachability problems for the destinations
      covered by the aggregated prefix.</t>
      <t>From analysis of historical Internet routing data, it is apparent that
      aggregation that involves AS_SETs is very seldom used in practice on the
      public Internet (see <xref target="Analysis" format="default"/>).  When it is used, it
      is often used incorrectly; only a single AS in the AS_SET is
      the most common case <xref target="Analysis" format="default"/>. Also, very often the same AS appears in the
      AS_SEQUENCE and the AS_SET in the BGP update. The occurrence of reserved
      AS numbers <xref target="IANA-SP-ASN" format="default"/> is also somewhat frequent.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>

    </section>
    <section anchor="recs" numbered="true" toc="default">
      <name>Updates to the Requirements of RFCs 4271 and 5065</name>
      <t>Unless explicitly configured by a network operator to do otherwise
         (e.g., during a transition phase), BGP speakers:
      </t>     
      <ul>
        <li><bcp14>MUST NOT</bcp14> advertise BGP UPDATE messages containing AS_SETs or AS_CONFED_SETs and</li>
	
        <li><bcp14>MUST</bcp14> use the "treat-as-withdraw" error handling
              behavior per <xref target="RFC7606" format="default"/> upon reception of BGP UPDATE messages containing AS_SETs or AS_CONFED_SETs in the AS_PATH or AS4_PATH <xref target="RFC6793" format="default"/>.</li>
      </ul>
      <t>Per the above specifications, this document updates <xref target="RFC4271"/> and <xref target="RFC5065"/>
      by deprecating AS_SET (see <xref target="RFC4271" section="4.3" sectionFormat="comma" format="default"/>)
      and AS_CONFED_SET (see <xref target="RFC5065" section="3" sectionFormat="comma" format="default"/>), respectively.</t>
    </section>
    <section numbered="true" toc="default">
      <name>Treatment of Routes with AS_SET in RPKI-Based BGP Security</name>
      <t>Resource Public Key Infrastructure (RPKI) <xref target="RFC6480" format="default"/> uses X.509
      extensions for IP addresses and AS identifiers <xref target="RFC3779" format="default"/>.
      RPKI-ROV <xref target="RFC6811" format="default"/> <xref target="RFC6907" format="default"/>
      is a BGP security technology that never allows a route with AS_SET to be considered Valid.
      BGPsec <xref target="RFC8205" format="default"/> and Autonomous System Provider Authorization (ASPA)
      <xref target="I-D.ietf-sidrops-aspa-verification" format="default"/> are also BGP security technologies
      based on RPKI. BGPsec does not support AS_SETs. In ASPA-based AS_PATH verification,
      a route with AS_SET is always considered Invalid and hence ineligible for route selection.</t>
    </section>
    <section numbered="true" toc="default">
      <name>BGP AS_PATH "Brief" Aggregation</name>
      <t>Sections <xref target="RFC4271" sectionFormat="bare"
      section="9.1.4"/> and <xref target="RFC4271" sectionFormat="bare"
      section="9.2.2.2"/> of <xref target="RFC4271" format="default"/>
      describe BGP aggregation procedures.  <xref section="F.6"
      target="RFC4271" format="default"/> describes a generally less utilized
      "Complex AS_PATH Aggregation" procedure.</t>
      <t><xref target="RFC4271" section="5.1.6" sectionFormat="comma" format="default"/>
        describes the ATOMIC_AGGREGATE Path Attribute and notes that:</t>
      <blockquote>
        <t>When a BGP speaker aggregates several routes for the purpose of
          advertisement to a particular peer, the AS_PATH of the aggregated
          route normally includes an AS_SET formed from the set of ASes from
          which the aggregate was formed.  In many cases, the network
          administrator can determine if the aggregate can safely be advertised
          without the AS_SET, and without forming route loops.</t>
        <t>If an aggregate excludes at least some of the AS numbers present in
          the AS_PATH of the routes that are aggregated as a result of dropping
          the AS_SET, the aggregated route, when advertised to the peer, <bcp14>SHOULD</bcp14>
          include the ATOMIC_AGGREGATE attribute.</t>
      </blockquote>
      <t>When BGP AS_PATH aggregation is done according to the procedures in <xref target="RFC4271" section="9.2.2.2" sectionFormat="comma" format="default"/>,
        and any resulting AS_SETs are discarded, it is typically
        referred to as "brief" aggregation in implementations. That terminology is adopted here: In this document, brief aggregation refers to what is described in this section, in contrast to consistent brief aggregation as described in <xref target="consistent-brief"/>.
        Brief aggregation results in an AS_PATH that has the following property (from
        <xref target="RFC4271" section="9.2.2.2" sectionFormat="comma" format="default"/>):</t>
      <blockquote>
        <t>[D]etermine the longest leading sequence of tuples (as defined above)
          common to all the AS_PATH attributes of the routes to be aggregated.
          Make this sequence the leading sequence of the aggregated AS_PATH
          attribute.</t>
      </blockquote>
      <t>The ATOMIC_AGGREGATE Path Attribute is subsequently attached to the
        BGP route, if AS_SETs are dropped.</t>
      <section numbered="true" toc="default">
        <name>Issues with "Brief" AS_PATH Aggregation and RPKI-ROV</name>
        <t>While brief AS_PATH aggregation has the desirable property of not
        containing AS_SETs, the resulting aggregated AS_PATH may contain an
        unpredictable origin AS.
        This is because the aggregating AS may be different from the purported origin AS (for the aggregate), which may vary as explained below.
        Such unpredictable origin ASes may result
        in RPKI-ROV validation issues:</t>
        <ul>
          <li>Depending on the contributing routes to the aggregate route, the
          resulting origin AS may vary.</li>
          <li>The presence of expected contributing routes may be unpredictable
          due to route availability from BGP neighbors.</li>
          <li>In the presence of such varying origin ASes, it would be necessary
          for the resource holder to register ROAs <xref target="RFC9582" format="default"/> for each potential origin AS that
          may result from the expected aggregated AS_PATHs.</li>
        </ul>
      </section>
      <section anchor="consistent-brief" numbered="true" toc="default">
        <name>Recommendations to Mitigate Unpredictable AS_PATH Origins for RPKI-ROV Purposes</name>
        <t>To ensure a consistent BGP origin AS is announced for
        aggregate BGP routes for implementations of "brief" BGP aggregation, the
        implementation <bcp14>MUST</bcp14> be configured to truncate the AS_PATH after the
        right-most instance of the desired origin AS for the aggregate.
        The desired origin AS could be the aggregating AS itself.
        A ROA would be necessary for the aggregate prefix with the desired origin AS.</t>
        <t>This form of brief aggregation is referred to as "consistent
        brief" BGP aggregation.</t>
        <t>If the resulting AS_PATH would be truncated from the otherwise
        expected result of BGP AS_PATH aggregation (an AS_SET would not be
        generated and possibly some ASes are removed from the "longest leading sequence" of
        ASes), the ATOMIC_AGGREGATE Path Attribute <bcp14>SHOULD</bcp14> be attached.  This is
        consistent with the intent of <xref target="RFC4271" section="5.1.6" sectionFormat="comma" format="default"/>.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Operational Considerations</name>
      <t>This section provides advice to operators regarding deployment and configuration.</t>
      <section numbered="true" toc="default">
        <name>Implementing Consistent Brief Aggregation</name>
        <t>When aggregating prefixes, network operators <bcp14>MUST</bcp14> use
        consistent brief aggregation as described in
        <xref target="consistent-brief" format="default"/>.
        In consistent brief aggregation, the AGGREGATOR and ATOMIC_AGGREGATE
        Path Attributes are included, but the AS_PATH does not have AS_SET or
        AS_CONFED_SET path segment types.
        See <xref target="brief-agg-example" format="default"/> for examples of
        brief aggregation while keeping the origin AS unambiguous
        and generating appropriate ROAs.</t>
      </section>
      <section anchor="filtering-to-contributors" numbered="true" toc="default">
        <name>Not Advertising Aggregate Routes to Contributing ASes</name>
        <t>An aggregate prefix
        <bcp14>SHOULD NOT</bcp14> be announced to the contributing ASes. Instead, more specific
        prefixes (from the aggregate) <bcp14>SHOULD</bcp14> be announced to each contributing AS,
        excluding any that were learned from the contributing AS in
        consideration.  See <xref target="filter-example" format="default"/> for an example of
        this filtering policy.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Mitigating Forwarding Loops</name>
        <t>When both less specific and more specific destinations are present,
        it's possible to create forwarding loops between networks, as discussed in <xref target="RFC4632" section="5.1" format="default"/>.</t>
        <t>As a reminder, Rule #2 in <xref target="RFC4632" section="5.1" format="default"/>
        requires that BGP implementations performing aggregation discard
        packets that match the aggregate route but do not match any of the
        more specific routes.
        </t>
        <t>Further discussion of forwarding loops and their relationship to
        AS_SETs can be found in <xref target="forwarding-loop-discussion" format="default"/>.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>This document deprecates the use of aggregation techniques that create
      AS_SETs or AS_CONFED_SETs. Obsoleting these path segment types from BGP
      and the removal of the related code from implementations would potentially
      decrease the attack surface for BGP. Deployments of new BGP security
      technologies
      (e.g., <xref target="RFC6480" format="default"/>, <xref target="RFC6811" format="default"/>, and 
      <xref target="RFC8205" format="default"/>) benefit greatly if AS_SETs and AS_CONFED_SETs are not used in BGP.</t>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>

     <displayreference target="I-D.ietf-sidrops-aspa-verification" to="ASPA-VERIFICATION"/>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4632.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5065.xml"/>

     <referencegroup anchor="BCP172" target="https://www.rfc-editor.org/info/bcp172">
          <reference anchor="RFC6472" target="https://www.rfc-editor.org/info/rfc6472">
            <front>
              <title>Recommendation for Not Using AS_SET and AS_CONFED_SET in BGP</title>
              <author fullname="W. Kumari" initials="W." surname="Kumari"/>
              <author fullname="K. Sriram" initials="K." surname="Sriram"/>
              <date month="December" year="2011"/>
            </front>
	     <seriesInfo name="BCP" value="172"/>
            <seriesInfo name="RFC" value="6472"/>
            <seriesInfo name="DOI" value="10.17487/RFC6472"/>
          </reference>
	  </referencegroup>	
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6793.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7606.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3779.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6811.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6480.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9582.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6907.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8205.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9319.xml"/>

<!-- [I-D.ietf-sidrops-aspa-verification] draft-ietf-sidrops-aspa-verification-22  
IESG State: I-D Exists as of 04/21/25
-->      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-sidrops-aspa-verification.xml"/>

        <reference anchor="IANA-SP-ASN" target="https://www.iana.org/assignments/iana-as-numbers-special-registry">
          <front>
            <title>Special-Purpose Autonomous System (AS) Numbers</title>
            <author initials="" surname="">
              <organization>IANA</organization>
            </author>
            <date month="" year=""/>
          </front>
        </reference>
        <reference anchor="Analysis" target="https://github.com/ksriram25/IETF/blob/main/Detailed-AS_SET-analysis.txt">
          <front>
            <title>Detailed analysis of AS_SETs in BGP updates</title>
            <author>
              <organization/>
            </author>
            <date month="March" year="2022"/>
          </front>
          <refcontent>commit ef3f4a9</refcontent>
        </reference>
      </references>
    </references>
    <section anchor="filter-example" numbered="true" toc="default">
      <name>Example of Route Filtering for Aggregate Routes and Their Contributors</name>
      <t>	
       The illustration presented below shows how an AS_SET is not used when
       aggregating and how data plane route loops are avoided.
       Consider that p1/24 (from AS 64501), p2/24 (from AS 64502), p3/24 (from AS 64503),
       and p4/24 (from AS 64504) are aggregated by AS 64505 to p/22.
       AS_SET is not used with the aggregate p/22 but AGGREGATOR and ATOMIC AGGREGATE are used.
       Data plane route loops are avoided by not announcing the aggregate p/22
       to the contributing ASes, i.e., AS 64501, AS 64502, AS 64503, and AS 64504.
       Instead, as further illustrated, p1/24, p2/24, and p4/24 are announced to AS 64503.
       The routing tables (post aggregation) of each of the ASes are depicted in the diagram below.
      </t>

        <artwork type="ascii-art" align="center" name="" alt=""><![CDATA[
 (       )     (       )           (       )     (       )
( AS64501 )   ( AS64502 )         ( AS64503 )   ( AS64504 )
 (       )     (       )           (       )     (       )
   p1/24         p2/24               p3/24         p4/24
     |             |                   |             |
     |             +-->  (       )  <--+             |
     |                  ( AS64505 )                  |
     +---------------->  (       )  <----------------+
                            p/22
                             |
                             V

AS 64501                      AS 64502
==========================    ==========================
p1/24 AS_PATH ""              p1/24 AS_PATH "64505 64501"
p2/24 AS_PATH "64505 64502"   p2/24 AS_PATH ""
p3/24 AS_PATH "64505 64503"   p3/24 AS_PATH "64505 64503"
p4/24 AS_PATH "64505 64504"   p4/24 AS_PATH "64505 64504"


AS 64503                      AS 64504
==========================    ==========================
p1/24 AS_PATH "64505 64501"   p1/24 AS_PATH "64505 64501"
p2/24 AS_PATH "64505 64502"   p2/24 AS_PATH "64505 64502"
p3/24 AS_PATH ""              p3/24 AS_PATH "64505 64503"
p4/24 AS_PATH "64505 64504"   p4/24 AS_PATH ""

AS 64505
==========================
p/22  AS_PATH "" AGGREGATOR 64505 ATOMIC_AGGREGATE
p1/24 AS_PATH "64501"
p2/24 AS_PATH "64502"
p3/24 AS_PATH "64503"
p4/24 AS_PATH "64504"]]></artwork>

    </section>
    <section anchor="brief-agg-example" numbered="true" toc="default">
      <name>Examples of Consistent and Inconsistent BGP Origin AS Generated by Brief Aggregation</name>
      <t>
      The examples below illustrate how brief aggregation
      may result in an inconsistent origin AS.
      </t>
      <t>AS 64500 aggregates more specific routes into 192.0.2.0/24.</t>
      <t>Consider the following scenarios where brief aggregation is done
      by AS 64500 and what the resultant origin ASes would be.</t>

        <artwork type="ascii-art" align="left" name="" alt=""><![CDATA[
Routes:
R1 - 192.0.2.0/26   AS_PATH "64501"
R2 - 192.0.2.64/26  AS_PATH "64502"
R3 - 192.0.2.128/26 AS_PATH "64504 64502"
R4 - 192.0.2.192/26 AS_PATH "64504 64501"

           (       )                        (       )
          ( AS64501 )                      ( AS64502 )
           (       )                        (       )
192.0.2.0/26    192.0.2.192/26    192.0.2.128/26  192.0.2.64/26
     |                      |      |                 |
     |                      |      |                 |
     |                      \/    \/                 |
     |                     (        )                |
     |                    (  AS64504 )               |
     |                     (        )                |
     |                      |      |                 |
     |                   R4 |      | R3              |
     |                      |      |                 |
     |                      \/    \/                 |
     |             R1      (         )      R2       |
     +------------------->(  AS64500  )<-------------+
                           (         )
                                |
                                | (announcing
                                |  aggregate 192.0.2.0/24)
                               \/]]></artwork>

      <section numbered="true" toc="default">
       <name>Scenario 1: First one route, then another, each with a fully disjoint AS_PATH</name>
        <t>Receive R1. Aggregate 192.0.2.0/24 AS_PATH "64501"</t>
        <t>Alternate "bug?": Aggregate 192.0.2.0/24 AS_PATH "[ 64501 ]"</t>
        <t>(Note: AS numbers within square brackets represent an AS_SET.)</t>
        <t>Receive R2.  Aggregate 192.0.2.0/24 AS_PATH "[ 64501 64502 ]"</t>
        <t>If brief aggregation is in use, the AS_PATH would be truncated to
        the empty AS_PATH, "".</t>
        <t>The resulting AS_PATH is thus not stable and depends on the presence
        of specific routes.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Scenario 2: First one route, then another, and the AS_PATHs overlap at the origin AS</name>
        <t>Receive R1.  Aggregate 192.0.2.0/24 AS_PATH "64501"</t>
        <t>Receive R4.  Aggregate 192.0.2.0/24 AS_PATH "[ 64504 64501 ]"</t>
        <t>If brief aggregation is in use,  the AS_PATH is truncated to "".</t>
        <t>The resulting AS_PATH is thus not stable and depends on the presence
        of specific routes.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Scenario 3: First one route, then another, and the AS_PATHs overlap at the neighbor AS</name>
        <t>Receive R3.  Aggregate 192.0.2.0/24 AS_PATH "64504 64501"</t>
        <t>Receive R4.  Aggregate 192.0.2.0/24 AS_PATH "64504 [ 64501 64502 ]"</t>
        <t>If brief aggregation is in use, the AS_PATH is truncated to "64504".</t>
        <t>The resulting AS_PATH is thus not stable and depends on the presence
        of specific routes.</t>
      </section>
      <section numbered="true" toc="default">
        <name>Achieving Consistent Origin AS During Aggregation</name>
        <t>In the three scenarios above, the aggregating AS 64500 is using
        brief aggregation.  This results in inconsistent
        origin ASes as the contributing routes are learned.  This motivates the
        "consistent brief" BGP aggregation mentioned in
        <xref target="consistent-brief" format="default"/> and discussed further
        with examples below.</t>
        <t>The trivial solution to addressing the issue is to simply discard
        all of the ASes for the contributing routes. In simple BGP aggregation
        topologies, this is likely the correct thing to do.  The AS originating
        the aggregate, 192.0.2.0/24 in this example, is likely the resource
        holder for the route in question.  In such a case, simply originating
        the route to its BGP upstream neighbors in the Internet with its own
        AS, 64500, means that a consistent ROA
        could be registered in the RPKI for this prefix.  This satisfies the
        need for a consistent (unambiguous) origin AS.</t>
        <t>If the contributing ASes are themselves multihomed to the Internet
        outside of their connections to AS 64500, then additional ROAs would
        need to be created for each of the more specific prefixes.</t>
        <t>In more complex proxy aggregation scenarios, there may be a desire
        to permit some stable (i.e., common) portion of the contributing AS_PATHs to be kept in the
        aggregate route.  Consider the case for Scenario 3, where the neighbor
        AS is the same for both R3 and R4 -- AS 64504.  In such a case, an
        implementation may permit the aggregate's brief AS_PATH to be "64504", and
        a ROA would be created for the aggregate prefix with 64504 as the origin AS.
</t>
      </section>
    </section>
    <section anchor="forwarding-loop-discussion" numbered="true" toc="default">
      <name>Discussion on Forwarding Loops and AS_SETs</name>
      <t>Although BGP-4 was designed to carry Classless Inter-Domain Routing (CIDR) routes,
      <xref target="RFC4271" format="default"/> does not discuss the installation of "discard"
      or "null" routes when implementing its aggregation procedures.  Implementations
      could originate an aggregate prefix without a covering route
      for a more specific prefix (subsumed by the aggregate prefix) present in the local
      routing table.</t>
      <t>When aggregating more specific routes according to
      the aggregation procedures of <xref target="RFC4271" format="default"/>, the aggregating BGP
      speaker will place contributing routes into the generated AS_PATH, perhaps
      using AS_SETs.  As a result, a contributing AS will not install the
      aggregated route into its RIB since the route is an AS_PATH loop.  This
      provides a form of protection against forwarding loops created by BGP
      aggregation.</t>
      <t>When brief aggregation methods are used, a BGP speaker may receive a
      route containing a less specific destination covering a local more specific
      destination and install it in its routing table since it is not
      prevented from doing so by BGP AS_PATH loop detection. This gives rise to
      the possibility of forwarding loops. To help prevent forwarding loops,
      it is critical to adhere to the following:</t>

        <ol>
          <li>Rule #2 in <xref target="RFC4632" section="5.1" format="default"/>: </li>
	</ol>
	<blockquote>
          A router that generates an aggregate route for multiple,
          more-specific routes must discard packets that match the
          aggregate route, but not any of the more-specific routes.  In other
          words, the "next hop" for the aggregate route should be the null
        destination.</blockquote>
	<ol start="2">
        <li>Not advertising aggregate routes to contributing ASes
          as specified in <xref target="filtering-to-contributors" format="default"/>
          of this document (also see <xref target="filter-example" format="default"/>).</li>
	</ol>
    </section>
 <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank <contact fullname="Alvaro Retana"/>,
      <contact fullname="John Scudder"/>, <contact fullname="Ketan
      Talaulikar"/>, <contact fullname="Keyur Patel"/>, <contact
      fullname="Susan Hares"/>, <contact fullname="Claudio Jeker"/>, <contact
      fullname="Nick Hilliard"/>, <contact fullname="Robert Raszuk"/>,
      <contact fullname="John Heasley"/>, <contact fullname="Job Snijders"/>,
      <contact fullname="Jared Mauch"/>, <contact fullname="Jakob Heitz"/>,
      <contact fullname="Tony Przygienda"/>, <contact fullname="Douglas
      Montgomery"/>, <contact fullname="Randy Bush"/>, <contact
      fullname="Curtis Villamizar"/>, <contact fullname="Danny McPherson"/>,
      <contact fullname="Chris Morrow"/>, <contact fullname="Tom Petch"/>,
      <contact fullname="Ilya Varlashkin"/>, <contact fullname="Enke Chen"/>,
      <contact fullname="Tony Li"/>, <contact fullname="Florian Weimer"/>,
      <contact fullname="John Leslie"/>, <contact fullname="Paul Jakma"/>,
      <contact fullname="Rob Austein"/>, <contact fullname="Russ Housley"/>,
      <contact fullname="Sandra Murphy"/>, <contact fullname="Steven M.
      Bellovin"/>, <contact fullname="Steve Kent"/>, <contact fullname="Steve
      Padgett"/>, and <contact fullname="Alfred Hoenes"/> for comments and
      suggestions. The comments and suggestions received from the IESG
      reviewers are also much appreciated.
      </t>
    </section>
  </back>  
</rfc>
