BGP 4 Byte AS - Overview
This Blog explains BGP 4-Byte AS in detail. During initial BGP development, it was assumed that availability of a 16 bit would be enough for AS assignment. AS is also be defined as a 16bit number with 65536 unique Autonomous System numbers. The IANA Authority manages the available BGP Autonomous System Numbers (ASN) pool, with the assignments being carried out by the Regional Registries.
The current consumption rate of the publicly available AS numbers suggests that the entire public 2-byte ASN pool will be fully depleted by early to middle 2011. A solution to this exhaustion of AS numbers is the expansion of the existing 2-byte AS number to a 4-byte AS number, which provides a theoretical 4,294,967,296 unique AS numbers. ARIN has made the following policy changes in conjunction with the adoption of the solution.
As of January 1, 2009, all new Autonomous System Numbers (ASNs) issued will be 4-byte by default, unless otherwise requested. “Following a globally coordinated policy, ARIN and all the Regional Internet Registries began allocating four-byte ASNs by request in January 2007; January 2009 marks the transition to allocating four-byte ASNs by default ( https://www.arin.net/announcements/2008/07242008.html )”.
The Cisco IOS BGP 4-Byte AS feature allows BGP to carry a Autonomous System Number (ASN) encoded as a 4-byte entity. The addition of this feature allows an operator to use an expanded 4-byte AS number granted by IANA.
Backward compatibility with 2-byte AS number is provided as BGP and Multiprotocol BGP are widely deployed in ISP and MPLS VPN SP environments. Specifically, advertisement via standard based BGP capability code, two new optional transitive attributes: AS4_AGGREGATOR and AS4_PATH, and a reserved AS TRANS 23456 for interoperability between 4-byte ASN capable and non-capable BGP speakers, are introduced to smooth migration from a 2-byte to a 4-byte ASN environment.
NOTE: ASN is carried in BGP in OPEN message, and in the attributes AS_Path, Community, and Atomic Aggregate.
The current consumption rate of the publicly available AS numbers suggests that the entire public 2-byte ASN pool will be fully depleted by early to middle 2011. A solution to this exhaustion of AS numbers is the expansion of the existing 2-byte AS number to a 4-byte AS number, which provides a theoretical 4,294,967,296 unique AS numbers. ARIN has made the following policy changes in conjunction with the adoption of the solution.
As of January 1, 2009, all new Autonomous System Numbers (ASNs) issued will be 4-byte by default, unless otherwise requested. “Following a globally coordinated policy, ARIN and all the Regional Internet Registries began allocating four-byte ASNs by request in January 2007; January 2009 marks the transition to allocating four-byte ASNs by default ( https://www.arin.net/announcements/2008/07242008.html )”.
The Cisco IOS BGP 4-Byte AS feature allows BGP to carry a Autonomous System Number (ASN) encoded as a 4-byte entity. The addition of this feature allows an operator to use an expanded 4-byte AS number granted by IANA.
Backward compatibility with 2-byte AS number is provided as BGP and Multiprotocol BGP are widely deployed in ISP and MPLS VPN SP environments. Specifically, advertisement via standard based BGP capability code, two new optional transitive attributes: AS4_AGGREGATOR and AS4_PATH, and a reserved AS TRANS 23456 for interoperability between 4-byte ASN capable and non-capable BGP speakers, are introduced to smooth migration from a 2-byte to a 4-byte ASN environment.
NOTE: ASN is carried in BGP in OPEN message, and in the attributes AS_Path, Community, and Atomic Aggregate.
Notations of BGP-4 BYTE AS
- asplain – simple decimal representation of the ASN. For example, ASN 100 will be represented as 100, while 5000 will be represented as 5000.
- asdot+ – breaks the number up in two 16-bit values as low-order and high-order, separated by a dot. All the 2-byte ASNs can be represented in the low-order value. For example, ASN 65535 will be 0.65535, 65536 will be 1.0, 65537 will be 1.1 and so on. The last ASN 4294967296 will be 65535.65535.
- asdot – it is a mixture of asplain and asdot+. Any ASN in the 2-byte range is represented as asplain and any ASN above the 2-byte range is represented as asdot+. For example, 65535 will be 65535 while 65536 will be 1.0. Cisco uses this form of implementation.
Understanding the concept through below lab diagram:
CONFIGURATIONS:
R1(config-if)#router bgp 1.1 >>>
R1(config-router)#neighbor 9.9.12.2 remote-as 100
R1#show run | s router bgp
router bgp 65537 >>> 1.1 is shown as 65537
network 172.9.0.1 mask 255.255.255.255
aggregate-address 172.9.0.0 255.255.0.0 summary-only >>> prefix(Loopback1) 172.9.0.1/32 is aggregated to 172.9.0.0 and advertised to R2
neighbor 9.9.12.2 remote-as 100
R1#show ip bgp neighbor 9.9.12.2 | i ASN
Four-octets ASN Capability: advertised >>> R1 has not received 4-Byte AS Capability from R2
R2#show run | s router bgp
router bgp 100 >>> R2 is the router not supporting 4-bytes AS.
neighbor 9.9.12.1 remote-as 23456 >>> R2 makes neighborship with R1 and R3 using AS TRANS 23456
neighbor 9.9.23.3 remote-as 23456
no auto-summary
R3(config-if)#router bgp 1.2
R3(config-router)#neighbor 9.9.23.2 remote-as 100
R3#sh run | s router bgp
router bgp 65538 >>> 1.2 is shown as 65538
neighbor 9.9.23.2 remote-as 100
R3#show ip bgp 172.9.0.0
BGP routing table entry for 172.9.0.0/16, version 18
Paths: (1 available, best #1, table default)
Not advertised to any peer
100 65537, (aggregated by 65537 172.9.0.1)
9.9.23.2 from 9.9.23.2 (9.9.0.2)
Origin IGP, localpref 100, valid, external, atomic-aggregate, best
rx pathid: 0, tx pathid: 0x0
The 2 new Attributes show in below diagram marked with blue rectangles: