Just like IP addresses, ASNs (Autonomous System Numbers) have to be unique on the Internet. The main reason for this is that BGP uses the AS number for its loop prevention mechanism. When BGP learns about a route that has its own AS number in its path then it will be discarded.
Here’s an example:
Above we have three routers, R1 and R3 are using the same AS number. Once R1 sends an update, R2 will accept it but R3 will not since the AS number is the same.
To prevent the above from happening, IANA is in control of the AS numbers (similar to public IP addresses). If you want an AS number for the Internet then you’ll have to request one. They started with 16-bit AS numbers (also called 2-octed AS numbers) that were assigned like this:
- 0: reserved.
- 1-64.495: public AS numbers.
- 64.496 – 64.511 – reserved to use in documentation.
- 64.512 – 65.534 – private AS numbers.
- 65.535 – reserved.
The 1-64.495 public AS range is pretty small so there are similar issues to the IPv4 public IP addresses, there aren’t enough numbers. Right now (May 2015) there are only 199 AS numbers left that could be assigned. You can see the current status of available AS numbers here.
To get more AS numbers, an extension has been created that supports 32-bit AS numbers (also called 4-octed AS numbers). This means we have about 4.294.967.296 AS numbers that we can use.
When you request an AS number you’ll have to justify why you need a public AS number. For some organizations, using a private AS number should also be a solution.
Private AS numbers can be used when you are connected to a single AS that uses a public AS number. Here’s an example:
What is an ASN or AS?
An Autonomous System Number (AS number or just ASN) is a special number assigned by IANA used primarilly with Border Gateway Protocol which uniquely identifies an network under a single technical administration that has a unique routing policy, or is multi-homed to the public internet. This autonomous system number is required if you are to run BGP and peer with your internet service provider and between internet service providers at peering points and Internet Exchanges (IX). The ASN must be globally unique so that IP address blocks appear to come from a unique location that BGP can find and route to. BGP uses Prefixes and Autonomous System Paths (AS Paths) to determine the shortest path to a destination where a prefix is located.
There are 16-bit AS numbers (ASN), and new 32-bit AS numbers (ASN) which were created when the ASN pool from IANA approached exhaustion, and the ASN field was extended the field from 16 to 32 bits [RFC4893][RFC5398].
Note: In the table below the 32-bit ASN's are "backwards compatible" and overlap the 16 bit ASN's. IANA refers to the 16-bit AS number list as a "sub-registry" of the 32-bit list.
|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][RFC5398]|
|65552 - 131071||32||Reserved|
|131072 - 4199999999||32||Public 32-bit ASN's|
|4200000000 - 4294967294||32||Reserved for Private Use||[RFC6996]|
Public and Private ASN
There are public ASN and private ASN. 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 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 ASNs.
Obtaining an ASN
An AS-number must be obtained (leased) from one of the Regional Internet Registries (RIR's) [ARIN, LACNIC, RIPE NCC, AFRINIC, APNIC], but the RIR's receive their blocks of ASN from IANA. Which registry you obtain your AS number from is based upon where in the world your network resides physically, or where your organization is headquartered, and where will be connecting. You must 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. The registry needs to cover their operating expenses, and 'container fees' are one way they do that.
You will need to use an online registration page, or the downloadable form commonly called the ASN template to request your AS number (ASN).
Here's where to obtain the template:
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.
Bookmark this page and SHARE: