IP Addresses & Routing

Autonomous Systems and AS Numbers

Learn what an autonomous system is, who assigns AS numbers, which ranges are reserved and how to look up the network behind an address.

Key takeaways

  • An autonomous system is defined by a single routing policy, not by a company name or a physical location.
  • ASNs are handed out through IANA and five regional internet registries.
  • Some number ranges are reserved for private use and for documentation and should not appear on the public internet.
  • Public registry data and route tables let you find which AS originates an address, though that does not identify a person.

An autonomous system, or AS, is a network or group of networks that presents one consistent routing policy to the rest of the internet. Each AS that takes part in global routing has a unique number, the ASN, which other networks use to identify it when exchanging routes.

Your internet provider operates at least one. So do large cloud platforms, content networks, many universities and plenty of companies. When your traffic travels to a website, it usually passes through a chain of these systems, handed from one to the next.

What makes a network autonomous

"Autonomous" refers to control over routing decisions. The operator decides which neighbors to connect with, which routes to accept, which to advertise and which paths to prefer. Inside, it can use any interior routing protocol it likes. Outside, it speaks BGP.

The guidance in RFC 1930 is that a network needs its own AS when it has a routing policy distinct from its provider's. A business with one connection and no special policy generally does not: its addresses are announced as part of the provider's network.

An organization is not limited to one AS. Large operators sometimes hold several, often as a result of mergers or separate regional designs.

Types of autonomous system

Common roles an AS can play
Stub Connects to one other AS. Often does not need its own public number. Multihomed Connects to two or more providers for resilience, carrying only its own traffic. Transit Carries traffic between other networks, usually as a paid service. Content or cloud Originates much of the traffic and often peers widely. Stub Connects to one other AS. Often does not need its own public number. Multihomed Connects to two or more providers for resilience, carrying only its own traffic. Transit Carries traffic between other networks, usually as a paid service. Content or cloud Originates much of the traffic and often peers widely.

These are roles, not formal categories, and a single network can fit more than one. The commercial relationships behind them are covered in peering vs. transit, and the broad hierarchy in the internet backbone and network tiers.

How numbers are assigned

The Internet Assigned Numbers Authority (IANA) allocates blocks of ASNs to five regional internet registries (RIRs). The registries assign numbers to organizations in their regions:

Registry Region served, broadly
ARIN United States, Canada and parts of the Caribbean
RIPE NCC Europe, the Middle East and parts of Central Asia
APNIC Asia and the Pacific
LACNIC Latin America and parts of the Caribbean
AFRINIC Africa

To get one, an organization applies to its registry, or works through a sponsoring member, and typically shows why it needs a separate routing policy, for example that it will connect to more than one provider. Fees and requirements differ by registry and change over time, so check the registry's current rules.

How an organization joins global routing
1 Apply to a registry Directly or through a sponsoring member. 2 Receive ASN and addresses A unique number, plus space you may announce. 3 Arrange connections Contracts with providers or peers. 4 Configure BGP Originate your prefixes with filters in place. 5 Publish routing records Keep contacts and origin authorizations current. Apply to a registry Directly or through a sponsoring member. 1 Receive ASN and addresses A unique number, plus space you may announce. 2 Arrange connections Contracts with providers or peers. 3 Configure BGP Originate your prefixes with filters in place. 4 Publish routing records Keep contacts and origin authorizations current. 5

Two sizes of number

ASNs were originally 16 bits long, allowing values up to 65,535. As that supply ran short, RFC 6793 extended BGP to use 32-bit numbers, giving more than four billion. Routers that support the larger size announce that ability when a session opens. For older equipment, a placeholder value, 23456, known as AS_TRANS, stands in for a large number, while the real path is carried in an additional attribute.

You will see large ASNs written as plain integers, such as AS196608. Some older material uses a dotted form, but the plain style is the common recommendation.

Reserved ranges

Not every number is available for public use.

Numbers Purpose
0 Reserved; not to be used in routing
23456 AS_TRANS, for compatibility with 16-bit speakers
64496 to 64511 Documentation (RFC 5398)
64512 to 65534 Private use (RFC 6996)
65535 Reserved
65536 to 65551 Documentation (RFC 5398)
4200000000 to 4294967294 Private use (RFC 6996)
4294967295 Reserved

Private ASNs work like private IP addresses. A company can use them for BGP inside its own design, in a data center fabric, or toward a provider that agrees to it. They must be removed before routes reach the public internet, since many different organizations use the same values. Examples in articles and manuals should use the documentation ranges.

The AS path

When an AS originates a prefix, its number starts the AS path. Every AS that passes the route to another adds its own number. A path such as 64501 64502 64500 reads from the nearest network on the left to the origin on the right.

Networks use the path to reject loops and as one input to route selection. Operators sometimes repeat their own number several times in an announcement, called path prepending, to make a route look longer and so less attractive for inbound traffic. It is a blunt tool, because other networks apply their own preferences before looking at length.

A multihoming example

Say a regional company, using documentation numbers, holds AS 64496 and the prefix 203.0.113.0/24. It buys transit from two providers, AS 64497 and AS 64498. It announces the prefix to both.

Networks elsewhere now hear two paths: one reading 64497 64496 and another 64498 64496, each with more networks added in front as it travels. Each network picks whichever suits its policy. Some traffic arrives through the first provider and some through the second.

If the link to the first provider fails, the session drops and that path is withdrawn. After a short period of adjustment, everyone uses the second. The company keeps the same addresses throughout, which is the whole point: customers and partners do not need to learn anything new.

A multihomed company with its own AS number
AS 64496 Originates 203.0.113.0/24. Registry Holds the assignment and contacts Exchange peers Optional direct sessions Provider AS 64497 First transit link Provider AS 64498 Second transit link AS 64496 Originates 203.0.113.0/24. Provider AS 64497 First transit link Provider AS 64498 Second transit link Exchange peers Optional direct sessions Registry Holds the assignment and contacts

The company must also be careful not to become an accidental path between its providers. Its export filter should send only its own prefixes. Without that filter, routes learned from one provider could be passed to the other, and large volumes of traffic might try to squeeze through links never sized for it.

Looking up an AS

You can learn which network holds a number or originates an address.

On many Linux and macOS systems, the whois client queries registry data:

whois AS64500
whois -h whois.arin.net 192.0.2.1

The examples use documentation values, so the results will describe reserved space. Substitute the address or number you are researching. Registries also offer web search and RDAP, a structured successor to WHOIS. Routing databases and public looking glasses show which AS currently announces a prefix and what paths various networks see.

The published cloud prefix matcher can help when your question is whether an address belongs to a range that a cloud provider publishes.

Interpret the results with care:

  • Registry records show who was allocated a resource, which may differ from who uses it. Addresses are leased and sub-assigned.
  • A prefix originated by one AS may serve customers of many kinds.
  • Records can be outdated.
  • An ASN identifies a network, never an individual. What your IP address reveals explains the limits further.

Why ASNs matter to people who never run one

Troubleshooting. Some traceroute tools can label each hop with an AS number. If trouble begins where traffic crosses from one network to another, you know which relationship to ask about.

Security and abuse handling. Registry records list abuse contacts, which is where reports about attacks or spam from an address range usually go. Some filtering systems group traffic by AS. Blocking an entire network is blunt and can catch many innocent users.

Outages. News about a network "withdrawing its routes" refers to an AS ceasing to announce its prefixes, after which others cannot find a way in.

Resilience. A service hosted entirely inside one AS depends on that network's routing. Spreading across independent networks reduces that dependency at the cost of complexity.

What the number does not tell you

It is tempting to read an ASN as a label for a country, a company or a level of trustworthiness. Each of those shortcuts fails. A global network announces prefixes from many countries under one number. One company may use several numbers, and a customer of a hosting provider appears under the provider's number. A network with a good reputation can still host a compromised machine.

Treat the ASN as an answer to one narrow question: which routing domain is announcing this address block right now, as seen from a given viewpoint. For anything beyond that, such as who runs a particular server or where a visitor sits, you need other evidence, and often you will not be able to get it.

Trust and verification

Other networks cannot tell from a number alone whether an announcement is legitimate. Address holders can publish Route Origin Authorizations, signed records saying which AS may announce a given prefix, through RPKI. Networks that validate can then reject conflicting origins. Mistakes and abuse of announcements are covered in BGP hijacks and route leaks.

If you operate an AS, the basic duties are clear: keep registry contacts accurate, publish your origin authorizations, filter what you send and accept, and answer when someone reports a problem. The system works because most participants do those things.

Common questions

Does my home connection have an ASN?

No. Your traffic uses your provider's. Your public address sits within a prefix the provider announces.

Can I keep my ASN if I change providers?

Generally yes, when it was assigned to your organization by a registry, which is one reason to hold your own. The addresses move with you only if they are also yours and not on loan from the old provider.

Is a higher or lower number better?

Neither. The value has no ranking meaning. Lower numbers tend to be older assignments, and that is all it suggests.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in IP Addresses & Routing →

Latest news on this topic