What are Autonomous System Numbers (ASN) on the Internet?
The Internet Assigned Numbers Authority (IANA) assigns every Autonomous System (AS) on the internet a 16-digit Autonomous System Number (ASN).
This identification number is what allows independent systems on the internet to both control the routing information within their own networks and exchange routing information with other ISPs.
In order to understand the Autonomous System Numbers on the internet, let’s back up and talk about Autonomous Systems.
What Are Autonomous Systems?
An Autonomous System (AS) is a connected group of one or more IP prefixes that are run by one or more network operators with a single, clearly defined routing policy.
These are necessary because the internet is not governed by one body that oversees all routing. Instead, there are large autonomous systems that are connected to one another in order to communicate.
Here are some AS examples you have likely heard of:
As you can see, an AS could be a search engine, an institution, an ISP, or any other group of shared IP addresses.
Why does an AS need an ASN?
Each AS on the internet needs a unique ASN for several reasons.
- Identification: the ASN uniquely identifies each network to all other ASes
- Ownership: the ASN originates and advertises routes, indicating which AS owns each IP prefix
- Path tracking: ASNs allow Border Gateway Protocol (BGP) to build an Autonomous System Path (AS_PATH) attribute that lists the traversed ASes. This ensures loop prevention and policy control
- Policy enforcement: ASNs provide the means to control how routes are exchange between specific networks through routing policies
- Aggregation: Using ASNs, multiple routes can be summarized to reduce routing table size
- Troubleshooting: Tracing ASNs in the AS_PATH helps to identify routing problems and infer business relationships
In short, ASNs are fundamental to BGP inter-domain routing.
FAQs About ASNs
Let’s take a look at some common questions about Autonomous System Numbers
What is the ASN Allocation Hierarchy?
At the same time that IANA oversees global coordination and allocation of ASNs, it also delegates regional distribution to several different Regional Internet Registries. These RIRs include:
- ARIN: North America and portions of the Caribbean and North Atlantic islands
- RIPE: Europe, the Middle East, and parts of Central Asia
- APNIC: Asia-Pacific region
- LACNIC: Latin America and portions of the Caribbean
- AFRINIC: All of Africa
How does an organization get assigned an ASN?
Organizations apply through their regional RIR to receive their ASN assignment. The RIR manages distribution and registration within its region, based on global policies established by ICANN and IANA.
This hierarchical system allows decentralized regional administration at the same time that it coordinates unique ASN allocation globally.
What is the difference between a public and private ASN?
Public ASNs are unique identifiers assigned by RIRs to allow each AS to be visible on the public internet.
However, there are also private ASNs that are for internal use only. These numbers only have significance as part of their local network, and they do not need to be unique from all other global ASNs. They are not advertised on the public internet.
Large companies will often use private ASNs internally, as they can aid management segmentation of a large network before announcing through a public ASN.
Private ASNs also reduce the global BGP routing table size. That can lead to improved router performance, better scalability and stability, and increased convergence speed.
What are the different kinds of ASN formats?
Originally, all ASNs were formatted as 16-bit integers, allowing for 65,536 possible assignments. The internet obviously grew far beyond that limited number of ASes, so the ASN was expanded into 32-bit integers in 2007.
- Original 16-bit ASNs range from 1 to 65535
- 32-bit ASNs range from 65536 to 4294967295
- 4-byte ASNs are typically represented with dotted notation form
- Private ASNs that are reserved for internal use range from 64512 to 65534
- A special 32-bit ASN is reserved for AS_TRANS in order to aid migration from a 2-byte to 4-byte router: 2345
How do Autonomous Systems communicate with one another? Border Gateway Protocol
ASes connect to one another and exchange routing information using the Border Gateway Protocol (BGP). BGP allows each AS to control the routing structure within their own network, and it also provides an exchange route with every other AS.
When an AS originates a route within its network, it appends its own ASN to the routing announcement. This provides ownership and path information when propagating routes.
Here’s an example:
If ASN 64496 originates a route to this subnet: 192.168.0.0/24. This is announced to its neighbors as “192.168.0.0/24, 64496.” (Neighbors are other ASes that 64496 has a direct BGP peering relationship with.)
Now, this order of numbers and characters denotes that ASN 64496 is the originator – and owner – of the route. It provides authoritative origination information to other networks. BGP propagates this route to other ASes, and each AS adds its own ASN to the path.
For example, if ASN 64500 receives the announcement from 64496, it would propagate it like this: “192.168.0.0/24, 64496 64500.”
This process builds up an Autonomous System Path (AS_PATH) that shows the sequence of each AS that the route has traversed. This method is how BGP uses ASNs to provide routing loop avoidance, policy control, and identification of where the route came from.
Facts about BGP peering sessions
A BGP peering session is a direct connection between routers in order to exchange routing information. This is how AS_PATHs are established.
Some additional facts about these peering sessions:
- They are usually set up over direct physical links between networks, such as two ISP networks connected by a wired ethernet connection.
- Remote networks can also be linked via tunnel links, such as GRE tunnels.
- On each end of the BGP session, you will find BGP speakers, which are routers that run BGP. They are capable of communicating with BGP peers.
- BGP speakers exchange their BGP routing tables with each other, which ensures that all currently known routes are shared.
- BGP routers will continue to send incremental routing updates whenever a route changes.
- Having BGP sessions established allows the ASes to dynamically share network reachability information and route traffic between one another.
- Each BGP router applies local policies to choose the best route for certain prefixes.
- The selective propagation of routing information downstream forms an AS path that packets follow to reach their destination. ASNs in the path identify the sequence that those packets will follow.
- This autonomous control over routing combined with sharing of reachability info is what provides global internet connectivity while allowing each network operator to customize its own routing policies.
3 Kinds of Autonomous Systems
There are 3 kinds of ASes that will be identified via ASN.
- Stub AS: Connected to just one other AS
- Transit AS: Connected to more than one other AS. It can be used for traffic between any connected ASes. (Usually administered by major ISPs.)
- Multihomed AS: Connected to more than one AS, but no transit traffic permitted
Who needs to know about ASNs, anyway?
Several groups of people need to know about ASNs.
For example, network engineers need to use ASNs to configure and troubleshoot any issues related to BGP routing protocol.
Employees of ISPs make extensive use of BGP and ASNs to interconnect and route traffic between networks.
If you work at a web company like Facebook, Google, or Netflix, someone in your organization has to know about BGP and ASNs, because this is the system used to optimize connectivity and traffic delivery.
Cloud providers operate their own ASNs and utilize BGP heavily to manage routing and interconnect their cloud regions.
Corporate network administrators connect ISP ASNs and exchange routes via BGP.
ASNs and the BGP form the backbone of internet routing. By assigning each independent network an ASN, traffic can be efficiently exchanged between domains while still allowing customized routing policies.
The web as we know it today could not function without BGP enabling ASes to dynamically share reachability information. Whether you are emailing a colleague, streaming a video, or accessing cloud servers, your data is traversing multiple ASNs along its journey.
The next time you browse online, consider the hidden world of ASes communicating and routing traffic to bring information to your fingertips. While the complexities of interdomain routing remain largely invisible to end users, it is this worldwide interconnection of autonomous systems that keeps the Internet running.
- Easy Prey Podcast
- General Topics
- Home Computing
- IP Addresses
- Networking Basics: Learn How Networks Work
- Online Privacy
- Online Safety
As a parent, you want what’s best for your child. But if they’re being bullied in school…[Read More]
Many parents assume that grooming is something that happens to other kids, not theirs. But that assumption…[Read More]
In an era where cyber threats are a constant risk rather than a possibility, businesses cannot afford…[Read More]