• Motivation: Why the 4-Byte Autonomous System notation is important
• Configuration: How to switch between the two supported 4-Byte AS notations
Last updated: January 2009
What You Will Learn
This paper provides insight into the two leading notations for devices supporting 4-Byte Autonomous Systems technology known as ASPLAIN and ASDOT.
ASPLAIN-IETF Preferred 4-Byte AS Notation
The Canonical Textual Representation of Four-octet AS Numbers is standardized by the IETF through RFC5396 (Textual Representation of Autonomous System (AS)) Numbers. Two major ways for textual representation have been defined within this document: ASDOT and ASPLAIN. Cisco IOS routers will support both textual representations of Autonomous Systems numbers. Cisco IOS will initially default to the ASPLAIN notation, while providing a configuration option for ASDOT.
IANA registries for Autonomous System Numbers use the ASPLAIN notation. Cisco IOS will also use ASPLAIN initially, and will support ASDOT through a configuration option. A difficult aspect of ASDOT representation is that it is widely regarded as incompatible with regular expressions used by network operators. For example: An AS regular expression represented as _100.5_ matches AS100.5 as well as AS100[0-9]5 which makes it hard to implement a filtering policy and may require the ISPs to rewrite their regular expressions that filter AS-PATH; In addition, provisioning, troubleshooting and analyzing tools traditionally expect to operate with only decimal based AS number and modification to an ASDOT notation could become difficult for some of these tools; this drives the preference for the ASPLAIN representation model.
How Does ASDOT Textual Notation Work?
ASDOT textual representation is based upon the existing 2-Byte AS representation. The ASDOT textual representation splits the full binary 4-byte AS number into two words of 16 bits. A first 16 bit word for the higher order 16 bits and a second 16 bit word for the lower order 16 bits. The ASDOT representation glues these two words together by separating these values with a single `dot'. If the higher order 16 bits represent the value of a decimal zero, then the 4-Byte AS can be represented in as the traditionally well known 2-Byte AS format.
• All AS numbers between 0-65535 are represented as a decimal number, both in CLI as well as in show commands
• AS numbers larger than 65535 is represented using ASDOT notation as
<higher2bytes in decimal>.<lower2bytes in decimal>
For example: AS 65546 is represented as "1.10"
["1" * 65535] + "10" = 65546
How Does ASPLAIN Textual Notation Work?
ASPLAIN is in essence the continuation on how a 2-Byte AS number has been represented historically. With the ASPLAIN notation, a 32 bit binary AS number is translated into a decimal value. This value is known as the ASPLAIN notation of the BGP autonomous System Number.
• All AS numbers between 0-65535 are represented as a decimal number both in CLI as well as in show commands
• AS numbers larger than 65535 is represented using ASPLAIN notation as
For example: AS 65546 is represented as "65546"
Switching Between ASDOT and ASPLAIN
A Cisco router allows the network operator to select either the ASPLAIN or ASDOT notation. While ASPLAIN is the default notation for a Cisco router, the following command under the BGP process can be used to configure ASDOT notation:
router bgp 1.1
bgp asnotation dot
This will change the way the AS number is represented within router show commands, while for CLI configuration commands both representations are valid by default. In addition, this will have an impact on how the regular expressions work for AS-PATH filters. If ASPLAIN is used, similar rules are valid for the 4-Byte AS numbers, in the same way as for the historically known 2-Byte AS numbers, regarding policy configuration. However, if ASDOT is used, then there is a degree of incompatibility with regular expressions due to the dot "." character. Specifically, the dot "." character means "match any single character" and hence the dot's "." alternative-meaning in ASDOT notation has to be escaped from with a pre-pended "\" symbol, when creating AS-PATH filters.
The ASPLAIN notation is the Cisco IOS default notation. However, Cisco IOS will support ASDOT via a configuration option. Switching between representation formats does not automatically change the AS-PATH policy rules configured on a Cisco router, and hence if policy rules are on the router configured, they will have to be updated through a manual process.