In a recent class I was asked for some details on BGP Autonomous System (AS or ASN) Numbers. I thought I would document and provide a more complete answer here for others to learn from as well.
What is the AS Number?
|Number||# of Bits||Description||References|
|1 – 23455||16||Public ASN’s|
|23456||16||Reserved for AS Pool Transition||[RFC6793]|
|23457 – 64534||16||Public ASN’s|
|64000 – 64495||16||Reserved by IANA|
|64496 – 64511||16||Reserved for use in documentation/sample code||[RFC5398]|
|64512 – 65534||16||Reserved for Private Use|
|65536 – 65551||32||Reserved for use in documentation and sample code||[RFC4893 and RFC5398]|
|65552 – 131071||32||Reserved|
|131072 – 4199999999||32||Public 32-bit ASN’s|
|4200000000 – 4294967294||32||Reserved for Private Use||[RFC6996]|
Where do I get an ASN?
As stated earlier, IANA controls the AS Number assignments. However, they assign blocks of AS numbers to the Regional Internet Registries or RiR’s.
Individual companies and providers in turn get their AS numbers from their local RIR. The RIR that applies to you or your company is based on your physical location. You must formally apply to the RIR to obtain an ASN. ASN’s are usually provided for a ‘container fee’ which is a fancy way of saying that they will charge you money to open an account and place the AS number under your account. You do not own the AS number, instead, think of it as a lease.
Each RIR has their own web page and you must download or complete forms to apply for your ASN. Below is a list of the RIRs and associated links:
- AMERICAS/AFRICA – American Registry for Internet Numbers (ARIN)
- ARIN ASN Request Information – ARIN has removed the online template and migrated to a RESTful API so ISP’s can set up ASN’s.
- EUROPE – Reseaux IP Europeens (RIPE)
- ASIA – Asian Pacific Network Information Center (APNIC)
- Caribbean/Latin America – Latin American and Caribbean Internet Adresses Registry (LACNIC)
General ASN Assigment Requirements
There are a limited number of ASN available, so the RIR’s are very selective about whom they grant an ASN to. You will need to demonstrate the following:
- That you have a connection to more than one ISP (or will in the next 30 days). This is called being ‘multi-homed’.
- You will be asked to specify the exterior routing protocol used to communicate with your ISP (this is exclusively BGP today)
- You will be asked to provide the AS numbers (ASN) of all your ISP’s.
- You may be asked to provide the IP addresses of your ISP’s routers to which you connect. You will already know this information as it will be provided when the ISP provides your circuit, but you can discover it with a traceroute if the connection is already working.
- You and your ISP must already have an identity on file in the RIR’s database
- You must have blocks of IP addresses that need routing. You obtain IP addresses from RIR’s as well.
- You must demonstrate a need to utilize BGP with an organizationally unique route policy OR be multi-homed.
The Difference Between Public and Private ASN’s
As shown in the chart above, there are both public ASN’s and private ASN’s. Several RFC’s outline which addresses are private and which are public, including some special-use ASN’s for documentation and/or sample code and for AS number pool transitions. The most used are the public and private ASN’s.
An ASN in the public range is globally unique and may be announced on the global Internet to your ISP or at an internet exchange point (peering point) via BGP. ASN’s are used to uniquely identify networks or systems of networks which appear to the outside world to be running a single consistent routing policy. Prefixes are ‘seen’ to originate from these public ASN by the exterior gateway routing protocol (BGP). This ensures that routes lead back to a unique source of a given range of IP addresses.
The private ASN should not be seen on the global Internet (they shouldn’t be announced via your exterior gateway routing protocol). Private AS numbers are used by ISP’s who use BGP confederations or in private networks. Private AS numbers are also sometimes used to provide an AS number to customers with multiple connections to their ISP, but who have no connections to any other Internet service provider. This is becoming more and more rare. Use of private ASN is more frequent in private networks that will never communicate directly with the Internet. Most ISPs utilize route filters to reject routes that contain private ASN’s.
A Bibliography of Associated RFC’s
I have compiled a bibliography of associated BGP/ASN RFC’s below. Am I missing any? Please comment below.
- “A Border Gateway Protocol 4 (BGP-4).” 1995. Request for Comments RFC 1771. Internet Engineering Task Force. https://doi.org/10.17487/RFC1771.
- Bates, Tony J., Ravi Chandra, Yakov Rekhter, and Dave Katz. 2007. “Multiprotocol Extensions for BGP-4.” Request for Comments RFC 4760. Internet Engineering Task Force. https://doi.org/10.17487/RFC4760.
- Borkenhagen, Jay, Randy Bush, Ron Bonica, and Serpil Bayraktar. 2019. “Policy Behavior for Well-Known BGP Communities.” Request for Comments RFC 8642. Internet Engineering Task Force. https://doi.org/10.17487/RFC8642.
- Chen, Enke, John Scudder, Prodosh Mohapatra, and Keyur Patel. 2015. “Revised Error Handling for BGP UPDATE Messages.” Request for Comments RFC 7606. Internet Engineering Task Force. https://doi.org/10.17487/RFC7606.
- Chen, Enke, and Quaizar Vohra. 2007. “BGP Support for Four-Octet AS Number Space.” Request for Comments RFC 4893. Internet Engineering Task Force. https://doi.org/10.17487/RFC4893.
- Haas, Jeffrey, and Jon Mitchell. 2014. “Reservation of Last Autonomous System (AS) Numbers.” Request for Comments RFC 7300. Internet Engineering Task Force. https://doi.org/10.17487/RFC7300.
- Hawkinson, John A., and Tony J. Bates. 1996. “Guidelines for Creation, Selection, and Registration of an Autonomous System (AS).” Request for Comments RFC 1930. Internet Engineering Task Force. https://doi.org/10.17487/RFC1930.
- Huston, Geoff. 2008. “Autonomous System (AS) Number Reservation for Documentation Use.” Request for Comments RFC 5398. Internet Engineering Task Force. https://doi.org/10.17487/RFC5398.
- Li, Tony, Ravi Chandra, and Paul S. Traina. 1996. “BGP Communities Attribute.” Request for Comments RFC 1997. Internet Engineering Task Force. https://doi.org/10.17487/RFC1997.
- Meyer, David, and Keyur Patel. 2006. “BGP-4 Protocol Analysis.” Request for Comments RFC 4274. Internet Engineering Task Force. https://doi.org/10.17487/RFC4274.
- Mitchell, Jon. 2013. “Autonomous System (AS) Reservation for Private Use.” Request for Comments RFC 6996. Internet Engineering Task Force. https://doi.org/10.17487/RFC6996.
- Rekhter, Yakov, Tony J. Bates, Ravi Chandra, and Dave Katz. 1998. “Multiprotocol Extensions for BGP-4.” Request for Comments RFC 2283. Internet Engineering Task Force. https://doi.org/10.17487/RFC2283.
- ———. 2000. “Multiprotocol Extensions for BGP-4.” Request for Comments RFC 2858. Internet Engineering Task Force. https://doi.org/10.17487/RFC2858.
- Rekhter, Yakov, Susan Hares, and Tony Li. 2006. “A Border Gateway Protocol 4 (BGP-4).” Request for Comments RFC 4271. Internet Engineering Task Force. https://doi.org/10.17487/RFC4271.
- Tappan, Dan, Yakov Rekhter, and Srihari R. Sangli. 2009. “4-Octet AS Specific BGP Extended Community.” Request for Comments RFC 5668. Internet Engineering Task Force. https://doi.org/10.17487/RFC5668.
- Traina, Paul S. 1995. “BGP-4 Protocol Analysis.” Request for Comments RFC 1774. Internet Engineering Task Force. https://doi.org/10.17487/RFC1774.
- Traina, Paul S., John Scudder, and Danny R. McPherson. 2007. “Autonomous System Confederations for BGP.” Request for Comments RFC 5065. Internet Engineering Task Force. https://doi.org/10.17487/RFC5065.
- Vohra, Quaizar, and Enke Chen. 2012. “BGP Support for Four-Octet Autonomous System (AS) Number Space.” Request for Comments RFC 6793. Internet Engineering Task Force. https://doi.org/10.17487/RFC6793.