4-Byte AS Numbers

Table of Contents

Prior to January 2009, BGP autonomous system (AS) numbers that were allocated to companies were two-octet numbers in the range from 1 to 65 535 as described in RFC 4271. Due to increased demand for AS numbers, the Internet Assigned Number Authority (IANA) started to allocate four-octet AS numbers in the range from 65 536 to 4 294 967 295.

Cisco has implemented the following two methods:

  • Asplain: Decimal value notation where both 2-byte and 4-byte AS numbers are represented by their regular decimal value.
    • For example, 65526 is a 2-byte AS number and 234567 is a 4-byte AS number.
  • Asdot:
    • ASN dot notation where 2-byte AS numbers are represented by their decimal value (asplain notation).
    • 4-byte AS numbers are represented by a dot notation (asdot+ notation).
  • Asdot+: breaks the AS number in two 16-bit parts, a high-order value, and a low-order value, separated by a dot.
    • All older AS numbers can fit in the second part where the first part is set to 0.
      • For example:
        • AS 6541 becomes 0.6541
        • AS 54233 becomes 0.54233
        • AS 544 becomes 0.544
    • For AS numbers above 65535, we use the next high order bit value and start counting again at 0.
      • For example:
        • AS 65536 becomes 1.0
        • AS 65537 becomes 1.1
        • AS 65538 becomes 1.2

BGP speakers that support 4-byte AS numbers advertise this via BGP capability negotiation and there is backward compatibility. When a “new” router talks to an “old” router (one that only supports 2-byte AS numbers), it can use a reserved AS number (23456) called AS_TRANS instead of its 4-byte AS number.

				
					Examples:

# AS 5434995
5434995 / 65536 = 82
5434995 - (82 * 65536) = 61043
asdot = 82.61043

# AS 1499547
1499547 / 65536 = 22
1499547 - (22 * 65536) = 57755
asdot = 22.57755
				
			

Command

Router(config-router)# bgp asnotation dot

Changes the default output format of BGP 4-byte AS numbers from asplain (decimal values) to dot notation. Use the no keyword with this command to revert to the asplain format.

Note: 4-byte AS numbers can be configured using either asplain format or asdot format. This command affects only the output displayed for show commands or the matching of regular expressions.

Router# clear ip bgp *

Clears and resets all current BGP sessions. A hard reset is performed to ensure that the 4-byte AS number format change is reflected in all BGP sessions.

Configuration

				
					R1 (AS 62000) '2-octect AS'

R1#show bgp ipv4 unicast summary 
BGP router identifier 10.1.1.1, local AS number 62000
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.2        4       75000       6       6        1    0    0 00:02:41        0
R1#

R2 (AS 75000) '4-octect AS'

R2#show bgp ipv4 unicast summary 
BGP router identifier 10.1.1.2, local AS number 1.9464
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4        62000       8       8        1    0    0 00:03:45        0
R2#

// bgp asnotation dot configured

R1#show bgp ipv4 unicast summary 
BGP router identifier 10.1.1.1, local AS number 62000
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.2        4       1.9464       6       6        1    0    0 00:02:41        0
R1#

R2#show bgp ipv4 unicast summary 
BGP router identifier 10.1.1.2, local AS number 1.9464
BGP table version is 1, main routing table version 1

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.1.1        4        62000       8       8        1    0    0 00:03:45        0
R2#
				
			

Summary

  • 2 byte (octet) AS numbers only offer 1 – 65535 AS numbers
  • 4-byte AS numbers offer AS numbers in the range of 65536 – 4294967295
  • These are three ways to write the new AS numbers:
    • asplain: the entire decimal value (eg AS 3498577)
    • asdot+: two 16-bit values, separated by a dot.
    • asdot: uses asplain for AS numbers below 65536 and asdot+ for AS numbers above 65535.
  • Cisco IOS routers support asplain and asdot.
  • The two are compatible.
Tags:

Leave a Reply

Related Post