If you thought the Internet is just a single giant network, you’re wrong. The Internet is, in fact, a network of networks that make up other networks. This might seem confusing at first, but fortunately, things will make much more sense once we cover the basics of Autonomous Systems (AS) and their respective ASNs (Autonomous System Numbers).
What is an AS?
To understand the role ASNs play within the grander scheme of the Internet, it’s important to know what an AS actually is and how it works. An autonomous system is a big network or group of networks (more specifically, it’s about a group of one or more IP prefixes) that have a single routing policy. They are pretty much the backbone of every computer or device that accesses the Internet.
An autonomous system is responsible for routing the external traffic between systems. To be more specific, data travels between autonomous systems until it finds the one that contains the destination IP address. Delivering the data to the correct IP address is then done by the router of that specific autonomous system. It can help to think of an AS as a post office, and of the IP as the postal address to which the data packet is delivered. Basically, your local post office (the autonomous system ) will help the postman (traveling data) get to your home address (IP) faster.
Generally speaking, each AS is controlled by a single organization or entity, such as an ISP (Internet Service Provider), a university, or a government agency. In theory, this might sound pretty straightforward, but there’s more to this process that meets the eye.
Autonomous System routing policy and BGP
Sending data between autonomous systems is done via BGP (Border Gateway Protocol). In a nutshell, this protocol is the postal service of the Internet. It is the BGP that processes the data and picks the fastest and most efficient route the data can take. In many cases, this route means jumping from one autonomous system to another until the destination is reached.
In order for the BGP to properly work, autonomous systems make use of specific autonomous system routing policies. Each autonomous system must have a unique routing policy, which is a list of the IP addresses (aka IP address space or IP range) it controls, followed by a list of other autonomous systems to which it connects. Without BGP and AS policies, the traffic cannot be routed to the correct network.
IP addresses space and IP address prefixes
As we discussed above, each autonomous system has a specific list of IP addresses, also known as IP range or IP block. This works similarly to switchboards. Let’s say an autonomous system has an IP block that includes the IP 198.08.69.01. If a computer tries to send a data packet to that specific IP address, the packet will take the shortest route to the AS that owns the IP 198.08.69.01. So the phone call you make will be routed to the registry that operates the specific number you are calling.
When operators set up an autonomous system and indicate which IPs are controlled by that AS, they will specify the IP address prefix owned by that particular system. An IP address prefix is nothing more than a range of IP addresses, indicated by a slash and a number, like so: 198.08.69.00/24. The prefix (/24) represents the IPs 198.08.69.00 through 198.08.69.255. So, the prefix indicates the range of IPs owned by an autonomous system.
Such notation makes it easier to control, manage and operate an AS. It is way more convenient for AS owners to communicate their IP blocks in this manner and set up their routing policy, which will then aid that AS in communicating with other ASes.
What is an ASN?
In order for multiple autonomous systems to efficiently interact, each of them needs a unique identifier. This identifier is called an Autonomous System Number, or ASN. Essentially, there are two types of Autonomous System Numbers: public and private.
- Public ASNs are the ones used to exchange information over the Internet.
- Private ASNs are used for systems that are communicating via BGP (Border Gateway Protocol) with one provider.
While internal routers and computers communicating within their own autonomous system might not absolutely need an ASN, external communications with inter-network routers must be done via an ASN.
ASNs have two different formats: 2-byte and 4-byte.
- 2-byte ASNs are unique 16-bit numbers between 1 and 65534, which provide for a total of 65,536 ASNs.
- 4-byte ANSs are unique 32-bit numbers. This format provides for 232 or 4,294,967,296 ASNs (0 to 4294967295).
When specifying the ASN, the following format should be used: AS(number), such as AS131269
What kind of autonomous systems absolutely need an ASN?
Keeping the networks secure and stable requires the existence of different types of autonomous systems. When it comes to requiring an ASN, we usually talk about four types of ASes, as follows:
- Multihomed – This AS is a network made up of two or more autonomous systems. This is done to maintain the Internet connection in case one AS connection fails.
- Stub – Also known as single-homed, is a type of AS that only connects to one other AS.
- Transit – Provides connections through itself. For example, network A can connect to network C directly or by crossing over network B.
- Internet Exchange Point – This one is a bit more complex since it is a system created by the physical infrastructure located at Internet exchange points (IXP). Such IXPs are local area networks (LANs) with lots of routers, switches, and cable connections.
Why are ASNs useful?
The whole point of using Autonomous System Numbers is to increase the speed at which data travels over the Internet. Thanks to ASNs, BGP routing is done faster and more efficiently. Autonomous Systems can be viewed as clusters of networks within the Internet, while ASNs give each AS a unique identity. In doing so, the data will find its way to its destination quicker, thanks to more reliable routing.
Network operators that use ASNs can thus have better control over the Internet traffic and enjoy more flexible network management. Owning an ASN also greatly helps in IP address portability. Without autonomous system numbers, data packets risk getting lost in transit or taking too long to arrive at the destination IP address.
Therefore, ASNs are a super useful component of a network that ensures you can efficiently operate on the Internet on a global scale. All good so far, but how can you get an ASN?
How do you obtain an ASN?
Snapping fingers and magically getting an ASN for your autonomous system is out of the question. In order to be eligible for obtaining an ASN, your AS has to meet certain qualifications. It must have a distinct routing policy, be of a certain size, and usually have more than one connection to other ASes.
IANA (Internet Assigned Numbers Authority) is responsible for assigning and managing autonomous system numbers. The strict requirements you need to follow are quite justified since there is a limited amount of ASNs available, and if they were given out too freely, the supply would run out ,and routing would become much more complex.
If you want to obtain an ASN, you first need to contact the relevant RIR (Regional Internet Registry). RIRs are responsible for managing internet resources and allocating them for specific areas of the world. There are currently five RIRs:
- The African Network Information Center (AFRINIC)
- The American Registry for Internet Numbers (ARIN)
- The Asia-Pacific Network Information Center (APNIC)
- The Latin American and Caribbean Network Information Center (LACNIC)
- Réseaux IP Européens Network Coordination Center (RIPE NCC)
Each RIR might have special requirements or have you follow different steps for your ASN application. Generally speaking, you need to either have a unique routing policy or a multihomed site, as well as provide relevant and complete information about other important elements, like the BGP and IPs you are using, and even the proof of a unique exterior gateway protocol (EGP).
Recap
Autonomous Systems are responsible for routing external data to and from other systems. They facilitate fast and efficient data packet delivery to the destination IP address. An autonomous system number (ASN) is a unique identifier for an AS. ASNs make sure that multiple autonomous systems can interact efficiently.
On top of that, ASNs facilitate BGP (Border Gateway Protocol) routing. The result is that you benefit from more flexibility in network management and better control over Internet traffic while maintaining a stable and secure connection.
Obtaining an ASN is not an easy job, but if you meet the requirements of your RIR and submit every information needed, your AS will be eligible for being assigned an autonomous system number.