BGP for SRv6

IGP for SR allocates SIDs only within an autonomous system (AS). Proper SID orchestration in an AS facilitates the planning of an optimal path in the AS. However, IGP for SR does not work if paths cross multiple ASs on a large-scale network. BGP for SRv6 is an extension of BGP for Segment Routing. This function enables a device to allocate BGP peer SIDs based on BGP peer information and report the SID information to a controller. An SRv6 TE Policy uses BGP peer SIDs for path orchestration, thereby obtaining the optimal inter-AS path. BGP for SRv6 mainly involves the BGP egress peer engineering (EPE) extension and BGP-LS extension.

BGP EPE

BGP EPE allocates BGP peer SIDs to inter-AS paths. BGP-LS advertises the BGP peer SIDs to the controller. A forwarder that does not establish a BGP-LS peer relationship with the controller can run BGP-LS to advertise a peer SID to a BGP peer that has established a BGP-LS peer relationship with the controller. The BGP peer then runs BGP-LS to advertise the peer SID to the network controller. As shown in Figure 1, BGP EPE can allocate peer node segments (Peer-Node SIDs) and peer adjacency segments (Peer-Adj SIDs).
  • A Peer-Node SID identifies a peer node. The peers at both ends of each BGP session are assigned Peer-Node SIDs. An EBGP peer relationship established based on loopback interfaces may traverse multiple physical links. In this case, the Peer-Node SID of a peer is mapped to multiple outbound interfaces. Traffic can be forwarded through any outbound interface or be load-balanced among multiple outbound interfaces.

  • A Peer-Adj SID identifies an adjacency to a peer. An EBGP peer relationship established based on loopback interfaces may traverse multiple physical links. In this case, each adjacency is assigned a Peer-Adj SID. Only a specified link (mapped to a specified outbound interface) can be used for forwarding.

Figure 1 BGP EPE networking

On the network shown in Figure 1, ASBR1 and ASBR3 are directly connected through two physical links. An EBGP peer relationship is established between ASBR1 and ASBR3 through loopback interfaces. ASBR1 runs BGP EPE to allocate the Peer-Node SID 2001:DB8::1 to its peer (ASBR3) and to allocate the Peer-Adj SIDs 2001:DB8:1::2 and 2001:DB8:1::3 to the physical links. For EBGP peers that are directly connected through physical interfaces, BGP EPE allocates only Peer-Node SIDs rather than Peer-Adj SIDs. For example, on the network shown in Figure 1, BGP EPE allocates only Peer-Node SIDs 2001:DB8::4, 2001:DB8::5, and 2001:DB8::6 to ASBR1-ASBR5, ASBR2-ASBR4, and ASBR2-ASBR5, respectively.

Peer-Node SIDs and Peer-Adj SIDs are both local SIDs. That is, they are only effective on a local device, and other devices may use the same Peer-Node SID and Peer-Adj SID. Currently, BGP EPE supports IPv6 EBGP and IBGP peers.

BGP EPE allocates SIDs only to BGP peers and links, but cannot be used to construct a forwarding path. BGP peer SIDs must be used with IGP SIDs to form an E2E path.

BGP Virtual Link

On the network shown in Figure 2, an EBGP or multi-hop IBGP peer relationship is established between R1 and P1, and corresponding link information can be reported to the controller through BGP-LS. For example, R1 generates a piece of link information containing the local address 2001:DB8:2::1 and the remote address 2001:DB8:2::2, whereas P1 generates a piece of link information containing the local address 2001:DB8:2::2 and the remote address 2001:DB8:2::1. These two pieces of link information match each other. After parsing the received link information, the controller obtains corresponding peer information and then combines the two pieces of link information to form complete link information for E2E SR path computation. The implementation between P2 and R3 is similar to that between R1 and P1. R1 and R3 establish a BGP peer relationship and are not directly connected. They communicate across a third-party network (an external network providing IPv6 L3VPN services) and achieve IP reachability through P1 and P2. Although R1 and R3 can also report link information through BGP-LS, the addresses in the link information reported by one device do not match those reported by the other device. As a result, the controller cannot combine the two pieces of link information reported by these devices. To complete E2E SRv6 TE Policy deployment in this case, configure a BGP peer relationship-based virtual link (highlighted in blue in Figure 2) between R1 and R3. The local and remote IPv6 addresses of the virtual link must be the same as those used to establish the BGP peer relationship. Attributes, including link latency, metric, affinity, and SRLG attributes, can be configured for SRv6 TE Policy path computation.

Figure 2 BGP peer relationship-based virtual link

BGP-LS

Inter-AS SRv6 TE Policies can be established by manually specifying explicit paths, or they can be orchestrated by a controller. In a controller-based orchestration scenario, intra- and inter-AS SIDs are reported to the controller using BGP-LS. Inter-AS links must support TE link attribute configuration and reporting to the controller. This enables the controller to compute primary and backup paths based on the link attributes. BGP EPE discovers network topology information and allocates SIDs. BGP-LS reports the topology and SID information to the controller through the Link network layer reachability information (NLRI) field and SRv6 SID. Figure 3 and Figure 4 show Link NLRI formats.
Figure 3 Format of link information (Peer-Adj SIDs) advertised by BGP-LS
Table 1 Description of involved fields

Field

Description

NLRI

Network layer reachability information. It consists of the following parts:
  • Local Descriptor: local descriptor, which contains a local router ID, a local AS number, and a BGP-LS ID
  • Remote Descriptor: remote descriptor, which contains a peer router ID and a peer AS number
  • Link Descriptor: link descriptor, which contains addresses used by a BGP session

Link Attribute

Link information. It is a part of the Link NLRI.
  • Administrative Group: link management group attribute
  • Max Link BW: maximum link bandwidth
  • Max Reservable Link BW: maximum reservable link bandwidth
  • Unreserved BW: remaining link bandwidth
  • Shared Risk Link Group: SRLG
  • SRv6 End.X TLV: Peer-Adj-SID TLV
Figure 4 Format of SRv6 SID information (Peer-Node SIDs) advertised by BGP-LS
Table 2 Description of involved fields

Field

Description

NLRI

Network layer reachability information. It consists of the following parts:

  • Local Descriptor: local descriptor, which contains a local BGP router ID, a local AS number, and a BGP-LS ID
  • SRv6 SID Descriptor: SRv6 SID descriptor, which contains an allocated SID

SRv6 SID Attribute

SRv6 SID attribute information. It is a part of the SRv6 SID NLRI.

  • SRv6 Endpoint Function: SRv6 function description, which specifies the instruction corresponding to a SID
  • SRv6 BGP Peer Node SID: BGP peer information
Figure 5 shows the format of an SRv6 BGP Peer-Node SID.
Figure 5 SRv6 BGP Peer-Node SID format
Table 3 Fields in an SRv6 BGP Peer-Node SID TLV

Field

Length

Description

Type

16 bits

TLV type.

Length

16 bits

Packet length.

Flags

8 bits

Flags field used in an SRv6 BGP Peer-Node SID TLV. Figure 6 shows the format of this field.
Figure 6 Flags field
In this field:
  • B: backup flag. If set, the SID is eligible for protection.
  • S: set flag. If set, the SID refers to a set of BGP peering sessions.
  • P: persistent flag. If set, the SID is persistently allocated.

Weight (not currently supported)

8 bits

SID weight used for load balancing purposes.

Peer AS Number

32 bits

BGP AS number of the peer router.

Peer BGP Identifier

32 bits

BGP identifier of the peer router.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >