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.
2. ASN Number Space Ranges and Reservations
The IANA manages the allocation of 16-bit and 32-bit numbers according to strict RFC designations:
| ASN Range | Bit Length | RFC Standard | Designated Purpose | Global BGP Routability |
|---|---|---|---|---|
| 0 | 16-bit | RFC 7607 | Reserved (Identifies non-routed / invalid networks) | Non-routable (Never announced) |
| 1 - 64,495 | 16-bit | RFC 1930 | Public Internet 16-bit ASNs (Historically allocated) | Globally Routable |
| 64,496 - 64,511 | 16-bit | RFC 5398 | Reserved for Documentation and sample configs | Non-routable |
| 64,512 - 65,534 | 16-bit | RFC 6996 | Private ASNs (Enterprise internal / Cloud VPC peering) | Filtered at Internet edge |
| 65,535 | 16-bit | RFC 7300 | Reserved (Last 16-bit value) | Non-routable |
| 65,536 - 65,551 | 32-bit | RFC 5398 | Reserved for Documentation (32-bit) | Non-routable |
| 65,552 - 4,199,999,999 | 32-bit | RFC 6793 | Public Internet 32-bit ASNs (Modern allocations) | Globally Routable |
| 4,200,000,000 - 4,294,967,294 | 32-bit | RFC 6996 | Private 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:
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:
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