Glossary

What is an ASN?

An ASN is the unique number that identifies an autonomous system on the internet. We cover 16- vs 32-bit, RIR assignment and its role in BGP.

Last updated:

An ASN (Autonomous System Number) is the unique number that identifies an autonomous system, meaning a network or group of IP networks operated by a single entity under one clearly defined routing policy. Any operator that wants to exchange routes on the internet on its own behalf needs its own ASN. The number works as a network identifier at the level of global routing and lets other autonomous systems tell unambiguously where packets come from and where they are headed.

What an autonomous system is

An autonomous system (AS) is a collection of IP prefixes under common administrative control that presents a consistent routing policy to the outside world. Typical examples include ISPs, large data centres, content providers and universities. What happens inside an AS is its own business and often relies on interior protocols such as OSPF or IS-IS. At the boundary with other networks, however, an AS speaks BGP, and its identity in that exchange is defined precisely by its ASN.

16-bit and 32-bit ASNs

Originally ASNs were 16-bit, giving a range from 0 to 65535. As the internet grew this pool began to run out, so 32-bit numbers were introduced, described in RFC 6793. They expanded the space to more than four billion values (0 to 4294967295). A 32-bit number can be written in asplain notation (for example 202520) or the older asdot notation (for example 3.5912). Modern hardware and BGP implementations support both formats, and 16-bit numbers are now simply a subset of the 32-bit space.

Assignment and public versus private numbers

ASNs are assigned hierarchically. IANA delegates blocks to the Regional Internet Registries (RIRs), which in turn allocate specific numbers to operators. In Europe and parts of Asia this is RIPE NCC, in North America ARIN, in the Asia Pacific region APNIC, in Latin America LACNIC and in Africa AFRINIC. To receive a public ASN a network usually has to demonstrate a need for multihoming or an independent routing policy.

  • Public ASNs: globally unique, used to exchange routes across the public internet.
  • Private ASNs: ranges 64512 to 65534 (16-bit) and 4200000000 to 4294967294 (32-bit), meant for internal use.
  • Reserved numbers: for example AS0, AS23456 (the 16/32-bit transition number) and AS65535.
  • Private ASNs must not leak into the global routing table and are usually stripped at the network edge.

The role of an ASN in BGP and how to look one up

In BGP the ASN is the basic unit of policy. Every route carries the AS_PATH attribute, a list of the autonomous systems a prefix advertisement has passed through. This lets BGP detect loops and select paths. The ASN also identifies the parties to a peering session and any transit relationships. To find out who owns a given number you can query the RIR whois database, use tools such as bgp.tools or PeeringDB, or run whois AS202520. For example, AS202520 is the ASN of the SkyPass network.

Frequently asked questions

Does every company need its own ASN?

No. You only need your own ASN once you want an independent routing policy or want to connect to multiple providers (multihoming). A single link from one ISP usually does not require an ASN.

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

16-bit ASNs fall in the range 0 to 65535, while 32-bit ASNs go up to 4294967295. Both formats coexist and are fully supported by modern hardware and BGP.

Where do you get a public ASN?

A public ASN is assigned by the relevant Regional Internet Registry (RIR), for example RIPE NCC in Europe, usually through membership or a sponsoring LIR.

How can I find out who owns a given ASN?

You can use the whois command, the relevant RIR database, or tools such as bgp.tools or PeeringDB. For example, AS202520 belongs to the SkyPass network.

Related articles