Verified: 2026-10-17By Alex Chen (Lead BGP Architect)RFC 1930 & RFC 42719 Min Read

What Is an Autonomous System Number (ASN) and How BGP Uses It

A definitive engineering guide to Autonomous Systems, exploring how the Border Gateway Protocol (BGP) uses ASNs to route traffic across the global Internet backbone.

Quick Answer

An Autonomous System Number (ASN) is a globally unique 16-bit or 32-bit identifier assigned by Regional Internet Registries to a network operating under a single routing policy. The Border Gateway Protocol (BGP) uses the ASN in the AS-Path attribute to determine optimal transit paths and prevent infinite routing loops across Tier-1 backbones.

  • Core BGP Attribute: AS-Path tracks every network an IP route traverses, preventing routing loops.
  • 32-Bit Expansion: RFC 6793 expanded ASN capacity from 65,535 to over 4.29 billion numbers.
  • Multi-Homing Trigger: Companies acquire an ASN when connecting to multiple ISPs for high-availability BGP failover.

1. The Role of the Autonomous System in Global Routing

The Internet is not a monolithic network; it is a global mesh of more than 75,000 independently operated networks called Autonomous Systems.

Autonomous System Definition:A connected group of IP prefixes managed by a single technical team (RFC 1930).
Border Gateway Protocol (eBGP):The path-vector protocol used to exchange routing tables between adjacent ASNs.
AS-Path Loop Prevention:If router sees its own ASN in an incoming AS-Path, the route is immediately dropped.

2. ASN Number Space Ranges and Reservations

The IANA manages the allocation of 16-bit and 32-bit numbers according to strict RFC designations:

Complete IANA Autonomous System Number (ASN) Allocation Registry
ASN RangeBit LengthRFC StandardDesignated PurposeGlobal BGP Routability
016-bitRFC 7607Reserved (Identifies non-routed / invalid networks)Non-routable (Never announced)
1 - 64,49516-bitRFC 1930Public Internet 16-bit ASNs (Historically allocated)Globally Routable
64,496 - 64,51116-bitRFC 5398Reserved for Documentation and sample configsNon-routable
64,512 - 65,53416-bitRFC 6996Private ASNs (Enterprise internal / Cloud VPC peering)Filtered at Internet edge
65,53516-bitRFC 7300Reserved (Last 16-bit value)Non-routable
65,536 - 65,55132-bitRFC 5398Reserved for Documentation (32-bit)Non-routable
65,552 - 4,199,999,99932-bitRFC 6793Public Internet 32-bit ASNs (Modern allocations)Globally Routable
4,200,000,000 - 4,294,967,29432-bitRFC 6996Private ASNs (Expanded 32-bit private block)Filtered at Internet edge

Public vs Private ASN Requirement Decision Tree


                 [ Organization Evaluates ASN Requirements ]
                                      |
                     +----------------+----------------+
                     |                                 |
           [ Single ISP Connection ]        [ Multi-Homed to 2+ ISPs ]
           Default gateway from ISP         Requires redundant failover
           No BGP peering needed            Owns /24 IPv4 or /48 IPv6
                     |                                 |
           [ No Public ASN Needed ]            [ Public ASN Required ]
           ISP handles all routing          Request from ARIN / RIPE
           Uses ISP's upstream ASN          Establish eBGP peering sessions
                     |                                 |
                     +----------------+----------------+
                                      |
                        [ Internal Cloud / Private BGP ]
                        Use Private ASN: 64512 - 65534
                        AWS Direct Connect / Azure ExpressRoute

3. How BGP Uses AS-Path to Prevent Routing Loops

BGP is fundamentally a path-vector routing protocol. When an Autonomous System originates a prefix, it prepends its own ASN to the AS-Path attribute:

Origin Network (Cloudflare):Announces 1.1.1.0/24 with AS-Path: [13335]
Transit Hop 1 (Telia / Arelion):Prepends AS1299 -> AS-Path: [1299, 13335]
Transit Hop 2 (Local ISP):Prepends AS7922 -> AS-Path: [7922, 1299, 13335]

If AS13335 were to receive a route advertisement containing [... 13335 ...] anywhere in the array, it knows the packet has circled back to its origin and immediately drops the path, eliminating routing loops.

4. Practical Diagnostics: Querying ASN via CLI and DNS

Lookup the ASN and announcing organization for any IP address:

Team Cymru DNS ASN Query:dig +short 1.1.1.1.origin.asn.cymru.com TXT // Returns "13335 | 1.1.1.0/24 | AU"
Detailed ASN Organization WHOIS:whois -h whois.radb.net "AS13335" | grep -i "as-name"

Frequently Asked Questions

What is the exact definition of an Autonomous System (AS)?

Standardized by RFC 1930 and RFC 4271, an Autonomous System is a connected group of one or more IP prefixes managed by a single administrative entity that maintains a single, coherent routing policy presented to the global Internet via the Border Gateway Protocol (BGP).

What is the difference between a 16-bit ASN and a 32-bit ASN?

Originally, ASNs were 16-bit integers supporting 65,535 total numbers. As the Internet grew, 16-bit public ASNs neared exhaustion. RFC 6793 expanded the ASN space to 32-bit integers, providing over 4.29 billion unique ASNs. Modern networks standardly use 32-bit numbers formatted in plain integer notation (e.g. AS13335 or AS394021).

When does a business need its own public ASN?

An organization needs its own public ASN when it becomes multi-homed—connecting to two or more independent upstream Internet Service Providers—and announces its own Provider Independent (PI) IP prefix (/24 or larger) via BGP to maintain automated failover and optimal route engineering.

What are Private ASNs (RFC 6996) and where are they used?

Private ASNs (such as 64512–65534 in 16-bit and 4200000000–4294967294 in 32-bit) are reserved for internal, non-routable BGP peering. They are standardly deployed within corporate enterprise backbones, AWS Direct Connect virtual interfaces, and Azure ExpressRoute circuits.

Data & Technical Sources

  • IETF RFC 1930 — Guidelines for Creation, Selection, and Registration of an Autonomous System (AS)
  • IETF RFC 4271 — A Border Gateway Protocol 4 (BGP-4 Specification)
  • IETF RFC 6793 — BGP Support for Four-Octet Autonomous System (AS) Number Space
  • IETF RFC 6996 — Autonomous System (AS) Numbers for Private Use