Skip to main content

4. Operations

4.1. Interaction between NEW BGP Speakers

A BGP speaker that supports four-octet AS numbers SHALL advertise this to its peers using BGP Capabilities Advertisements. The AS number of the BGP speaker MUST be carried in the Capability Value field of the "support for four-octet AS number capability".

When a NEW BGP speaker processes an OPEN message from another NEW BGP speaker, it MUST use the AS number encoded in the Capability Value field of the "support for four-octet AS number capability" in lieu of the "My Autonomous System" field of the OPEN message.

A BGP speaker that advertises such a capability to a particular peer, and receives from that peer the advertisement of such a capability, MUST encode AS numbers as four-octet entities in both the AS_PATH attribute and the AGGREGATOR attribute in the updates it sends to the peer and MUST assume that these attributes in the updates received from the peer encode AS numbers as four-octet entities.

The new attributes, AS4_PATH and AS4_AGGREGATOR, MUST NOT be carried in an UPDATE message between NEW BGP speakers. A NEW BGP speaker that receives the AS4_PATH attribute or the AS4_AGGREGATOR attribute in an UPDATE message from another NEW BGP speaker MUST discard the path attribute and continue processing the UPDATE message.

4.2. Interaction between NEW and OLD BGP Speakers

4.2.1. BGP Peering

Note that peering between a NEW BGP speaker and an OLD BGP speaker is possible only if the NEW BGP speaker has a two-octet AS number. However, this document does not assume that an Autonomous System with NEW BGP speakers has to have a globally unique two-octet AS number -- AS_TRANS MUST be used when the NEW BGP speaker does not have a two-octet AS number (even if multiple Autonomous Systems would use it).

4.2.2. Generating Updates

When communicating with an OLD BGP speaker, a NEW BGP speaker MUST send the AS path information in the AS_PATH attribute encoded with two-octet AS numbers. The NEW BGP speaker MUST also send the AS path information in the AS4_PATH attribute (encoded with four-octet AS numbers), except for the case where all of the AS path information is composed of mappable four-octet AS numbers only. In this case, the NEW BGP speaker MUST NOT send the AS4_PATH attribute.

In the AS_PATH attribute encoded with two-octet AS numbers, non-mappable four-octet AS numbers are represented by the well-known two-octet AS number, AS_TRANS. This will preserve the path length property of the AS path information and also help in updating the AS path information received on a NEW BGP speaker from an OLD BGP speaker, as explained in the next section.

The NEW BGP speaker constructs the AS4_PATH attribute from the AS path information. Whenever the AS path information contains the AS_CONFED_SEQUENCE or AS_CONFED_SET path segment, the NEW BGP speaker MUST exclude such path segments from the AS4_PATH attribute being constructed.

The AS4_PATH attribute, being optional transitive, will be carried across a series of OLD BGP speakers without modification and will help preserve the non-mappable four-octet AS numbers in the AS path information.

Similarly, if the NEW BGP speaker has to send the AGGREGATOR attribute, and if the aggregating Autonomous System's AS number is a non-mappable four-octet AS number, then the speaker MUST use the AS4_AGGREGATOR attribute and set the AS number field in the existing AGGREGATOR attribute to the reserved AS number, AS_TRANS. Note that if the AS number is mappable, then the AS4_AGGREGATOR attribute MUST NOT be sent.

4.2.3. Processing Received Updates

When a NEW BGP speaker receives an update from an OLD BGP speaker, it MUST be prepared to receive the AS4_PATH attribute along with the existing AS_PATH attribute. If the AS4_PATH attribute is also received, both of the attributes will be used to construct the exact AS path information, and therefore the information carried by both of the attributes will be considered for AS path loop detection.

Note that a route may have traversed a series of Autonomous Systems with two-octet AS numbers and OLD BGP speakers only. In that case, if the route carries the AS4_PATH attribute, this attribute would have remained unmodified since the route left the last NEW BGP speaker. The trailing AS path information (representing Autonomous Systems with two-octet AS numbers and OLD BGP speakers only) is contained only in the current AS_PATH attribute (encoded in the leading part of the AS_PATH attribute).

Under certain conditions, it may not be possible to reconstruct all of the AS path information from the AS_PATH and the AS4_PATH attributes of a route. This occurs, for example, when two or more routes that carry the AS4_PATH attribute are aggregated by an OLD BGP speaker, and the AS4_PATH attribute of at least one of these routes carries at least one four-octet AS number (as opposed to a two-octet AS number that is encoded in 4 octets). Depending on the implementation, either the AS4_PATH attribute would be lost during route aggregation, or both the AS_PATH attribute and the AS4_PATH attribute would contain valid, partial information that cannot be combined seamlessly, resulting in incomplete AS path information in these cases.

A NEW BGP speaker MUST also be prepared to receive the AS4_AGGREGATOR attribute along with the AGGREGATOR attribute from an OLD BGP speaker. When both of the attributes are received, if the AS number in the AGGREGATOR attribute is not AS_TRANS, then:

  • the AS4_AGGREGATOR attribute and the AS4_PATH attribute SHALL be ignored,
  • the AGGREGATOR attribute SHALL be taken as the information about the aggregating node, and
  • the AS_PATH attribute SHALL be taken as the AS path information.

Otherwise,

  • the AGGREGATOR attribute SHALL be ignored,
  • the AS4_AGGREGATOR attribute SHALL be taken as the information about the aggregating node, and
  • the AS path information would need to be constructed, as in all other cases.

In order to construct the AS path information, it is necessary to first calculate the number of AS numbers in the AS_PATH and AS4_PATH attributes using the method specified in Section 9.1.2.2 of [RFC4271] and in [RFC5065] for route selection.

If the number of AS numbers in the AS_PATH attribute is less than the number of AS numbers in the AS4_PATH attribute, then the AS4_PATH attribute SHALL be ignored, and the AS_PATH attribute SHALL be taken as the AS path information.

If the number of AS numbers in the AS_PATH attribute is larger than or equal to the number of AS numbers in the AS4_PATH attribute, then the AS path information SHALL be constructed by taking as many AS numbers and path segments as necessary from the leading part of the AS_PATH attribute, and then prepending them to the AS4_PATH attribute so that the AS path information has a number of AS numbers identical to that of the AS_PATH attribute. Note that a valid AS_CONFED_SEQUENCE or AS_CONFED_SET path segment SHALL be prepended if it is either the leading path segment or is adjacent to a path segment that is prepended.