4-Byte AS Number

Purpose

2-byte autonomous system (AS) numbers used on networks range from 1 to 65535, and the available AS numbers are close to exhaustion as networks expand. Therefore, the AS number range needs to be extended. 4-byte AS numbers ranging from 1 to 4294967295 can address this problem. New speakers that support 4-byte AS numbers can co-exist with old speakers that support only 2-byte AS numbers.

Definition

4-byte AS numbers are extended from 2-byte AS numbers. Border Gateway Protocol (BGP) peers use a new capability code and optional transitive attributes to negotiate the 4-byte AS number capability and transmit 4-byte AS numbers. This mechanism enables communication between new speakers and between old speakers and new speakers.

To support 4-byte AS numbers, an open capability code 0x41 is defined in a standard protocol for BGP connection negotiation. 0x41 indicates that the BGP speaker supports 4-byte AS numbers.

The following new optional transitive attributes are defined by standard protocols and used to transmit 4-byte AS numbers in old sessions:
  • AS4_Path coded 0x11
  • AS4_Aggregator coded 0x12

If a new speaker with an AS number greater than 65535 communicates with an old speaker, the old speaker needs to set the peer AS number to AS_TRANS. AS_TRANS is a reserved AS number with the value being 23456.

Related Concepts

  • New speaker: a BGP peer that supports 4-byte AS numbers

  • Old speaker: a BGP peer that does not support 4-byte AS numbers

  • New session: a BGP connection established between new speakers

  • Old session: a BGP connection established between a new speaker and an old speaker, or between old speakers

Principles

BGP speakers negotiate capabilities by exchanging Open messages. Figure 1 shows the format of Open messages exchanged between new speakers. The header of a BGP Open message is fixed, in which My AS Number is supposed to be the local AS number. However, My AS Number carries only 2-byte AS numbers, and does not support 4-byte AS numbers. Therefore, a new speaker adds the AS_TRANS 23456 to My AS Number and its local AS number to Optional Parameters before it sends an Open message to a peer. After the peer receives the message, it can determine whether the new speaker supports 4-byte AS numbers by checking Optional Parameters in the message.
Figure 1 Format of Open messages sent by new speakers
Figure 2 shows how peer relationships are established between new speakers, and between an old speaker and a new speaker. BGP speakers notify each other of whether they support 4-byte AS numbers by exchanging Open messages. After the capability negotiation, new sessions are established between new speakers, and old sessions are established between a new speaker and an old speaker.
Figure 2 Process of establishing a BGP peer relationship
The AS_Path and AS_Aggregator attributes in Update messages exchanged between new speakers carry 4-byte AS numbers, whereas the two attributes in Update messages sent by an old speaker carry 2-byte AS numbers.
  • When a new speaker sends an Update message carrying an AS number greater than 65535 to an old speaker, the new speaker uses AS4_Path and AS4_Aggregator to assist AS_Path and AS_Aggregator in transferring 4-byte AS numbers. AS4_Path and AS4_Aggregator are transparent to the old speaker. In the networking shown in Figure 3, before the new speaker in AS 2.2 sends an Update message to the old speaker in AS 65002, the new speaker replaces each 4-byte AS number (2.2, 1.1, 65001) with 23456 in AS_Path. Therefore, the AS_Path carried in the Update message is (23456, 23456, 65001), and the carried AS4_Path is (2.2, 1.1, 65001). After the old speaker in AS 65002 receives the Update message, it transparently transmits the message to other ASs.

  • When the new speaker receives an Update message carrying AS_Path, AS4_Path, AS_Aggregator, and AS4_Aggregator from the old speaker, the new speaker uses the reconstruction algorithm to reconstruct the actual AS_Path and AS_Aggregator. On the network shown in Figure 3, after the new speaker in AS 65003 receives an Update message carrying AS_Path (65002, 23456, 23456, 65001) and AS4_Path (2.2, 1.1, 65001) from the old speaker in AS 65002, the new speaker reconstructs the actual AS_Path (65002, 2.2, 1.1, 65001).

Figure 3 Process of transmitting a BGP Update message

Format of 4-byte AS numbers

A 4-byte AS number can be an integer or in dotted notation. The system stores 4-byte AS numbers as unsigned integers, regardless of their formats. 4-byte AS numbers in dotted notation are in the format of X.Y. The formula of the conversion between 4-byte AS numbers for the two formats is as follows: Integer 4-byte AS number = X x 65536 + Y. For example, the 4-byte AS number in dotted notation 2.3 can be converted to the integer 4-byte AS number 131075 (2 x 65536 + 3).

The NetEngine 8000 F supports 4-byte AS numbers of both formats. The 4-byte AS numbers displayed in the configuration files are in the format configured by users.

By default, the 4-byte AS numbers displayed in the display and debugging command outputs are in dotted notation, regardless of the configured format. If the default display format of 4-byte AS numbers is changed from dotted notation to integer using a command, the 4-byte AS numbers will be displayed as integers automatically.

Adjusting the display format of 4-byte AS numbers affects the matching results of AS_Path regular expressions and extended community filters. If you adjust the display format of 4-byte AS numbers on a system that uses an AS_Path regular expression or extended community filter as the export or import policy, reconfigure the AS_Path regular expression or extended community filter. If you do not reconfigure the AS_Path regular expression or extended community filter, routes cannot match the export or import policy, and a network error may occur.

Benefits

4-byte AS numbers alleviate AS number exhaustion and therefore are beneficial to carriers who need to expand the network scale.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >