What is an ASN? An ASN (Autonomous System Number) is a unique number that identifies a network with its own routing policy on the internet. Internet providers, data centers, cloud providers, universities and large companies announce their IP blocks to other networks under this number. For example, Google uses AS15169, Cloudflare AS13335 and Türk Telekom AS9121.
This guide explains what an autonomous system is, how an ASN works with BGP, the types of ASN and reserved ranges, how to look up an ASN and when you need your own.
What is an autonomous system (AS)?
The internet is not a single network but tens of thousands of independent networks connected to each other. Each of these networks is called an autonomous system: a network run by one organization, operating under a common routing policy and announcing one or more IP blocks (prefixes) to the internet. “Autonomous” means the network decides its own internal routing, and also decides how, and over which paths, it exchanges traffic with other networks.
The ASN is that network’s identity number. An IP address identifies a single device, while an ASN identifies the entire network that IP address belongs to.
How does an ASN work? Its relationship with BGP
Autonomous systems talk to each other using BGP (Border Gateway Protocol). Each AS announces “these IP blocks are mine” over the BGP sessions it has with neighbouring networks; as the announcement is passed from network to network, every AS number it crosses is added to the announcement’s AS_PATH attribute. A simplified example:
Prefix: 203.0.113.0/24
AS_PATH: 64500 64510 64520
This record shows that the 203.0.113.0/24 block is announced by AS64520 and that traffic can reach it through AS64500 and AS64510 (the numbers in the example are ASNs reserved for documentation). When routers see more than one path to the same block, they choose the best one using criteria such as AS_PATH length and the network’s own policies. For more on BGP itself, see our BGP article.
What is an ASN used for?
- Multihoming: You can announce the same IP blocks through more than one internet provider or data center. If one link fails, traffic keeps flowing over the other.
- Provider independence: Your IP addresses belong to you rather than your provider; you do not have to change addresses and DNS records when you change providers.
- Traffic engineering: You decide with your own routing policy which traffic enters and leaves over which link.
- Direct connections (peering): By setting up direct BGP sessions at internet exchange points (IX) or with other networks, you can reduce latency and transit costs.
Types of ASN: public, private, 16-bit and 32-bit
A public ASN is unique on the internet and is assigned by regional registries; it is required to announce IP blocks on the internet. A private ASN is used only inside your own network or in private BGP sessions with your provider and is never announced on the internet; like private IP addresses, it can be reused in different networks.
ASNs were originally 16 bits (0–65535). As that space began to run out, 32-bit ASNs were defined (RFC 6793), raising the total to about 4.29 billion. Most new assignments today are 32-bit, and nearly all current routers support them. 32-bit ASNs are usually written as plain numbers (asplain, e.g. 4200000001).
| Range | Purpose |
|---|---|
| 0 | Reserved, not used |
| 1 – 64495 | Public 16-bit ASNs |
| 23456 | AS_TRANS: compatibility with older routers that do not support 32-bit ASNs |
| 64496 – 64511 | Documentation and examples |
| 64512 – 65534 | Private ASN (16-bit) |
| 65535 | Reserved |
| 65536 – 65551 | Documentation and examples (32-bit) |
| 4200000000 – 4294967294 | Private ASN (32-bit) |
Who assigns ASNs?
Like IP addresses, ASNs are distributed by IANA to the regional internet registries (RIRs), which assign them to networks in their regions:
- RIPE NCC: Europe, the Middle East and Central Asia (Turkey is in this region)
- ARIN: North America
- APNIC: Asia-Pacific
- LACNIC: Latin America and the Caribbean
- AFRINIC: Africa
In the RIPE NCC region an ASN can be obtained either as an LIR (Local Internet Registry) that is a direct RIPE NCC member, or through a sponsoring LIR. The registry usually wants to see that the network will connect to more than one other network (multihoming) and will have its own routing policy.
Who needs their own ASN?
You usually need your own ASN if at least one of the following applies:
- You have, or will get, your own IP block (at least a /24 IPv4 or /48 IPv6) and will announce it on the internet,
- You will connect to more than one internet provider or data center for redundancy,
- You provide IP services to customers as a hosting, cloud or internet service provider,
- You want to peer directly at internet exchange points.
A website or application that rents a server from a single provider and uses the provider’s IP addresses does not need its own ASN; its traffic is carried under the provider’s ASN.
What you need to get and use an ASN
- Region: The registry for the region your network operates in (RIPE NCC for Turkey).
- IP block: At least one IPv4 (/24) or IPv6 (/48) block to announce. If you do not have your own block, a leased block can be used.
- Upstream connections: At least one, preferably two, providers willing to set up a BGP session.
- BGP-capable equipment: A router, or a server running software such as BIRD or FRRouting.
- Records: An
aut-numobject in the RIPE database androute/route6objects for the blocks you announce, plus RPKI ROA records stating which ASN may announce your blocks. Many large networks now filter announcements that have no valid ROA or contradict one.
How to look up an ASN
- whois: Run
whois AS13335in a terminal to see an ASN’s holder and registration details. To find which ASN an IP address belongs to, look at theoriginorOriginASline in the output ofwhois 1.1.1.1. - RIPEstat: RIPE NCC’s free tool shows the blocks an ASN announces, its neighbours and RPKI status.
- Looking glasses and BGP tools: Tools such as bgp.he.net list the prefixes and connections of ASNs.
ASN lease at Sunucun
Sunucun’s ASN lease service offers packages for the RIPE NCC, ARIN and APNIC regions, and setup is free on every package. If you need a block to announce, you can get a /24 or /22 with IPv4 lease and use your ASN over BGP with your server hosting (colocation) or dedicated server services. IP address structure and block sizes are explained in our what is IPv4 guide.
Frequently asked questions
What does ASN number mean?
An ASN is the unique identity number given to an autonomous system, that is, a network operating with its own routing policy. It is written with the “AS” prefix (e.g. AS13335).
What is the difference between an IP address and an ASN?
An IP address identifies a single device or interface. An ASN identifies the whole network that holds many IP blocks. Every public IP address is tied to an ASN that announces it on the internet.
Can a network have more than one ASN?
Yes. Large networks may use several ASNs for different regions, brands or routing policies. For small and medium networks a single ASN is usually enough.
Can a private ASN be used on the internet?
No. Private ASNs are used only in internal networks and private sessions with a provider; the provider strips them from routes announced to the internet.
Do I need my own IP block for an ASN?
An ASN only makes sense if you have an IP block to announce. The block can be assigned to you, or it can be a leased block you are authorized to announce.
If you are planning to build your own network, see the packages on the ASN lease page or send your requirements to our support team.
Categories
-
CentOS 7 guides
-
cPanel 19 guides
-
CyberPanel 18 guides
-
Operating Systems 80 guides
-
Juniper Networks 18 guides
-
Control Panels 49 guides
-
Linux 15 guides
-
MySQL 29 guides
-
Network 84 guides
-
Plesk Panel 12 guides
-
Virtual Servers 284 guides
-
SEO 2 guides
-
Cyber Security 5 guides
-
Technology 158 guides
-
VMware 38 guides
-
WordPress 19 guides
-
Artificial Intelligence 21 guides