A BGP Prefix Segment is a segment associated with a BGP prefix. A BGP Prefix Segment is a network-wide instruction to forward the packet along the ECMP-aware best path to the related prefix.
The BGP Prefix Segment is defined as the BGP Prefix-SID Attribute in [
RFC 8669], which contains an index. Throughout this document, the BGP Prefix Segment Attribute is referred to as the "BGP Prefix-SID" and the encoded index as the label index.
In this document, the network design decision has been made to assume that all the nodes are allocated the same SRGB (Segment Routing Global Block), e.g., [16000, 23999]. This provides operational simplification as explained in
Section 8, but this is not a requirement.
For illustration purposes, when considering an MPLS data plane, it is assumed that the label index allocated to prefix 192.0.2.x/32 is X. As a result, a local label (16000+x) is allocated for prefix 192.0.2.x/32 by each node throughout the DC fabric.
When the IPv6 data plane is considered, it is assumed that Node X is allocated IPv6 address (segment) 2001:DB8::X.
Referring to
Figure 1 and [
RFC 7938], the following design modifications are introduced:
-
Each node peers with its neighbors via an EBGP session with extensions defined in [RFC 8277] (named "EBGP8277" throughout this document) and with the BGP Prefix-SID attribute extension as defined in [RFC 8669].
-
The forwarding plane at Tier-2 and Tier-1 is MPLS.
-
The forwarding plane at Tier-3 is either IP2MPLS (if the host sends IP traffic) or MPLS2MPLS (if the host sends MPLS-encapsulated traffic).
Figure 2 zooms into a path from ServerA to ServerZ within the topology of
Figure 1.
+-----+ +-----+ +-----+
+---------->|NODE | |NODE | |NODE |
| | 4 |--+->| 7 |--+--| 10 |---+
| +-----+ +-----+ +-----+ |
| |
+-----+ +-----+
|NODE | |NODE |
| 1 | | 11 |
+-----+ +-----+
| |
A <- Servers -> Z
Referring to Figures [
1] and [
2], and assuming the IP address with the AS and label-index allocation previously described, the following sections detail the control-plane operation and the data-plane states for the prefix 192.0.2.11/32 (loopback of Node11).
Node11 originates 192.0.2.11/32 in BGP and allocates to it a BGP Prefix-SID with label-index: index11 [
RFC 8669].
Node11 sends the following EBGP8277 update to Node10:
-
-
IP Prefix:
-
192.0.2.11/32
-
Label:
-
Implicit NULL
-
Next hop:
-
Node11's interface address on the link to Node10
-
AS Path:
-
{11}
-
BGP Prefix-SID:
-
Label-Index 11
Node10 receives the above update. As it is SR capable, Node10 is able to interpret the BGP Prefix-SID; therefore, it understands that it should allocate the label from its own SRGB block, offset by the label index received in the BGP Prefix-SID (16000+11, hence, 16011) to the Network Layer Reachability Information (NLRI) instead of allocating a nondeterministic label out of a dynamically allocated portion of the local label space. The implicit NULL label in the NLRI tells Node10 that it is the penultimate hop and that it must pop the top label on the stack before forwarding traffic for this prefix to Node11.
Then, Node10 sends the following EBGP8277 update to Node7:
-
-
IP Prefix:
-
192.0.2.11/32
-
Label:
-
16011
-
Next hop:
-
Node10's interface address on the link to Node7
-
AS Path:
-
{10, 11}
-
BGP Prefix-SID:
-
Label-Index 11
Node7 receives the above update. As it is SR capable, Node7 is able to interpret the BGP Prefix-SID; therefore, it allocates the local (incoming) label 16011 (16000 + 11) to the NLRI (instead of allocating a "dynamic" local label from its label manager). Node7 uses the label in the received EBGP8277 NLRI as the outgoing label (the index is only used to derive the local/incoming label).
Node7 sends the following EBGP8277 update to Node4:
-
-
IP Prefix:
-
192.0.2.11/32
-
Label:
-
16011
-
Next hop:
-
Node7's interface address on the link to Node4
-
AS Path:
-
{7, 10, 11}
-
BGP Prefix-SID:
-
Label-Index 11
Node4 receives the above update. As it is SR capable, Node4 is able to interpret the BGP Prefix-SID; therefore, it allocates the local (incoming) label 16011 to the NLRI (instead of allocating a "dynamic" local label from its label manager). Node4 uses the label in the received EBGP8277 NLRI as an outgoing label (the index is only used to derive the local/incoming label).
Node4 sends the following EBGP8277 update to Node1:
-
-
IP Prefix:
-
192.0.2.11/32
-
Label:
-
16011
-
Next hop:
-
Node4's interface address on the link to Node1
-
AS Path:
-
{4, 7, 10, 11}
-
BGP Prefix-SID:
-
Label-Index 11
Node1 receives the above update. As it is SR capable, Node1 is able to interpret the BGP Prefix-SID; therefore, it allocates the local (incoming) label 16011 to the NLRI (instead of allocating a "dynamic" local label from its label manager). Node1 uses the label in the received EBGP8277 NLRI as an outgoing label (the index is only used to derive the local/incoming label).
Referring to
Figure 1, and assuming all nodes apply the same advertisement rules described above and all nodes have the same SRGB (16000-23999), here are the IP/MPLS forwarding tables for prefix 192.0.2.11/32 at Node1, Node4, Node7, and Node10.
Incoming Label or IP Destination
|
Outgoing Label
|
Outgoing Interface
|
16011
|
16011
|
ECMP{3, 4}
|
192.0.2.11/32
|
16011
|
ECMP{3, 4}
|
Table 1: Node1 Forwarding Table
Incoming Label or IP Destination
|
Outgoing Label
|
Outgoing Interface
|
16011
|
16011
|
ECMP{7, 8}
|
192.0.2.11/32
|
16011
|
ECMP{7, 8}
|
Table 2: Node4 Forwarding Table
Incoming Label or IP Destination
|
Outgoing Label
|
Outgoing Interface
|
16011
|
16011
|
10
|
192.0.2.11/32
|
16011
|
10
|
Table 3: Node7 Forwarding Table
Incoming Label or IP Destination
|
Outgoing Label
|
Outgoing Interface
|
16011
|
POP
|
11
|
192.0.2.11/32
|
N/A
|
11
|
Table 4: Node10 Forwarding Table
A network design choice could consist of switching all the traffic through Tier-1 and Tier-2 as MPLS traffic. In this case, one could filter away the IP entries at Node4, Node7, and Node10. This might be beneficial in order to optimize the forwarding table size.
A network design choice could consist of allowing the hosts to send MPLS-encapsulated traffic based on the Egress Peer Engineering (EPE) use case as defined in [
SR-CENTRAL-EPE]. For example, applications at HostA would send their Z-destined traffic to Node1 with an MPLS label stack where the top label is 16011 and the next label is an EPE peer segment ([
SR-CENTRAL-EPE]) at Node11 directing the traffic to Z.
When the previous design is deployed, the operator enjoys global BGP Prefix-SID and label allocation throughout the DC fabric.
A few examples follow:
-
Normal forwarding to Node11: A packet with top label 16011 received by any node in the fabric will be forwarded along the ECMP-aware BGP best path towards Node11, and the label 16011 is penultimate popped at Node10 (or at Node 9).
-
Traffic-engineered path to Node11: An application on a host behind Node1 might want to restrict its traffic to paths via the Spine node Node5. The application achieves this by sending its packets with a label stack of {16005, 16011}. BGP Prefix-SID 16005 directs the packet up to Node5 along the path (Node1, Node3, Node5). BGP Prefix-SID 16011 then directs the packet down to Node11 along the path (Node5, Node9, Node11).
The design previously described can be deployed incrementally. Let us assume that Node7 does not support the BGP Prefix-SID, and let us show how the fabric connectivity is preserved.
From a signaling viewpoint, nothing would change; even though Node7 does not support the BGP Prefix-SID, it does propagate the attribute unmodified to its neighbors.
From a label-allocation viewpoint, the only difference is that Node7 would allocate a dynamic (random) label to the prefix 192.0.2.11/32 (e.g., 123456) instead of the "hinted" label as instructed by the BGP Prefix-SID. The neighbors of Node7 adapt automatically as they always use the label in the BGP8277 NLRI as an outgoing label.
Node4 does understand the BGP Prefix-SID; therefore, it allocates the indexed label in the SRGB (16011) for 192.0.2.11/32.
As a result, all the data-plane entries across the network would be unchanged except the entries at Node7 and its neighbor Node4 as shown in the figures below.
The key point is that the end-to-end Label Switched Path (LSP) is preserved because the outgoing label is always derived from the received label within the BGP8277 NLRI. The index in the BGP Prefix-SID is only used as a hint on how to allocate the local label (the incoming label) but never for the outgoing label.
Incoming Label or IP Destination
|
Outgoing Label
|
Outgoing Interface
|
12345
|
16011
|
10
|
Table 5: Node7 Forwarding Table
Incoming Label or IP Destination
|
Outgoing Label
|
Outgoing Interface
|
16011
|
12345
|
7
|
Table 6: Node4 Forwarding Table
The BGP Prefix-SID can thus be deployed incrementally, i.e., one node at a time.
When deployed together with a homogeneous SRGB (the same SRGB across the fabric), the operator incrementally enjoys the global prefix segment benefits as the deployment progresses through the fabric.
The same exact design as EBGP8277 is used with the following modifications:
-
All nodes use the same AS number.
-
Each node peers with its neighbors via an internal BGP session (IBGP) with extensions defined in [RFC 8277] (named "IBGP8277" throughout this document).
-
Each node acts as a route reflector for each of its neighbors and with the next-hop-self option. Next-hop-self is a well-known operational feature that consists of rewriting the next hop of a BGP update prior to sending it to the neighbor. Usually, it's a common practice to apply next-hop-self behavior towards IBGP peers for EBGP-learned routes. In the case outlined in this section, it is proposed to use the next-hop-self mechanism also to IBGP-learned routes.
Cluster-1
+-----------+
| Tier-1 |
| +-----+ |
| |NODE | |
| | 5 | |
Cluster-2 | +-----+ | Cluster-3
+---------+ | | +---------+
| Tier-2 | | | | Tier-2 |
| +-----+ | | +-----+ | | +-----+ |
| |NODE | | | |NODE | | | |NODE | |
| | 3 | | | | 6 | | | | 9 | |
| +-----+ | | +-----+ | | +-----+ |
| | | | | |
| | | | | |
| +-----+ | | +-----+ | | +-----+ |
| |NODE | | | |NODE | | | |NODE | |
| | 4 | | | | 7 | | | | 10 | |
| +-----+ | | +-----+ | | +-----+ |
+---------+ | | +---------+
| |
| +-----+ |
| |NODE | |
Tier-3 | | 8 | | Tier-3
+-----+ +-----+ | +-----+ | +-----+ +-----+
|NODE | |NODE | +-----------+ |NODE | |NODE |
| 1 | | 2 | | 11 | | 12 |
+-----+ +-----+ +-----+ +-----+
-
For simple and efficient route propagation filtering and as illustrated in Figure 3:
-
Node5, Node6, Node7, and Node8 use the same Cluster ID (Cluster-1).
-
Node3 and Node4 use the same Cluster ID (Cluster-2).
-
Node9 and Node10 use the same Cluster ID (Cluster-3).
-
The control-plane behavior is mostly the same as described in the previous section; the only difference is that the EBGP8277 path propagation is simply replaced by an IBGP8277 path reflection with next hop changed to self.
-
The data-plane tables are exactly the same.