
What Is ASN? Autonomous System Numbers Explained
What is ASN? ASN stands for Autonomous System Number. It is a unique number given to a network, or a group of networks, that is run by one organisation under a single routing policy. Every internet service provider, large cloud company, university, and government network that connects directly to the internet has its own ASN, and that number is how the rest of the internet identifies it.
In this guide, we explain what an ASN is, how it works with BGP routing, the difference between public and private ASNs, and how to look up the ASN for any IP address. You will also learn why ASNs matter for security, and what happens when routing goes wrong.
What Is an Autonomous System?
An autonomous system (AS) is a collection of IP networks and routers that are under the control of one organisation and share a common routing policy. A small home network is not an autonomous system, because it does not route traffic for others. A large ISP, a cloud provider such as Amazon or Google, or a university with its own connections to several ISPs, is an autonomous system.
Think of the internet as a set of independent networks that agree to exchange traffic. Each autonomous system is one of those networks. It decides, within its own borders, how to route traffic to its customers. Between autonomous systems, it uses a protocol called BGP to tell other networks which IP addresses it can reach, and how to get there.
The ASN is simply the number that identifies that autonomous system. It is like a licence plate for a network. When a router receives a BGP announcement, it can see which ASN the announcement came from, and which ASNs it passed through on the way.
How ASN Numbers Are Assigned
ASNs are assigned by regional internet registries (RIRs), such as ARIN in North America, RIPE NCC in Europe, and APNIC in Asia-Pacific. An organisation applies for an ASN when it needs to connect to the internet through more than one ISP, or when it needs to run its own BGP routing.
There are two kinds of ASN. Public ASNs are globally unique, and are needed for any network that exchanges BGP routes on the public internet. Private ASNs are for internal use only, for example inside a company network that uses BGP between sites, and must not appear on the public internet.
ASNs come in two formats. The older 16-bit format supports numbers from 0 to 65,535. The newer 32-bit format supports numbers from 0 to 4,294,967,295, and is written in a dotted form, such as AS131072. Most new allocations are 32-bit, and the 16-bit range has largely run out.
Now that you know what an ASN is, the next question is how it is used in practice. The answer is almost always BGP, the Border Gateway Protocol.
How ASN Works with BGP
BGP is the protocol that autonomous systems use to exchange routing information. When an autonomous system wants to tell the internet that it can reach a set of IP addresses, it sends a BGP announcement that includes the IP prefix, its own ASN, and the AS path, which is the list of ASNs the announcement has passed through.
Routers use the AS path to choose the best route and to avoid loops. If a router sees its own ASN in the path, it knows the announcement has already passed through it, and it will not accept it again. The path also helps networks choose a shorter or more trusted route when several routes are available.
BGP is a policy-based protocol. An autonomous system can choose which routes to accept, which to share, and which to hide. An ISP, for example, will share routes to its customers with the rest of the internet, but it will not normally share routes between two other ISPs, because it does not want to carry traffic for free between competitors.
Types of Autonomous System
| Type | Examples | What it does |
|---|---|---|
| Transit ISP | Large ISPs, Tier 1 carriers | Carries traffic between other networks |
| Access ISP | Local broadband providers | Connects homes and businesses |
| Content provider | Google, Meta, Cloudflare | Delivers content and services |
| Enterprise | Banks, universities, large firms | Connects its own sites and users |
| Cloud provider | AWS, Azure, Google Cloud | Hosts services and customer workloads |
The type matters because it shapes routing policy. A content provider wants fast, direct paths to users. A transit ISP wants to sell capacity. An enterprise usually wants redundancy: two ISP connections, so that if one fails, traffic can use the other. That is one of the main reasons an organisation applies for its own ASN.
How to Look Up an ASN
You can find the ASN for any IP address with a free lookup tool. Enter the IP address, and the tool will show the ASN, the organisation that owns it, and the country where it is registered. Common tools include the ARIN Whois service, RIPEstat, BGPView, and the lookup pages run by Cloudflare and other providers. For example, if you look up the IP address of cloud-security-tips.com, you will see the ASN of its hosting provider. That tells you which network serves the site, even if the site owner is a different company.
You can also find ASNs from a domain name, by first resolving the domain to an IP address and then looking that IP address up. Network engineers use this when they are troubleshooting a slow site, checking whether traffic is going through the expected network, or investigating a suspicious IP address. If an IP address belongs to an ASN that has a poor reputation, or is in an unexpected country, that is a useful signal. Understanding the network behind an address is similar to understanding the protocol behind a connection: our guide to IPsec explains how one common protocol protects traffic in transit.
ASN vs IP Address: What Is the Difference?
An IP address identifies a single device or a single network interface. An ASN identifies a whole autonomous system, which can contain thousands or millions of IP addresses. An IP address can change when a device moves, but an ASN usually stays with an organisation for years. Think of an IP address as a house number, and an ASN as the name of the town. Both are needed to find the house, but they describe different things.
Another difference is scope. IP addresses are assigned to devices and networks for communication. ASNs are assigned to organisations for routing policy. A small company may use IP addresses from its ISP without having an ASN at all. A large company with its own ASN may use IP addresses from its own allocation, and keep them even if it changes ISP.
ASNs are not only a routing detail. They also affect security. When you know the ASN behind an IP address, you can judge the traffic more accurately, set firewall rules by ASN, and spot abuse that comes from a network with a poor reputation. Many security teams block or rate-limit traffic from ASNs that are known for spam, scanning, or hosting malicious sites, while allowing traffic from trusted ISPs and cloud providers.
Why ASN Matters for Security
BGP was designed in an era when networks trusted each other, and it still relies on that trust. A network announces which IP prefixes it can reach, and other networks believe it. That trust can be abused. In a BGP hijack, a network announces IP prefixes that belong to someone else, and traffic meant for the real owner is sent to the attacker instead. High-profile hijacks have redirected traffic for banks, cryptocurrency services, and government sites.
BGP leaks are a related problem. A network may accidentally announce routes it should not share, for example routes learned from one ISP to another ISP. The result is that traffic is sent through a network that cannot handle it, causing outages or slow service. Large leaks have taken major services offline, even when no one intended harm.
To reduce these risks, the internet community has introduced Resource Public Key Infrastructure (RPKI). RPKI lets the owner of an IP prefix publish a signed statement, called a Route Origin Authorisation, that says which ASN is allowed to announce that prefix. Routers that check RPKI can reject announcements that do not match. RPKI does not fix every BGP problem, but it makes accidental and deliberate hijacks much harder.
For a security team, knowing the ASN behind an address helps in other ways too. If a login attempt comes from an ASN that belongs to a data centre known for automated attacks, rather than from a residential ISP, that is a clue. If a user suddenly connects from a different ASN and a different country, that may be a sign of account takeover, or simply a user travelling. ASN data is one signal among many, but it is a useful one, and it is free to look up.
Network security also depends on the addresses themselves. An IP address is the starting point for most lookups, and a AAAA record in DNS is how a domain name is linked to an IPv6 address, which is the address you will often look up to find its ASN. In the same way, hiding your real IP address with a VPN changes the ASN that a site sees, which is one reason people ask does a VPN change your IP address when they want to understand what a website can learn about their connection.
Do You Need Your Own ASN?
Most people and most small businesses do not need their own ASN. If you have one internet connection, your ISP handles routing for you, and you use IP addresses from your ISP. You do not need BGP, and you do not need an ASN.
You may need your own ASN if you have connections to two or more ISPs and want to control how traffic enters and leaves your network, or if you are an ISP or a cloud provider yourself. You may also need one if you want to keep your IP addresses when you change ISPs, or if you run a large network with many sites that need to exchange routes between themselves.
Getting an ASN involves applying to your regional registry, paying a fee, and showing that you have a real need. You will also need a block of IP addresses, routers that support BGP, and staff who can manage BGP safely. It is not a task to take on lightly, but for the right organisation, it gives control over routing, redundancy, and independence from any single ISP.
How to Get an ASN
The process is similar in most regions. First, check that you have a genuine need, such as multi-homing to two ISPs. Second, join your regional registry and apply for an ASN and for IP address space. Third, set up BGP on your border routers, and agree routing policies with your ISPs. Fourth, register your routes in the routing registries used by other networks, and set up RPKI for your prefixes. Finally, monitor your routes, and fix leaks or hijacks promptly.
Before you apply for an ASN, check whether you actually need one. Many organisations that ask for an ASN really need a second internet connection, a better firewall, or a managed routing service instead. Talk to your ISP, and ask what they can do for you without BGP. If they offer a managed BGP service, that may give you the redundancy you want without the work of running BGP yourself.
Frequently Asked Questions
What does ASN stand for?
ASN stands for Autonomous System Number. It is a unique number that identifies an autonomous system, which is a network or group of networks run by one organisation under a single routing policy. The number is used by BGP routers to identify networks and to choose routes.
How do I find the ASN for an IP address?
Use a free ASN lookup tool, such as BGPView, RIPEstat, or the ARIN Whois service. Enter the IP address, and the tool will show the ASN, the organisation that owns it, and the country where it is registered. You can also use a command-line tool such as whois, if your system has it installed.
Is an ASN the same as an IP address?
No. An IP address identifies a single device or network interface. An ASN identifies a whole autonomous system, which can contain many IP addresses. An IP address can change, but an ASN usually stays with the same organisation for a long time.
What is the difference between a public and a private ASN?
A public ASN is globally unique and is used on the public internet to exchange BGP routes. A private ASN is for internal use only, for example to run BGP between sites inside a company, and must not be announced to the public internet. Private ASNs are in the ranges 64512 to 65534 for 16-bit numbers, and 4200000000 to 4294967294 for 32-bit numbers.
Can an ASN be changed or transferred?
An ASN can be transferred when a company is bought, sold, or merged, but the transfer must be recorded with the regional registry that issued it. An organisation cannot simply start using another organisation’s ASN. If you change ISPs, you usually keep your ASN and your IP addresses, but you must update your routing registrations.
Conclusion
An ASN is a small number with a big job. It identifies a network on the internet, it lets BGP routers find the best way to reach that network, and it gives security teams a way to understand and judge the traffic they see. Most people will never need their own ASN, but anyone who works with networks, hosting, or internet security should understand what it is and how to look it up.
If you remember one thing, remember this: an IP address says where a device is, and an ASN says who runs the network it is on. Together, they tell you far more than either one alone. The next time you investigate an unfamiliar IP address, look up its ASN first. It will usually tell you, in a few seconds, whether you are dealing with a home broadband user, a cloud provider, or a network you should treat with care.

