BGP Support for Four-octet AS Number Space
obsoleted by
- rfc-6793 — BGP Support for Four-Octet Autonomous System (AS) Number Space
Extracted elements (21)
AS_TRANS is used to represent non-mappable 4-octet AS numbers in 2-octet AS_PATH encodings rather than collapsing or dropping path entries, which preserves path length and enables reconstruction of the full 4-octet path from AS4_PATH once the route reaches a NEW speaker.
AS4_PATH and AS4_AGGREGATOR are defined as optional transitive attributes so they pass through OLD BGP speakers unmodified, preserving 4-octet AS path information end-to-end across legacy infrastructure without requiring OLD speaker upgrades.
The transition scheme assumes an AS starts using 4-octet AS numbers only after all BGP speakers within it have been upgraded, simplifying the operational model by avoiding mixed 2/4-octet environments within a single AS.
BGP Communities attribute (RFC 1997) encodes AS numbers in the high-order two octets, which does not work for 4-octet AS speakers. Such speakers should use Four-octet AS Specific Extended Communities instead.
Peering between a NEW BGP speaker and an OLD one is possible only if the NEW BGP speaker has a 2-octet AS number or uses AS_TRANS. A non-mappable 4-octet AS number cannot be used as a BGP Confederation Member AS Number until all speakers in the confederation support 4-octet AS numbers.
When an AS with OLD BGP speakers peers with multiple ASes using AS_TRANS, Multi-Exit Discriminator (MED) values may incorrectly influence route selection across routes from different neighboring ASes, due to the indistinguishable AS_TRANS values.
A NEW BGP speaker that has advertised and received the 4-octet AS Number Capability with a peer MUST encode AS numbers as 4-octet entities in both AS_PATH and AGGREGATOR attributes sent to that peer, and MUST assume received attributes encode 4-octet AS numbers.
An OLD BGP speaker MUST NOT use AS_TRANS (23456) as its own Autonomous System number.
AS4_PATH and AS4_AGGREGATOR SHOULD NOT be carried in UPDATE messages between NEW BGP peers. If received from a NEW peer, these attributes SHOULD be discarded.
If the number of AS numbers in AS_PATH is less than in AS4_PATH, the AS4_PATH attribute SHALL be ignored and AS_PATH taken as the AS path information.
When a NEW BGP speaker receives both AGGREGATOR and AS4_AGGREGATOR attributes from an OLD speaker, if the AS number in AGGREGATOR is not AS_TRANS, the AS4_AGGREGATOR and AS4_PATH SHALL be ignored and AGGREGATOR and AS_PATH taken as authoritative.
When AS_PATH count is greater than or equal to AS4_PATH count, AS path is constructed by taking leading segments from AS_PATH and prepending them to AS4_PATH until the combined path has the same AS count as AS_PATH; valid AS_CONFED_SEQUENCE/SET segments SHALL be prepended if leading or adjacent to a prepended segment.
When communicating with an OLD BGP speaker, a NEW speaker MUST send AS path information in AS_PATH encoded with 2-octet AS numbers, and MUST also send AS4_PATH (encoded with 4-octet AS numbers) except when the entire AS path is composed of 2-octet AS numbers only.
When constructing AS4_PATH for an OLD BGP peer, the NEW speaker MUST exclude AS_CONFED_SEQUENCE and AS_CONFED_SET path segments to prevent confederation path segments from propagating outside a confederation.
AS_TRANS is a reserved 2-octet AS number (23456) used to represent non-mappable 4-octet AS numbers in AS path information encoded with 2-octet AS numbers, preserving path length while signaling that a 4-octet AS number exists in AS4_PATH.
AS4_AGGREGATOR is a new optional transitive BGP path attribute (type code 18) with the same semantics as AGGREGATOR but carrying a 4-octet AS number instead of a 2-octet one.
AS4_PATH is a new optional transitive BGP path attribute (type code 17) with the same semantics as AS_PATH but encoding AS numbers as 4-octet entities. AS_CONFED_SEQUENCE and AS_CONFED_SET segment types are invalid in AS4_PATH.
The Four-octet AS Number Capability is advertised via BGP Capability Advertisements (Capability Code 65) and carries the speaker's 4-octet AS number in its 4-byte Capability Value field, with Capability Length set to 4.
The AS number pool is expanded from 0–65535 (2-octet) to 0–4294967295 (4-octet) under the IANA 'Autonomous System Numbers' registry. Capability Code 65 is assigned for Four-octet AS Number Capability. AS4_PATH is assigned type code 17, AS4_AGGREGATOR type code 18, and AS_TRANS is assigned AS number 23456.
Inconsistency between AS_PATH and AS4_PATH attributes can cause loss of AS path information and potential routing loops, particularly when OLD BGP speakers aggregate routes that carry AS4_PATH with 4-octet AS numbers. This inconsistency could be exploited by an attacker to manipulate routing.
In NEW-to-NEW BGP speaker sessions, AS numbers in AS_PATH and AGGREGATOR attributes are encoded as 4-octet (32-bit) entities rather than the legacy 2-octet encoding. Existing 2-octet AS numbers are mapped to 4-octet by zero-padding the two high-order octets.