RFC 9774

Deprecation of AS_SET and AS_CONFED_SET in BGP

πŸ“… published May 2025, from ietf

RFC 9774 πŸ’– Deprecation of AS_SET and AS_CONFED_SET in BGP

okay bestie, this one is an IETF Standards Track doc πŸ‘‘, so it's a real, binding spec and not just a vibe. It was published in May 2025 under ISSN 2070-1721. The authors are W. Kumari (Google, Inc.), K. Sriram and L. Hannachi (USA NIST), and J. Haas (Juniper Networks, Inc.) πŸŽ€. It obsoletes RFC 6472 (so that one's officially retired πŸ’€) and updates RFC 4271 and RFC 5065 🌸.

Abstract ✨

okay so BCP 172 (aka RFC 6472) already recommends not using the AS_SET and AS_CONFED_SET AS_PATH segment types in BGP. this doc levels that up into a standards-level requirement and prohibits those two path segment types in the AS_PATH πŸ”₯. why? to make BGP simpler to design and implement, and to make it way clearer who the originator of a BGP route is 🧚. it also makes life easier for designing, implementing, and deploying BGP security mechanisms πŸ’….

specifically, this doc 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). and finally, it obsoletes RFC 6472 πŸ¦‹.

Status of This Memo

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc9774.

Copyright (c) 2025 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 (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.

Table of Contents πŸ—ΊοΈ

1.  Introduction
2.  Requirements Language
3.  Updates to the Requirements of RFCs 4271 and 5065
4.  Treatment of Routes with AS_SET in RPKI-Based BGP Security
5.  BGP AS_PATH "Brief" Aggregation
  5.1.  Issues with "Brief" AS_PATH Aggregation and RPKI-ROV
  5.2.  Recommendations to Mitigate Unpredictable AS_PATH Origins
        for RPKI-ROV Purposes
6.  Operational Considerations
  6.1.  Implementing Consistent Brief Aggregation
  6.2.  Not Advertising Aggregate Routes to Contributing ASes
  6.3.  Mitigating Forwarding Loops
7.  Security Considerations
8.  IANA Considerations
9.  References
  9.1.  Normative References
  9.2.  Informative References
Appendix A.  Example of Route Filtering for Aggregate Routes and
        Their Contributors
Appendix B.  Examples of Consistent and Inconsistent BGP Origin AS
        Generated by Brief Aggregation
  B.1.  Scenario 1: First one route, then another, each with a
        fully disjoint AS_PATH
  B.2.  Scenario 2: First one route, then another, and the AS_PATHs
        overlap at the origin AS
  B.3.  Scenario 3: First one route, then another, and the AS_PATHs
        overlap at the neighbor AS
  B.4.  Achieving Consistent Origin AS During Aggregation
Appendix C.  Discussion on Forwarding Loops and AS_SETs
Acknowledgements
Authors' Addresses

1. Introduction ✨

okay so [BCP172] says not to use the AS_SET [RFC4271] and AS_CONFED_SET [RFC5065] AS_PATH path segment types in the Border Gateway Protocol (BGP) πŸ“. this doc takes that BCP recommendation and turns it into a standards requirement in BGP. it prohibits the AS_SET and AS_CONFED_SET types of path segments in the AS_PATH πŸ”₯. the goal is to simplify BGP's design and implementation and make the originator of a BGP route way clearer. it also simplifies the design, implementation, and deployment of various BGP security mechanisms πŸ’–. the big one is that banning AS_SETs and AS_CONFED_SETs gets rid of any ambiguity about the origin AS in RPKI-based Route Origin Validation (RPKI-ROV) [RFC6811] [RFC6907] [RFC9319] πŸ‘‘.

the AS_SET path segment in the AS_PATH attribute (Sections 4.3 and 5.1.2 of [RFC4271]) gets created by a router that's doing route aggregation. it holds an unordered set of Autonomous Systems (ASes) that the contributing prefixes in the aggregate have gone through πŸ¦‹.

the AS_CONFED_SET path segment [RFC5065] in the AS_PATH attribute is also created by a router doing route aggregation. it holds an unordered set of Member AS Numbers in the local confederation that the contributing prefixes have gone through. it's super similar to an AS_SET, but it's used inside a confederation 🌸.

when a router aggregates, it's combining multiple BGP routes for more specific destinations into one new route for a less specific destination (see [RFC4271], Section 9.1.2.2) 🧚. aggregation can blur the semantics of the origin AS for the prefix being announced, because it produces an AS_SET or AS_CONFED_SET πŸ™ˆ. those sets can cause operational headaches, like not being able to authenticate a route origin for the aggregate prefix in newer BGP security tech, such as the stuff that uses X.509 extensions for IP addresses and AS identifiers (see [RFC6480], [RFC6811], [RFC6907], [RFC8205], and [RFC9319]). the result could be reachability problems for the destinations covered by the aggregated prefix πŸ’€.

from analyzing historical Internet routing data, it's clear that aggregation involving AS_SETs is very rarely used on the public Internet (see [Analysis]). when it does show up, it's often used incorrectly. having only a single AS in the AS_SET is the most common case [Analysis]. also, the same AS very often appears in both the AS_SEQUENCE and the AS_SET in the BGP update. reserved AS numbers [IANA-SP-ASN] also pop up somewhat frequently 😭.

2. Requirements Language 🫢

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

3. Updates to the Requirements of RFCs 4271 and 5065 πŸ“Œ

unless a network operator explicitly configures otherwise (e.g., during a transition phase), BGP speakers:

  • MUST NOT advertise BGP UPDATE messages containing AS_SETs or AS_CONFED_SETs and
  • MUST use the "treat-as-withdraw" error handling behavior per [RFC7606] upon reception of BGP UPDATE messages containing AS_SETs or AS_CONFED_SETs in the AS_PATH or AS4_PATH [RFC6793].

per the above specs, this doc updates [RFC4271] and [RFC5065] by deprecating AS_SET (see [RFC4271], Section 4.3) and AS_CONFED_SET (see [RFC5065], Section 3), respectively πŸ’….

4. Treatment of Routes with AS_SET in RPKI-Based BGP Security πŸ”

the Resource Public Key Infrastructure (RPKI) [RFC6480] uses X.509 extensions for IP addresses and AS identifiers [RFC3779] ✨. RPKI-ROV [RFC6811] [RFC6907] is a BGP security tech that never lets a route with AS_SET be considered Valid πŸ™…β€β™€οΈ. BGPsec [RFC8205] and Autonomous System Provider Authorization (ASPA) [ASPA-VERIFICATION] are also BGP security techs based on RPKI. BGPsec doesn't support AS_SETs. and in ASPA-based AS_PATH verification, a route with AS_SET is always considered Invalid, which makes it ineligible for route selection 😀.

5. BGP AS_PATH "Brief" Aggregation πŸŽ€

Sections 9.1.4 and 9.2.2.2 of [RFC4271] describe BGP aggregation procedures. Appendix F.6 of [RFC4271] describes a generally less utilized "Complex AS_PATH Aggregation" procedure 🧠.

[RFC4271], Section 5.1.6 describes the ATOMIC_AGGREGATE Path Attribute and says:

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. 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 include the ATOMIC_AGGREGATE attribute.

when BGP AS_PATH aggregation follows the procedures in [RFC4271], Section 9.2.2.2, and any resulting AS_SETs get thrown out, implementers usually call it "brief" aggregation 🌈. that's the term this doc uses too. so here, brief aggregation means what this section describes, which is different from consistent brief aggregation (covered in Section 5.2). brief aggregation gives you an AS_PATH with this property (from [RFC4271], Section 9.2.2.2):

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

the ATOMIC_AGGREGATE Path Attribute then gets attached to the BGP route if AS_SETs were dropped ⭐.

5.1. Issues with "Brief" AS_PATH Aggregation and RPKI-ROV πŸ™ˆ

okay so brief AS_PATH aggregation is nice because it doesn't include AS_SETs, BUT the aggregated AS_PATH can end up with an unpredictable origin AS 😡. that's because the aggregating AS may be different from the purported origin AS (for the aggregate), and that can vary for the reasons below. these unpredictable origin ASes can cause RPKI-ROV validation issues:

  • Depending on the contributing routes to the aggregate route, the resulting origin AS may vary.
  • The presence of expected contributing routes may be unpredictable due to route availability from BGP neighbors.
  • With those varying origin ASes, the resource holder would need to register ROAs [RFC9582] for each potential origin AS that may result from the expected aggregated AS_PATHs. that's a lot of ROAs, bestie πŸ’€

part 1 of 3 πŸŽ€

5.2. Recommendations to Mitigate Unpredictable AS_PATH Origins for RPKI-ROV Purposes πŸŽ€

Okay so, to keep the origin AS consistent for aggregate BGP routes when you're doing "brief" BGP aggregation, the implementation MUST 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. And a ROA would be necessary for the aggregate prefix with that desired origin AS. πŸ’…

This form of brief aggregation is referred to as "consistent brief" BGP aggregation. πŸ¦‹

If the resulting AS_PATH would be truncated from what you'd otherwise expect from BGP AS_PATH aggregation (an AS_SET would not be generated, and possibly some ASes get removed from the "longest leading sequence" of ASes), the ATOMIC_AGGREGATE Path Attribute SHOULD be attached. This lines up with what [RFC4271], Section 5.1.6 is going for. 🫢

6. Operational Considerations 🌸

This section is basically the advice column for operators, covering deployment and configuration. πŸ’–

6.1. Implementing Consistent Brief Aggregation 🧚

When you're aggregating prefixes, network operators MUST use consistent brief aggregation as described in Section 5.2. πŸ‘‘ 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 Appendix B for examples of brief aggregation that keep the origin AS unambiguous and generate appropriate ROAs. 🌈

6.2. Not Advertising Aggregate Routes to Contributing ASes πŸ™ˆ

An aggregate prefix SHOULD NOT be announced to the contributing ASes. πŸ’€ Instead, more specific prefixes (from the aggregate) SHOULD be announced to each contributing AS, excluding any that were learned from that contributing AS in the first place. πŸ”₯ See Appendix A for an example of this filtering policy. πŸ’œ

6.3. Mitigating Forwarding Loops πŸ”

When both less specific and more specific destinations are present, it's possible to create forwarding loops between networks. This is discussed in Section 5.1 of [RFC4632]. πŸŒ€

As a reminder, Rule #2 in Section 5.1 of [RFC4632] requires that BGP implementations performing aggregation discard packets that match the aggregate route but do not match any of the more specific routes. πŸ›‘

Further discussion of forwarding loops and how they relate to AS_SETs is in Appendix C. πŸ“š

7. Security Considerations πŸ”

This one is serious, bestie. 😭

This document deprecates the use of aggregation techniques that create AS_SETs or AS_CONFED_SETs. Obsoleting these path segment types from BGP, and removing the related code from implementations, would potentially decrease the attack surface for BGP. πŸ›‘οΈ Deployments of new BGP security technologies (e.g., [RFC6480], [RFC6811], and [RFC8205]) benefit greatly if AS_SETs and AS_CONFED_SETs are not used in BGP. πŸ‘‘

8. IANA Considerations 🌷

This document has no IANA actions. 🫧

9. References πŸ“–

9.1. Normative References πŸ’Ž

[BCP172]   Best Current Practice 172,
           <https://www.rfc-editor.org/info/bcp172>.
           At the time of writing, this BCP comprises the following:

           Kumari, W. and K. Sriram, "Recommendation for Not Using
           AS_SET and AS_CONFED_SET in BGP", BCP 172, RFC 6472,
           DOI 10.17487/RFC6472, December 2011,
           <https://www.rfc-editor.org/info/rfc6472>.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <https://www.rfc-editor.org/info/rfc2119>.

[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,
           <https://www.rfc-editor.org/info/rfc4271>.

[RFC4632]  Fuller, V. and T. Li, "Classless Inter-domain Routing
           (CIDR): The Internet Address Assignment and Aggregation
           Plan", BCP 122, RFC 4632, DOI 10.17487/RFC4632, August
           2006, <https://www.rfc-editor.org/info/rfc4632>.

[RFC5065]  Traina, P., McPherson, D., and J. Scudder, "Autonomous
           System Confederations for BGP", RFC 5065,
           DOI 10.17487/RFC5065, August 2007,
           <https://www.rfc-editor.org/info/rfc5065>.

[RFC6793]  Vohra, Q. and E. Chen, "BGP Support for Four-Octet
           Autonomous System (AS) Number Space", RFC 6793,
           DOI 10.17487/RFC6793, December 2012,
           <https://www.rfc-editor.org/info/rfc6793>.

[RFC7606]  Chen, E., Ed., Scudder, J., Ed., Mohapatra, P., and K.
           Patel, "Revised Error Handling for BGP UPDATE Messages",
           RFC 7606, DOI 10.17487/RFC7606, August 2015,
           <https://www.rfc-editor.org/info/rfc7606>.

[RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
           2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
           May 2017, <https://www.rfc-editor.org/info/rfc8174>.

9.2. Informative References 🌟

[Analysis] "Detailed analysis of AS_SETs in BGP updates", commit
           ef3f4a9, March 2022,
           <https://github.com/ksriram25/IETF/blob/main/Detailed-
           AS_SET-analysis.txt>.

[ASPA-VERIFICATION]
           Azimov, A., Bogomazov, E., Bush, R., Patel, K., Snijders,
           J., and K. Sriram, "BGP AS_PATH Verification Based on
           Autonomous System Provider Authorization (ASPA) Objects",
           Work in Progress, Internet-Draft, draft-ietf-sidrops-aspa-
           verification-22, 23 March 2025,
           <https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-
           aspa-verification-22>.

[IANA-SP-ASN]
           IANA, "Special-Purpose Autonomous System (AS) Numbers",
           <https://www.iana.org/assignments/iana-as-numbers-special-
           registry>.

[RFC3779]  Lynn, C., Kent, S., and K. Seo, "X.509 Extensions for IP
           Addresses and AS Identifiers", RFC 3779,
           DOI 10.17487/RFC3779, June 2004,
           <https://www.rfc-editor.org/info/rfc3779>.

[RFC6480]  Lepinski, M. and S. Kent, "An Infrastructure to Support
           Secure Internet Routing", RFC 6480, DOI 10.17487/RFC6480,
           February 2012, <https://www.rfc-editor.org/info/rfc6480>.

[RFC6811]  Mohapatra, P., Scudder, J., Ward, D., Bush, R., and R.
           Austein, "BGP Prefix Origin Validation", RFC 6811,
           DOI 10.17487/RFC6811, January 2013,
           <https://www.rfc-editor.org/info/rfc6811>.

[RFC6907]  Manderson, T., Sriram, K., and R. White, "Use Cases and
           Interpretations of Resource Public Key Infrastructure
           (RPKI) Objects for Issuers and Relying Parties", RFC 6907,
           DOI 10.17487/RFC6907, March 2013,
           <https://www.rfc-editor.org/info/rfc6907>.

[RFC8205]  Lepinski, M., Ed. and K. Sriram, Ed., "BGPsec Protocol
           Specification", RFC 8205, DOI 10.17487/RFC8205, September
           2017, <https://www.rfc-editor.org/info/rfc8205>.

[RFC9319]  Gilad, Y., Goldberg, S., Sriram, K., Snijders, J., and B.
           Maddison, "The Use of maxLength in the Resource Public Key
           Infrastructure (RPKI)", BCP 185, RFC 9319,
           DOI 10.17487/RFC9319, October 2022,
           <https://www.rfc-editor.org/info/rfc9319>.

[RFC9582]  Snijders, J., Maddison, B., Lepinski, M., Kong, D., and S.
           Kent, "A Profile for Route Origin Authorizations (ROAs)",
           RFC 9582, DOI 10.17487/RFC9582, May 2024,
           <https://www.rfc-editor.org/info/rfc9582>.

Appendix A. Example of Route Filtering for Aggregate Routes and Their Contributors 🧩

This illustration shows how an AS_SET is not used when aggregating, and how data plane route loops get avoided. πŸ™Œ Picture it like this: 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 into 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 the diagram shows, 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. πŸ‘€

      (       )     (       )           (       )     (       )
     ( 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"

Appendix B. Examples of Consistent and Inconsistent BGP Origin AS Generated by Brief Aggregation πŸ”

The examples below show how brief aggregation may result in an inconsistent origin AS. 🫣

AS 64500 aggregates more specific routes into 192.0.2.0/24. πŸŽ€

Consider the following scenarios, where brief aggregation is done by AS 64500, and check out what the resultant origin ASes would be. πŸ’…

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)
                               \/

B.1. Scenario 1: First one route, then another, each with a fully disjoint AS_PATH ✨

okay so bestie, scenario 1 is giving "two routes walk into a bar" 🍸. First we receive R1, aggregating 192.0.2.0/24 with an AS_PATH of just "64501":

Receive R1.  Aggregate 192.0.2.0/24 AS_PATH "64501"

Then there's the sus alternate timeline where the same aggregate shows up with "[ 64501 ]". Square brackets mean AS_SET, so that's a whole set instead of a plain sequence 🧐.

Alternate "bug?": Aggregate 192.0.2.0/24 AS_PATH "[ 64501 ]"

Next, R2 shows up with "[ 64501 64502 ]":

Receive R2.  Aggregate 192.0.2.0/24 AS_PATH "[ 64501 64502 ]"

If brief aggregation is in use, the AS_PATH gets trimmed all the way down to the empty AS_PATH, "" πŸ’€.

The result is NOT stable. The AS_PATH changes depending on which specific routes are around, and that's the whole problem 😭.


B.2. Scenario 2: First one route, then another, and the AS_PATHs overlap at the origin AS 🌸

Scenario 2 starts with R1 again, same aggregate, "64501":

Receive R1.  Aggregate 192.0.2.0/24 AS_PATH "64501"

Then R4 arrives, and this time the AS_PATH is "[ 64504 64501 ]". Notice that 64501 is the origin AS in both routes, so they overlap there πŸ‘€:

Receive R4.  Aggregate 192.0.2.0/24 AS_PATH "[ 64504 64501 ]"

With brief aggregation, the AS_PATH gets truncated to "".

Same plot twist as before: the result is not stable and depends on which specific routes are present πŸ₯².


B.3. Scenario 3: First one route, then another, and the AS_PATHs overlap at the neighbor AS πŸ¦‹

In scenario 3, R3 comes in first with the AS_PATH "64504 64501":

Receive R3.  Aggregate 192.0.2.0/24 AS_PATH "64504 64501"

Then R4 shows up with "64504 [ 64501 64502 ]". This time the overlap is at the neighbor AS, which is 64504 in both 🀝:

Receive R4.  Aggregate 192.0.2.0/24 AS_PATH "64504 [ 64501 64502 ]"

With brief aggregation, the AS_PATH is truncated to "64504".

And yep, you guessed it: the resulting AS_PATH is still not stable and depends on the presence of specific routes πŸ’œ.


B.4. Achieving Consistent Origin AS During Aggregation πŸ‘‘

In all three scenarios above, the aggregating AS 64500 is using brief aggregation. That's why the origin AS keeps changing as the contributing routes get learned. This is literally the reason we want the "consistent brief" BGP aggregation from Section 5.2, which we'll dig into with examples below πŸŽ€.

The trivial fix is to just throw away all of the ASes from the contributing routes. In simple BGP aggregation topologies this is probably the right move βœ…. The AS originating the aggregate (192.0.2.0/24 in this example) is most likely the resource holder for that route. So if it originates the route to its BGP upstream neighbors with its own AS, 64500, then a consistent ROA can be registered in the RPKI for that prefix. Boom, you get a consistent, unambiguous origin AS 🫢.

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. ⚠️

In more complicated proxy aggregation scenarios, someone might want to keep some stable (aka common) part of the contributing AS_PATHs inside the aggregate route 🧩. Take scenario 3, where the neighbor AS is the same for both R3 and R4, which is AS 64504. In that case, an implementation may let the aggregate's brief AS_PATH be "64504", and a ROA would be created for the aggregate prefix with 64504 as the origin AS πŸ’–.


Appendix C. Discussion on Forwarding Loops and AS_SETs 🌈

Okay so BGP-4 was built to carry Classless Inter-Domain Routing (CIDR) routes, but [RFC4271] doesn't say anything about installing "discard" or "null" routes when it runs its aggregation procedures πŸ€·β€β™€οΈ. That means an implementation could originate an aggregate prefix even when there's no covering route for a more specific prefix (one subsumed by the aggregate prefix) in the local routing table.

When aggregating more specific routes using the aggregation procedures of [RFC4271], the aggregating BGP speaker puts the contributing routes into the generated AS_PATH, maybe using AS_SETs 🧠. So a contributing AS won't install the aggregated route into its RIB, because the route is an AS_PATH loop. That's a built-in form of protection against forwarding loops created by BGP aggregation πŸ›‘οΈ.

Now, when brief aggregation is used, a BGP speaker might get a route with a less specific destination that covers a local more specific destination. It can install that route in its routing table, since AS_PATH loop detection doesn't stop it 😬. That's how forwarding loops become possible. To help prevent them, it is critical to follow these two things:

  1. Rule #2 in Section 5.1 of [RFC4632]:
|  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.
  1. Not advertising aggregate routes to contributing ASes as specified in Section 6.2 of this document (also see Appendix A) πŸ™…β€β™€οΈ.

Acknowledgements 🫢

The authors would like to give a huge thank you to 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, Steven M. Bellovin, Steve Kent, Steve Padgett, and Alfred Hoenes for their comments and suggestions πŸ’…. The comments and suggestions from the IESG reviewers are also very much appreciated 🌸.


Authors' Addresses πŸ’Œ

Warren Kumari
Google, Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
United States of America
Phone: +1 571 748 4373
Email: warren@kumari.net
Kotikalapudi Sriram
USA NIST
100 Bureau Drive
Gaithersburg, MD 20899
United States of America
Phone: +1 301 975 3973
Email: ksriram@nist.gov
Lilia Hannachi
USA NIST
100 Bureau Drive
Gaithersburg, MD 20899
United States of America
Phone: +1 301 975 3259
Email: lilia.hannachi@nist.gov
Jeffrey Haas
Juniper Networks, Inc.
1133 Innovation Way
Sunnyvale, CA 94089
United States of America
Email: jhaas@juniper.net
πŸ“¦ where this page comes from