AS Macros Index - Browse AS-SETs and Routing Policy Objects

An AS-SET (AS macro) is a named collection of Autonomous System numbers used to define routing policy, simplifying BGP configuration by grouping related networks. Use robtex.com to explore and expand AS-SETs from all major Internet Routing Registries.

What is an AS Macro?

An AS-SET (commonly called AS macro) is an Internet Routing Registry (IRR) object that groups AS numbers together. They enable ISPs and network operators to express complex routing policy without enumerating every individual ASN in their BGP configurations.

Example: AS-GOOGLE includes AS15169 plus all Google-related ASNs. Instead of listing dozens of ASNs in BGP prefix filters, upstream providers reference the single AS-SET name. When Google adds a new ASN, they update the AS-SET once, and all providers automatically pick up the change during their next IRR synchronization.

AS macros solve a fundamental scaling problem in internet routing. Without them, every customer change would require manual filter updates at every upstream provider -- an approach that doesn't scale when networks have hundreds of customers, each with their own set of ASNs.

AS Macro Structure

AS-SETs can contain:

  • Individual AS numbers (e.g., AS15169, AS36040)
  • Other AS-SETs (nested, enabling hierarchical organization)
  • Scoped AS-SETs with source suffix (e.g., AS15169:AS-CUSTOMERS)

Naming conventions:

  • Standard AS-SETs start with the AS- prefix (e.g., AS-GOOGLE, AS-CLOUDFLARE, AS-HURRICANE)
  • Scoped AS-SETs use an ASN prefix with colon (e.g., AS3491:AS-CUSTOMERS-AP)
  • Names are case-insensitive but conventionally uppercase

Well-Known AS Macros

Some of the largest and most widely referenced AS-SETs in global routing:

  • AS-HURRICANE - Hurricane Electric (AS6939), one of the largest transit providers
  • AS-GOOGLE - Google's autonomous systems
  • AS-CLOUDFLARE - Cloudflare's global network
  • AS-MICROSOFT - Microsoft and Azure networks
  • AS-AMAZON - Amazon and AWS infrastructure
  • AS-PCH - Packet Clearing House, operates DNS root and IXP infrastructure
  • AS-AKAMAI - Akamai CDN networks

Where AS Macros are Registered

AS-SETs are maintained in Internet Routing Registries (IRRs), distributed databases that store routing policy information:

  • RADB - Routing Assets Database (widely used, operated by Merit Network)
  • RIPE - RIPE NCC's IRR (Europe, Middle East, Central Asia)
  • ARIN - American Registry for Internet Numbers IRR (North America)
  • APNIC - Asia-Pacific Network Information Centre IRR
  • AFRINIC - African Network Information Centre IRR
  • LACNIC - Latin America and Caribbean IRR
  • ALTDB - Alternative routing database
  • NTTCOM - NTT Communications' IRR
  • LEVEL3 - Formerly Level3/CenturyLink IRR (now Lumen)

When the same AS-SET name exists in multiple registries, the source registry determines which definition applies. Tools typically query all registries and merge results.

How AS Macros Work

  1. Definition - A network operator creates an AS-SET object in an IRR, specifying a maintainer and member list
  2. Membership - The object lists member ASNs and references to nested AS-SETs
  3. Expansion - Routing tools recursively expand all nested references to produce a flat list of every ASN included
  4. Filter generation - Upstream providers run tools like bgpq4 or IRRd to generate prefix filters from the expanded member list
  5. Application - The generated filters are applied to BGP sessions, controlling which prefixes are accepted from customers

This pipeline runs periodically (often every few hours) so that filter changes propagate automatically when AS-SET membership is updated.

Common Use Cases

Customer cone definition - ISPs define AS-CUSTOMERNAME containing all customer ASNs. The ISP's own AS-SET then references each customer's AS-SET, creating a hierarchy that accurately represents the transit relationship.

Peering policy - At Internet Exchange Points (IXPs), networks use AS-SETs to express which ASNs should be accepted in peering sessions. This prevents route leaks where a peer accidentally advertises prefixes from other networks.

Automated prefix filtering - Tools like bgpq4, IRRd, and irrpt read AS-SETs and generate BGP prefix-list or route-filter configurations for routers. This automation is essential for networks with hundreds of peers and customers.

Network documentation - AS-SETs serve as an authoritative, machine-readable record of which networks are part of a larger organization or service.

DDoS mitigation - Scrubbing centers use AS-SET expansion to validate that traffic destined for a customer's prefixes actually belongs to that customer's network cone.

How to Use AS Macro Lookup

Enter an AS-SET name (e.g., AS-GOOGLE or AS-CLOUDFLARE) in the search box to view:

  • Direct members - ASNs and nested AS-SETs listed in the object
  • Recursively expanded member list - All ASNs after resolving every nested reference
  • Reverse membership - Which AS-SETs reference this ASN or macro
  • IRR source and maintainer - Where the object is registered and who maintains it
  • WHOIS data - Full IRR object text with import/export policies

You can also look up an AS number (e.g., AS15169) to see which AS-SETs include it, revealing the network's organizational relationships and transit hierarchy.

-> Look up an AS macro on robtex.com

FAQ

What's the difference between an AS-SET and an AS number?
An AS number identifies a single autonomous system (network). An AS-SET is a container that groups multiple AS numbers and other AS-SETs together for routing policy purposes. Think of it as a named list that routing tools can expand.
How do I create an AS-SET?
Register it in an IRR (like RADB or your RIR's database). You need maintainer access and typically an AS number allocated to your organization. Creating the object requires RPSL (Routing Policy Specification Language) syntax.
Why are AS-SETs called "AS macros"?
Historical terminology from early internet routing. "Macro" describes their function -- one name expanding to many ASNs, similar to macros in programming languages. The terms AS-SET and AS macro are used interchangeably.
How often are AS-SETs updated?
Depends on the maintainer. Large transit providers may update customer AS-SETs multiple times daily. Smaller networks may update only when adding new customers. Some AS-SETs remain static for years if the member list doesn't change.
Can AS-SETs be nested infinitely?
Technically yes, but most expansion tools limit recursion depth (typically 10-20 levels) to prevent infinite loops from circular references. In practice, nesting rarely exceeds 3-4 levels.
What happens if an AS-SET contains a circular reference?
Expansion tools detect cycles and stop recursing when they encounter an AS-SET they've already visited. The final expanded list will include all reachable ASNs without entering an infinite loop.
How do I find which AS-SETs contain my ASN?
Search for your AS number here to see reverse membership -- all AS-SETs that include your ASN either directly or through nested expansion. This is useful for verifying that your transit providers have correctly added you to their customer AS-SETs.
What is RPSL?
Routing Policy Specification Language (RFC 2622) is the formal language used to describe routing policy objects in IRRs. AS-SET objects, aut-num objects, and route objects are all defined using RPSL syntax.
Why does my AS-SET show different results in different tools?
Different tools may query different IRR sources or use different recursion strategies. Some tools also cache results. Check which IRR source your tool is querying and ensure your AS-SET is registered in the appropriate registry.