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

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc4271 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY rfc4632 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4632.xml">
<!ENTITY rfc6793 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6793.xml">
<!ENTITY rfc5065 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5065.xml">
<!ENTITY rfc3779 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3779.xml">
<!ENTITY rfc6472 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6472.xml"> nbsp    "&#160;">
  <!ENTITY rfc9582 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9582.xml">
<!ENTITY rfc6480 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6480.xml"> zwsp   "&#8203;">
  <!ENTITY rfc6811 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6811.xml"> nbhy   "&#8209;">
  <!ENTITY rfc6907 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6907.xml">
<!ENTITY rfc7606 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7606.xml">
<!ENTITY rfc8205 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8205.xml">
<!ENTITY rfc8174 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY rfc9319 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9319.xml">
<!ENTITY I-D.ietf-sidrops-aspa-verification SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sidrops-aspa-verification.xml"> 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" updates="4271 number="9774" consensus="true" updates="4271, 5065" obsoletes="6472" ipr="trust200902">
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
  <?rfc toc="yes" ?>
  <?rfc symrefs="yes" ?>
  <?rfc sortrefs="yes"?>
  <?rfc iprnotified="no" ?>
  <?rfc strict="yes" ?>
  <?rfc compact="yes" ?>

  <!-- Don't put each section on its own page --> ipr="trust200902" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">

  <front>
    <title abbrev="AS_SET, AS_CONFED_SET use deprecation">Deprecation 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>US</country>
          <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>US</country>
          <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>US</country>
          <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="" />

  <!-- [rfced] Please insert any keywords (beyond those that appear in the
title) for use on http://www.rfc-editor.org/rfcsearch.html.
 BGP, BGP-4, Network Operator, RPKI, Aggregation, RPKI-based Route Origin Validation, RPKI-ROV --> 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 title="Introduction">

      <t>BCP 172 <xref target="RFC6472"></xref> makes a recommendation for numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="BCP172"/> recommends not
      using AS_SET (see <xref target="RFC4271"></xref>) target="RFC4271" format="default"/> and AS_CONFED_SET (see <xref target="RFC5065"></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 the
      possibility of any
      ambiguity about the origin AS in RPKI-based route origin
      validation Route Origin
      Validation (RPKI-ROV)
      <xref target="RFC6811"></xref> target="RFC6811" format="default"/> <xref target="RFC6907"/> target="RFC6907" format="default"/>
        <xref target="RFC9319"/>.</t> target="RFC9319" format="default"/>.</t>
      <t> The AS_SET path segment in the AS_PATH attribute (Sections 4.3 <xref
      target="RFC4271" sectionFormat="bare" section="4.3"/> and
      5.1.2 <xref
      target="RFC4271" sectionFormat="bare" section="5.1.2"/> of <xref target="RFC4271"></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 (see <xref target="RFC5065"/>) 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 (<xref target="RFC4271"/>, Section 9.1.2.2.). (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
      (<xref target="RFC6480"/>,
      (see <xref target="RFC6480" format="default"/>, <xref target="RFC6811"/>, target="RFC6811" format="default"/>, <xref target="RFC6907"/>, target="RFC6907" format="default"/>,
      <xref target="RFC8205"/>, target="RFC8205" format="default"/>, and <xref target="RFC9319"/>). 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"/>). 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"/>. 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"/>) <xref target="IANA-SP-ASN" format="default"/> is also somewhat frequent.</t>
    </section>
    <section title="Requirements Language">
      <t>The numbered="true" toc="default">
      <name>Requirements Language</name>
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", "<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
      "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP 14 BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/>
    when, and only when, they appear in all capitals, as shown here.</t> here.
        </t>

    </section>
    <section title="Updates anchor="recs" numbered="true" toc="default">
      <name>Updates to the Requirements of RFC RFCs 4271 and RFC 5065" anchor="recs"> 5065</name>
      <t>Unless explicitly configured by a network operator to do otherwise
         (e.g., during a transition phase), BGP speakers:
      </t>
      <ul>
          <li>MUST NOT
        <li><bcp14>MUST NOT</bcp14> advertise BGP UPDATE messages containing AS_SETs or AS_CONFED_SETs, AS_CONFED_SETs and</li>
          <li>Upon

        <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"/>, MUST use the "treat-as-withdraw" error handling
              behavior as per <xref target="RFC7606"/>.</li> target="RFC6793" format="default"/>.</li>
      </ul>
      </t>
      <t>Per the above specifications, this document updates RFC 4271 <xref target="RFC4271"/> and RFC 5065 <xref target="RFC5065"/>
      by deprecating AS_SET (see <xref target="RFC4271" section="4.3" sectionFormat="comma"/>) sectionFormat="comma" format="default"/>)
      and AS_CONFED_SET (see <xref target="RFC5065" section="3" sectionFormat="comma"/>), sectionFormat="comma" format="default"/>), respectively.</t>
    </section>
    <section title="Treatment numbered="true" toc="default">
      <name>Treatment of Routes with AS_SET in RPKI-based RPKI-Based BGP Security"> Security</name>
      <t>Resource Public Key Infrastructure (RPKI) <xref target="RFC6480"/> target="RFC6480" format="default"/> uses X.509
      extensions for IP addresses and AS identifiers <xref target="RFC3779"/>.
      RPKI-based Route Origin Validation (ROV) target="RFC3779" format="default"/>.
      RPKI-ROV <xref target="RFC6811"/> target="RFC6811" format="default"/> <xref target="RFC6907"/> 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"/> target="RFC8205" format="default"/> and Autonomous System Provider Authorization (ASPA)
      <xref target="I-D.ietf-sidrops-aspa-verification"/> 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 title="BGP AS_PATH &quot;Brief&quot; Aggregation">
        <t>
      Sections 9.1.4 numbered="true" toc="default">
      <name>BGP AS_PATH "Brief" Aggregation</name>
      <t>Sections <xref target="RFC4271" sectionFormat="bare"
      section="9.1.4"/> and 9.2.2.2 <xref target="RFC4271" sectionFormat="bare"
      section="9.2.2.2"/> of <xref target="RFC4271"/> target="RFC4271" format="default"/>
      describe BGP aggregation procedures.
      Appendix F.6 in  <xref target="RFC4271"/> 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"/>,
        describing sectionFormat="comma" format="default"/>
        describes the ATOMIC_AGGREGATE Path Attribute, 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, SHOULD <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"/>
        procedures, sectionFormat="comma" format="default"/>,
        and any resulting AS_SETs are discarded, this it is typically
        referred to as "brief" aggregation in implementations.
        Brief aggregation results in an AS_PATH that has the following property (from
        <xref target="RFC4271" section="9.2.2.2" sectionFormat="comma"/>):</t> sectionFormat="comma" format="default"/>):</t>
      <blockquote>
          <t>determine
        <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 title="Issues numbered="true" toc="default">
        <name>Issues with &quot;Brief&quot; "Brief" AS_PATH Aggregation and RPKI-ROV"> 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 an 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 Route
          Origin Authorizations (ROAs) ROAs <xref target="RFC9582"></xref> target="RFC9582" format="default"/> for each potential origin AS that
          may result from the expected aggregated AS_PATHs.</li>
        </ul>
      </section>
      <section title="Recommendations anchor="consistent-brief" numbered="true" toc="default">
        <name>Recommendations to Mitigate Unpredictable AS_PATH Origins for RPKI-ROV Purposes" anchor="consistent-brief"> Purposes</name>
        <t>To ensure a consistent BGP origin AS is announced for
        aggregate BGP routes for implementations of "brief" BGP aggregation, the
        implementation MUST <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 SHOULD <bcp14>SHOULD</bcp14> be attached.  This is
        consistent with the intent of <xref target="RFC4271" section="5.1.6" sectionFormat="comma"/>.</t> sectionFormat="comma" format="default"/>.</t>
      </section>
    </section>
    <section title="Operational Considerations"> numbered="true" toc="default">
      <name>Operational Considerations</name>
      <t>This section provides advice to operators regarding deployment and configuration.</t>
      <section title="Implementing numbered="true" toc="default">
        <name>Implementing Consistent Brief Aggregation"> Aggregation</name>
        <t>When aggregating prefixes, network operators MUST <bcp14>MUST</bcp14> use
        consistent brief aggregation as described in
        <xref target="consistent-brief"/>. 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"/> target="brief-agg-example" format="default"/> for examples of
        brief aggregation while keeping the origin AS unambiguous
        and generating appropriate ROAs.</t>
      </section>
      <section title="Not anchor="filtering-to-contributors" numbered="true" toc="default">
        <name>Not Advertising Aggregate Routes to Contributing ASes"
       anchor="filtering-to-contributors"> ASes</name>
        <t>An aggregate prefix
        SHOULD NOT
        <bcp14>SHOULD NOT</bcp14> be announced to the contributing ASes. Instead, more specific
        prefixes (from the aggregate) SHOULD <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"/> target="filter-example" format="default"/> for an example of
        this filtering policy.</t>
      </section>
      <section title="Mitigating numbered="true" toc="default">
        <name>Mitigating Forwarding Loops">
        <t>As discussed in <xref target="RFC4632" section="5.1"/>,
        the presence of Loops</name>
        <t>When both less specific and more specific destinations has
        the possibility are present,
        it's possible to create forwarding loops between networks.</t> networks, as discussed in <xref target="RFC4632" section="5.1" format="default"/>.</t>
        <t>As a reminder, Rule #2 of in <xref target="RFC4632" section="5.1"/> 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
        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"/>.</t> target="forwarding-loop-discussion" format="default"/>.</t>
      </section>
    </section>
    <section title="Security Considerations"> 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"/>, target="RFC6480" format="default"/>, <xref target="RFC6811"/>, target="RFC6811" format="default"/>, and
      <xref target="RFC8205"/>) target="RFC8205" format="default"/>) benefit greatly if AS_SETs and AS_CONFED_SETs are not used in BGP.</t>
    </section>
    <section title="IANA Considerations"> numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document requires has no IANA actions.</t>
    </section>

    <section title="Acknowledgements">
      <t>The authors would like to thank Alvaro Retana, John Scudder, Ketan Talaulikar,
      Keyur Patel, Susan Hares, Claudio Jeker, Nick Hilliard, Robert Raszuk,
      John Heasley, Job Snijders, Jared Mauch, Jakob Heitz, Tony Przygienda,
      Douglas Montgomery, Randy Bush, Curtis Villamizar, Danny McPherson, Chris Morrow,
      Tom Petch, Ilya Varlashkin, Enke Chen, Tony Li, Florian Weimer, John
      Leslie, Paul Jakma, Rob Austein, Russ Housley, Sandra Murphy, Steve
      Bellovin, Steve Kent, Steve Padgett, and Alfred Hoenes for
      comments and suggestions. The comments and suggestions received from the IESG reviewers are also much appreciated.

 </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      &rfc2119;
      &rfc4271;
      &rfc4632;
      &rfc5065;
      &rfc6472;
      &rfc6793;
      &rfc7606;
      &rfc8174;

     <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 title="Informative References">
      &rfc3779;
      &rfc6811;
      &rfc6480;
      &rfc9582;
      &rfc6907;
      &rfc8205;
      &rfc9319;
      &I-D.ietf-sidrops-aspa-verification;
      <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/iana-as-numbers-special-registry.xhtml"> target="https://www.iana.org/assignments/iana-as-numbers-special-registry">
          <front>
            <title>Special-Purpose Autonomous System (AS) Numbers</title>
            <author initials="" surname="">
              <organization />
              <organization>IANA</organization>
            </author>
            <date month="" year="" /> year=""/>
          </front>
        </reference>

<!-- [rfced] FYI: We updated the reference entry for [Analysis] to
match the guidance for referencing web-based public code repositories
in the Web Portion of the RFC Style Guide
(https://www.rfc-editor.org/styleguide/part2/#ref_repo).

Original:
   [Analysis] Hannachi, L. and K. Sriram, "Detailed analysis of AS_SETs
              in BGP updates", NIST Robust Inter-domain Routing Project
              Website , October 2019,
              <https://github.com/ksriram25/IETF/blob/main/Detailed-AS_SET-
              analysis.txt>.

Current:
   [Analysis] "Detailed analysis of AS_SETs in BGP updates", commit
              eb0fc22, March 2022,
              <https://github.com/ksriram25/IETF/blob/main/Detailed-
              AS_SET-analysis.txt>.
-->
        <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 initials="L." surname="Hannachi">
            <organization />
          </author>

          <author initials="K." surname="Sriram">
            <organization />
            <author>
              <organization/>
            </author>
            <date month="October" year="2019" /> month="March" year="2022"/>
          </front>

        <seriesInfo name="NIST Robust Inter-domain Routing Project Website" value="" />
          <refcontent>commit eb0fc22</refcontent>
        </reference>
      </references>
    </references>
    <section title="Example anchor="filter-example" numbered="true" toc="default">
      <name>Example of Route Filtering for Aggregate Routes and their Contributors"
             anchor="filter-example"> Their Contributors</name>
      <t>
       Presented here is an
       The illustration of presented below shows how an AS_SET is not used when
       aggregating and still data-plane 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
       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 illustration, 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>

      <artset>

        <artwork type="ascii-art" align="center">
          <![CDATA[ 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>
      </artset> "64504"]]></artwork>

    </section>
    <section title="Examples anchor="brief-agg-example" numbered="true" toc="default">
      <name>Examples of Consistent and Inconsistent BGP Origin-AS Origin AS Generated by Traditional Brief Aggregation" anchor="brief-agg-example"> Aggregation</name>
      <t>
      In the
      The examples below, it is illustrated below illustrate how traditional 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>

      <artset>

        <artwork type="ascii-art" align="left">
          <![CDATA[ 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>
      </artset>
                               \/]]></artwork>

      <section title="Scenario numbered="true" toc="default">
       <name>Scenario 1: First one route, then another, each with a fully disjoint AS_PATH"> 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 title="Scenario numbered="true" toc="default">
        <name>Scenario 2: First one route, then another, and the AS_PATHs overlap at the origin AS."> 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 title="Scenario numbered="true" toc="default">
        <name>Scenario 3: First one route, then another, and the AS_PATHs overlap at the neighbor AS"> AS</name>
        <t>Receive R3.  Aggregate 192.0.2.0/24 AS_PATH "64504 64501".</t> 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 title="Achieving numbered="true" toc="default">
        <name>Achieving Consistent Origin-AS Origin AS During Aggregation"> Aggregation</name>
        <t>In the three scenarios above, the aggregating AS 64500 is using
        traditional 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"/> 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 Route Origin Authorization (ROA) 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 title="Discussion anchor="forwarding-loop-discussion" numbered="true" toc="default">
      <name>Discussion on Forwarding Loops and AS_SETs"
     anchor="forwarding-loop-discussion"> AS_SETs</name>
      <t>Although BGP-4 was designed to carry CIDR Classless Inter-Domain Routing (CIDR) routes,
      <xref target="RFC4271"/> 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 more specific prefix (subsumed by the aggregate prefix) present in the local
      routing table.</t>
      <t>When aggregating more specific routes according to
      <xref target="RFC4271"/>
      the aggregation procedures, 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 such 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 of in <xref target="RFC4632" section="5.1"/>:
          "A 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."</li>
          <li> Not
        destination.</blockquote>
	<ol start="2">
        <li>Not advertising aggregate routes to contributing ASes
          as specified in <xref target="filtering-to-contributors"/> target="filtering-to-contributors" format="default"/>
          of this document (also see <xref target="filter-example"/>).</li> 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>

<!-- [rfced] Please review the "Inclusive Language" portion of the online
Style Guide <https://www.rfc-editor.org/styleguide/part2/#inclusive_language>
and let us know if any changes are needed.  Updates of this nature typically
result in more precise language, which is helpful for readers.

For example, please consider whether the following should be updated:

  - traditional

While the NIST website <https://web.archive.org/web/20250214092458/
https://www.nist.gov/nist-research-library/nist-technical-series-publications-
author-instructions#table1> indicates that this term is potentially biased, it
is also ambiguous. "Tradition" is a subjective term, as it is not the same
for everyone.

Note: JH suggested using "conventional".
-->

</rfc>