What Is an ASN? Autonomous System Numbers Explained
An Autonomous System Number (ASN) identifies a network with a distinct external routing policy. BGP uses ASNs to describe the networks a route passes through and the network originating a prefix. An ASN identifies a routing domain; an IP address identifies an interface or endpoint.
AS, ASN, and IP prefix: different roles
An autonomous system (AS) is a network or group of networks that presents a clearly defined routing policy to other networks. Its ASN is the number used to identify that system. The distinction comes from RFC 1930.
| Item | What it identifies | Documentation example |
|---|---|---|
| AS | A routing domain with a common external policy | An operator’s network connected to two transit providers |
| ASN | That routing domain’s numeric identity | AS64496 |
| IP prefix | A block of addresses advertised as a route | 192.0.2.0/24 |
| IP address | An individual address within a prefix | 192.0.2.10 |
One AS can originate many prefixes, operate in multiple locations, and carry both IPv4 and IPv6 routes. An ASN does not specify how many addresses a network has. Use the CIDR chart to interpret prefix sizes.
The examples here use documentation-only addresses and ASNs. They are illustrations, not resources to configure on a production internet connection.
Where an ASN appears in BGP
BGP exchanges prefixes and route attributes. For a route exchanged between autonomous systems, the AS_PATH records AS numbers along the advertised path. A receiving router uses this information for loop detection and routing policy, as specified in RFC 4271.
Consider this simplified route at an external observer:
Prefix: 192.0.2.0/24
AS_PATH: 64498 64497 64496| Position in this AS_PATH | Interpretation |
|---|---|
Leftmost: 64498 | Neighboring AS that advertised the route to the observer |
Middle: 64497 | Intermediate AS through which the route was propagated |
Rightmost: 64496 | Origin AS for this prefix |
This example assumes an ordinary AS sequence without aggregation or confederations. An AS path describes routing information, not a packet-by-packet traceroute. Operators can repeat an ASN through AS-path prepending, and a shorter path does not automatically win over local policy.
An origin ASN is therefore useful evidence about an announcement, but it does not establish the registered holder of the addresses.
Public and private ASNs
Public ASNs are globally unique assignments used to identify networks in internet routing. IANA allocates number space to the Regional Internet Registries (RIRs), which issue ASNs under their regional policies. Check the IANA AS number registry for allocations and special-purpose reservations.
Private ASNs can be reused by unrelated networks. They are useful in data-center fabrics, labs, and customer-to-provider BGP arrangements where the provider removes the private number before exporting the route globally.
| Purpose | ASN range | Operational meaning |
|---|---|---|
| Private use, 16-bit range | 64512β65534 | Reusable locally; not a globally unique identity |
| Private use, 32-bit range | 4200000000β4294967294 | Larger private range for internal routing designs |
| Documentation, 16-bit range | 64496β64511 | Reserved for published examples |
| Documentation, 32-bit range | 65536β65551 | Reserved for published examples |
Private ranges are defined by RFC 6996; documentation ranges are defined by RFC 5398. These are selected special-purpose ranges, not a list of all assignable or reserved numbers.
Before exporting a route to the global internet, remove private ASNs from both AS_PATH and AS4_PATH. Agree with the upstream which public ASN will originate the exported route and ensure prefix authorizations match that origin. Do not assume the upstream strips private numbers automatically; confirm its policy and the resulting announcement.
16-bit and 32-bit numbers
The original BGP ASN field was 16 bits wide. RFC 6793 extended support to 32-bit, or four-octet, ASNs. The older range is contained within the larger number space; these are not separate identities that an operator needs for different IP versions.
The numeric space extends from 0 to 4294967295, but reserved ranges and special values are not available for ordinary public assignment. For example, 23456 is AS_TRANS, a compatibility placeholder for interaction with older BGP speakers. It is not a substitute for the actual assigned origin ASN.
For logs, inventory, and filters, prefer asplain, the decimal representation specified by RFC 5396. Older tools may show asdot notation:
asplain: 65536
asdot: 1.0Both denote the same number: 1 Γ 65536 + 0. A dotted ASN is not an IP address. Normalize representations before comparing registry objects, routing output, and configuration.
When your network needs its own ASN
Your own public ASN lets your network present an independent routing policy to other ASes. Common uses include multiple transit providers and direct peering. The relevant decision is who originates your routes and controls external routing policy, rather than whether you hold a particular prefix.
If one provider originates your space under its ASN, using public addresses does not by itself require a separate ASN. Likewise, a private BGP fabric does not by itself require a public ASN. Registration criteria differ by RIR; the ASN registration walkthrough covers that process.
When preparing an address plan, record the intended origin ASN alongside each prefix. If the origin will change, coordinate routing filters and authorizations before the change. IPv4 services covers obtaining address space; ASN assignment is a separate registry process.
Verify registration, announcement, and authorization separately
An ASN lookup and an IP lookup answer different questions. Keep these checks separate when troubleshooting a new or changed announcement:
| Check | Evidence | What it tells you |
|---|---|---|
| ASN registration | RIR aut-num or RDAP record | Registered ASN holder and contacts |
| Prefix registration | RIR address-resource record | Registered holder of the address block |
| Observed origin | BGP looking glass or route collector | Origin ASN visible from that observation point |
| Origin authorization | RPKI validation result | Whether the prefix, length, and origin match a covering ROA |
Use WHOIS and RDAP for registry queries. A registered ASN may have no routes visible at a particular collector. A prefix’s registered holder and its observed origin operator can legitimately differ when a provider announces the block.
RPKI origin validation evaluates the announcement against route origin authorizations. A valid result authorizes that origin for the prefix and permitted length; it does not validate the entire AS path. A not-found result means no covering authorization was found, rather than proving the announcement is unauthorized.