The Internet is an extensively large network that requires a specialized type of routing to ensure scalability and reliability.
For this reason, BGP is the protocol of choice for routing on the Internet. BGP leverages what are known as Autonomous System Numbers or ASNs to achieve routing.
In this article, we’ll elaborate on ASNs, and their role in defining the infrastructure of the Internet.
Note: Typically, when we refer to Autonomous Systems, we use the abbreviation AS. However, using typical English grammar rules, when we pluralize an acronym, we simply add a lowercase “s” at the end. This would result in writing Autonomous Systems as ASs. Some other English grammar rules allow us to add the suffix “es” whenever an acronym ends in “S.” So, for obvious reasons, the plural form of Autonomous Systems used in this article is ASes.
Border Gateway Protocol (BGP)
A discussion about ASNs cannot begin unless we first talk a little bit about BGP. BGP is an exterior gateway protocol (although it can be used as interior gateway protocol with iBGP) and is integral to the functionality of the Internet, facilitating the exchange of routing information.
Unlike other routing protocols such as OSPF (link-state) and EIGRP (distance-vector), BGP functions as a path-vector routing protocol.
This involves making routing decisions based on a combination of factors including paths, network policies, and a set of rules preset by network administrators.
Autonomous Systems
BGP requires that the network it serves be separated into what are known as autonomous systems or ASes.
An AS is composed of a network or a group of networks under the control of a single network administrator (or group of administrators) that presents a common routing policy to the Internet.
Typically, an AS is owned and operated by large entities including sizable corporations, universities, or Internet service providers (ISPs) that own substantial IP address ranges.
Autonomous System Number in BGP
ASes are identified by a unique Autonomous System Number (ASN), which is used in routing decisions. BGP is utilized to exchange network reachability information with other ASes on the internet, with each AS applying its routing policy both to incoming and outgoing routes. Each AS is composed of dozens or even hundreds of routers.
ASNs in the Context of the Internet
BGP exchanges routing information between ASes, but also between BGP routers that are found within the same AS. BGP is offered in two distinct forms or “flavors”:
- External BGP (eBGP): This is utilized to exchange routing information between different ASes.
- Internal BGP (iBGP): This is used for the exchange of routes within the same AS.
Routing information is exchanged in the form of a list of ASNs you must traverse in order to reach the intended destination. This will become clearer when we examine the following example.
The diagram below depicts several autonomous systems, each one composed of numerous routers. Each AS is assigned an ASN and the ASes are interconnected to each other as shown.
The diagram can be imagined to be a section of the Internet with networks that belong to various entities and are connected to each other.
In the diagram, R1 in AS 100 has the 20.20.20.0/24 network directly connected, while R2 in AS 200 has the 30.30.30.0/24 network directly connected.
When BGP exchanges information between the routers found within all the ASes, it displays a list of ASes that must be traversed to reach that destination. Thus, R1 should have the following list of ASes as the path to reach the 30.30.30.0/24 network:
100 190 170 200
If we were to take a look at the BGP table of R1, we should see something like this:
R3#show ip bgp
BGP table version is 2, local router ID is 192.168.34.3
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
*> 30.30.30.0/24 147.52.3.1 0 0 100 190 170 200 i
As you can see the red bolded information under the Path header shows the ASes that must be traversed to reach the destination.
Autonomous System Numbers (ASNs)
Now that we’ve seen a little bit more about how BGP works and how ASes are an intricate part of that functionality, let’s focus on ASNs.
In order for all of this to function, each AS must be assigned a unique ASN. Originally, ASNs were 16-bit numbers that range from 0 to 65535.
Within that range are public ASNs, which can be used on the Internet, and private ASNs, which can be used internally within enterprise networks. The idea of public and private ASNs is similar to the idea of public and private IP addresses.
Recently, ASN numbers were becoming exhausted, in much the same way as IPv4 addresses. In an effort to resolve this, the ASN range has been extended to 32-bit ASN numbers, allowing for up to 4.2 billion ASNs.
The following table shows the various ranges that are used for these differing purposes:
Number range |
Bits |
Description |
0 |
16 |
Reserved |
1-23455 |
16 |
Public ASNs |
23456 |
16 |
Reserved |
23457-64495 |
16 |
Public ASNs |
64496-64511 |
16 |
Reserved for documentation |
64512-65534 |
16 |
Private ASNs |
65535 |
16 |
Reserved |
65536-65551 |
32 |
Reserved for documentation |
65552-131071 |
32 |
Reserved |
131072-4199999999 |
32 |
Public ASNs |
4200000000-4294967294 |
32 |
Private ASNs |
4294967295 |
32 |
Reserved |
Asplain vs Asdot notation of 32-bit ASNs
The asplain and asdot notations are two different ways to represent 32-bit ASNs, in both documentation as well as in configurations of networking devices.
Asplain notation is quite straightforward. It represents the 32-bit ASN as a plain integer between 0 and 4294967295. For example, ASN 131072 in asplain notation is simply written as 131072.
Asdot notation is a bit more complex. It breaks down the 32-bit ASN into two 16-bit sections, separated by a dot.
The left side represents the higher order 16 bits, and the right side represents the lower order 16 bits. For example, ASN 131072 in asdot notation would be written as AS 2.0. This is because the higher order 16 bits correspond to the number 2, and the lower order 16 bits correspond to the number 0.
To maintain compatibility, networking software may display or accept 32-bit AS numbers in either asplain or asdot format.
Beyond compatibility, the decision to use one format over the other also depends upon personal preference.
However, as of a recommendation by the Internet Assigned Numbers Authority (IANA) in 2009, the asplain notation is the officially recognized standard.
Obtaining a Public ASN
Obtaining a public ASN involves applying through a Regional Internet Registry (RIR), in much the same way as you would for IPv4 or IPv6 addresses. There are five RIRs worldwide, and the one you apply through depends on your geographical location.
Various entities have the justification for obtaining one or more ASNs, but in general, an organization must be large enough to warrant assigning an ASN. Each RIR has specific policies and procedures for applying for an ASN. In general, the process involves the following:
- Justification: You need to provide a valid technical reason for needing an ASN. This usually involves demonstrating that you will be multi-homed, connecting you to two or more ISPs.
- Payment: There is usually an application fee, which varies depending on the RIR. If your application is approved, you will also be obligated to pay an annual subscription and maintenance fee.
- Evaluation: Your application will be evaluated by the RIR. If it meets the criteria, your request will be approved and you will be assigned an ASN.
Conclusion
ASNs remain an integral part of efficient and effective network communication via BGP on the Internet. Whether represented in 16-bit, 32-bit, asplain, or asdot formats, ASNs facilitate the complex task of Internet data exchange by uniquely identifying each AS.
Understanding the concepts described in this article will hopefully have helped you to further understand ASNs and the role they play in connecting the worldwide network.
Related Posts
- Discussion and Explanation of OSPF Graceful Restart and Shutdown
- Explanation and Configuration of OSPF MD5 Authentication on Cisco Networks
- Comparison of BGP Confederations vs Route Reflectors
- What are BGP Confederations-Explanation and Discussion (With Cisco Example)
- What is BGP Route Reflector – Explanation and Discussion (with Cisco Example)