Table of contents
Advertise the Prefix-SID via the Prefix-SID attribute
Advertise Peer-SID via BGP EPE
Why use BGP as the control plane of SR-MPLS
IGP for SR-MPSL can only allocate SIDs in the autonomous system AS, and plan the optimal path in the AS domain
When crossing multiple ASs, IGP cannot support it, so BGP for SR-MPLS is proposed
BGP advertises prefix and label information through BGP-LU (BGP Label Unicast)
BGP-LU RFC 3107
BGP-LU defines how to use MBGP to carry one or more MPLS labels in GP update information (labels are notified through the NLRI attribute of BGP, and MP_REACH_NLRI and MP_UNREACH_NLRI are added to carry next-hop information of reachable destinations and information of unreachable destinations)
Subsequent SRs extended BGP-LU to advertise Prefix-SID, and the node appended the Prefix-SID of the prefix to the Prefix-SID routing attribute of BGP-LU for notification (explained below)
BGP SID type
The SID type of BGP is somewhat different from that of IGP, and is mainly divided into three categories: Prefix-SID, Anycast-SID, and Peer-SID
BGP Prefix-SID
BGP Prefix-SID is associated with BGP prefix; similar to IGP Prefix-SID is associated with IGP prefix
Globally visible (all nodes in the SR BGP domain understand this segment)
Direct traffic to the prefix associated with the SID via ECMP multipath
BGP Anycast-SID
Different nodes advertise the same BGP prefix, similar to IGP Anycast-SID; with high reliability
globally visible
BGP Peer-SID
The BGP Peer-SID is associated with the BGP peer and is the local segment
Generally, the IGP SID is used to send the SR data packet to the BGP speaker, and then the BGP Peer-SID is used to send the data packet to the BGP peer
BGP Peer Node-SID (BGP peer node SID):
Neighbors associated with BGP peer sessions
Used to represent a peer node, each peer node is assigned a Peer Node-SID
Steering traffic forwarded via ECMP multipath to specific BGP peer nodes
BGP Peer Adj-SID (BGP peer adjacency SID):
Used to identify a link to a peer, associated with a network path or link to a specific neighbor node
Directs traffic to be forwarded to a specific peer node through a specific interface of this peer node
BGP Peer Set-SID (BGP peer set adjacency SID):
Used to identify a set of peers, associated with a set of neighbors in the peer group
One Peer Set-SID corresponds to multiple Peer Node-SIDs and Peer Adj-SIDs
Steering traffic forwarded via ECMP multipath to a specific peer group
Advertisement of BGP SID
The BGP protocol assigns and advertises SIDs in two ways: Prefix-SID and BGP-EPE
BGP-EPE can only allocate Peer SIDs for BGP peers or inter-peer links (locally valid, not transitive).
Prefix-SID is used to announce Prefix-SID information (globally valid, can be delivered)
Advertise the Prefix-SID via the Prefix-SID attribute
Prefix-SID attribute
The BGP Prefix-SID attribute is a routing attribute extended by BGP-LU to support SR
The BGP protocol message carries the new routing attribute BGP Prefix-SID, and carries and publishes the Prefix-SID (including Anycast SID) through the TLV defined by this attribute.
The BGP Prefix-SID attribute is advertised as an optional, transitive BGP path attribute in BGP (optional transitional attribute)
The BGP Prefix-SID attribute field contains one or more TLVs, currently the following TLVs are defined
Label Index (Label-Index) TLV carries the label index value of BGP Prefix-SID
Originator SRGB TLV carries SRGB
IPv6 SID TLV carries IPv6 SID information
The first two TLVs are only used for the SR MPLS data plane and the third is only used for the SRv6 data plane
BGP Prefix-SID attribute about the packet format of SR-MPLS
Label index TLV (Label-Index)
Type is 1 byte, the value is 1; Label Index is 4 bytes, indicating the label index of the Prefix SID
Originator TLV (Originator SRGB)
The value of Type is 3; SRGB is 6 bytes, indicating the local SRGB start value and range of the BGP peer of Prefix-SID
SRGB if there are multiple means multi-range SRGB
Two methods of BGP Prefix-SID attribute advertisement Prefix-SID
Import IGP to BGP. When BGP advertises the routing prefix to peers, it uses the SID assigned by the IGP protocol for the routing prefix.
Specify a routing policy when learning routes from BGP peers, and bind the SID and routing prefix through the index value of the SID configured in the routing policy
How to create a forwarding entry based on the content passed in the Prefix-SID attribute
When BGP advertises a prefix route within or between domains, it notifies the peer of the route prefix and the SID index value together. After receiving it, other nodes calculate the Prefix-SID to reach the SR node based on the index value of the BGP message and the local SRGP.
Input label: local SRGB + received index value
Out label: for the received SID
Advertise Peer-SID via BGP EPE
BGP EPE (BGP Egree Peer Engineering), also known as BGP egress peer engineering, is used to assign BGP Peer-SID to BGP, including the following three types: BGP Peer Node-SID, BGP Peer Adj-SID, BGP Peer Set- SID
Generally, BGP EPE is configured on the border router to assign Peer-SID to the peer