A BGP session supporting the Multiprotocol BGP Labeled IPv4 or IPv6 Unicast ([
RFC 8277]) AFI/SAFI is required.
When the BGP Prefix-SID attribute is attached to a BGP Labeled IPv4 or IPv6 Unicast [
RFC 8277] AFI/SAFI, it
MUST contain the Label-Index TLV and
MAY contain the Originator SRGB TLV. A BGP Prefix-SID attribute received without a Label-Index TLV
MUST be considered to be "invalid" by the receiving speaker.
The label index provides guidance to the receiving BGP speaker as to the incoming label that
SHOULD be allocated to the prefix.
A BGP speaker may be locally configured with an SRGB=[SRGB_Start, SRGB_End]. The preferred method for deriving the SRGB is a matter of local node configuration.
The mechanisms through which a given label-index value is assigned to a given prefix are outside the scope of this document.
Given a label index L_I, we refer to (L = L_I + SRGB_Start) as the derived label. A BGP Prefix-SID attribute is designated "conflicting" for a speaker M if the derived label value L lies outside the SRGB configured on M. Otherwise, the Label-Index TLV is designated "acceptable" to speaker M.
If multiple different prefixes are received with the same label index, all of the different prefixes
MUST have their BGP Prefix-SID attribute considered to be "conflicting".
If multiple valid paths for the same prefix are received from multiple BGP speakers or, in the case of [
RFC 7911], from the same BGP speaker, and the BGP Prefix-SID attributes do not contain the same label index, then the label index from the best path BGP Prefix-SID attribute
SHOULD be chosen with a notable exception being when [
RFC 5004] is being used to dampen route changes.
When a BGP speaker receives a path from a neighbor with an "acceptable" BGP Prefix-SID attribute and that path is selected as the best path, it
SHOULD program the derived label as the label for the prefix in its local MPLS data plane.
When a BGP speaker receives a path from a neighbor with an "invalid" or "conflicting" BGP Prefix-SID attribute, or when a BGP speaker receives a path from a neighbor with a BGP Prefix-SID attribute but is unable to process it (e.g., local policy disables the functionality), it
MUST ignore the BGP Prefix-SID attribute. For the purposes of label allocation, a BGP speaker
MUST assign a local (also called dynamic) label (non-SRGB) for such a prefix as per classic Multiprotocol BGP IPv4/IPv6 Labeled Unicast ([
RFC 8277]) operation.
In the case of an "invalid" BGP Prefix-SID attribute, a BGP speaker
MUST follow the error-handling rules specified in
Section 6. A BGP speaker
SHOULD log an error for further analysis. In the case of a "conflicting" BGP Prefix-SID attribute, a BGP speaker
SHOULD NOT treat it as an error and
SHOULD propagate the attribute unchanged. A BGP speaker
SHOULD log a warning for further analysis, i.e., in the case the conflict is not due to a label-index transition.
When a BGP Prefix-SID attribute changes and transitions from "conflicting" to "acceptable", the BGP Prefix-SID attributes for other prefixes may also transition to "acceptable" as well. Implementations
SHOULD ensure all impacted prefixes revert to using the label indices corresponding to these newly "acceptable" BGP Prefix-SID attributes.
The outgoing label is always programmed as per classic Multiprotocol BGP IPv4/IPv6 Labeled Unicast ([
RFC 8277]) operation. Specifically, a BGP speaker receiving a prefix with a BGP Prefix-SID attribute and a label NLRI field of Implicit NULL [
RFC 3032] from a neighbor
MUST adhere to standard behavior and program its MPLS data plane to pop the top label when forwarding traffic to the prefix. The label NLRI defines the outbound label that
MUST be used by the receiving node.