Understanding Autonomous System (AS) Number Formats:
Autonomous System Numbers (ASNs) are essential components in BGP routing, and their format can significantly impact BGP implementations. ASNs are classified into two main formats: 2-Octet AS Numbers and 4-Octet AS Numbers.
-
2-Octet AS Numbers:
- 2-Octet AS Numbers offer 65,536 possible values, ranging from 0 through 65,535.
- Certain ASNs are reserved for specific purposes, such as 0, 23456, and ranges like 64496-64511 and 64512-65534, all defined by various RFCs.
- Public use ASNs span from 1 to 64,495 (excluding ASN 23,456), while private use ASNs cover 64,512 to 65,534.
-
4-Octet AS Numbers:
- 4-Octet AS Numbers were introduced with support in IOS 12.4(24)T and 12.0(32)S12, denoted by Capability Code 65.
- This format offers an extensive range of 4,294,967,296 possible values, ranging from 0 through 4,294,967,295.
- Public use ASNs range from 65,552 to 4,199,999,999, and they can be represented in ASDOT notation as 1.16 through 64,086.59,903.
- Private use ASNs cover 4,200,000,000 to 4,294,967,294, with their ASDOT notation from 64,086.59,904 to 65,535.65,534.
-
ASPLAIN vs. ASDOT Notation:
- ASPLAIN, the Cisco default display method, represents ASNs as integer values within the 2-Octet and 4-Octet formats.
- ASDOT notation represents ASNs as dotted-decimal values, such as 1.0 through 65,535.65,535, and is configurable on Cisco routers using the "bgp asnotation dot" command.
- ASDOT notation example:
- 0.65535 is equivalent to 65535
- 1.0 = 65536
- 1.1 = 65537
- since 1.0 = 65536 whatever is on the left side we multiply by 65536 and whatever is on the right side we add to the number:
- e.g. 10.25 would be
10 * 65536 + 25
which would give us in ASPLAIN notation 655385
- e.g. 10.25 would be
-
AS_TRANS:
- AS_TRANS, as defined by RFC 6793, serves as a transition mechanism for legacy 2-Octet ASNs to adapt to the 4-Octet AS format.
- It is used in neighbor statements on older BGP speakers.
-
AS4_PATH & AS4_AGGREGATOR:
- AS4_PATH and AS4_AGGREGATOR are utilized to provide backwards compatibility in BGP implementations.
- Both are categorized as "Optional Transitive" BGP attributes.
-
Additional Resources:
- To delve deeper into the world of ASNs, various resources are available, including articles, documentation, and tools.
- For further reading and exploration, consider the following sources:
- Explaining 4-Byte Autonomous System (AS) - ASPLAIN and ASDOT Notation for Cisco.
- Cisco IOS BGP 4-Byte ASN Support (opens in a new tab)
- 4-Byte ASN with Cisco IOS Software
- Current 2- and 4-Octet ASN Usage (opens in a new tab)
This overview highlights the intricacies of AS Number formats, their ranges, and associated notations, providing a foundation for understanding ASNs in BGP routing. Additionally, it offers valuable resources for further exploration.
The CCNP Candidate's Guide for BGP (opens in a new tab) by Travis Bonfigli