Configure BGP Link-State
BGP Link-State (LS) is an Address Family Identifier (AFI) and Sub-address Family Identifier (SAFI) originally defined to carry interior gateway protocol (IGP) link-state information through BGP. The BGP Network Layer Reachability Information (NLRI) encoding format for BGP-LS and a new BGP Path Attribute called the BGP-LS attribute are defined in RFC7752. The identifying key of each Link-State object, namely a node, link, or prefix, is encoded in the NLRI and the properties of the object are encoded in the BGP-LS attribute.
The BGP-LS Extensions for Segment Routing are documented in RFC9085.
BGP-LS applications like an SR Path Computation Engine (SR-PCE) can learn the SR capabilities of the nodes in the topology and the mapping of SR segments to those nodes. This can enable the SR-PCE to perform path computations based on SR-TE and to steer traffic on paths different from the underlying IGP-based distributed best-path computation.
The following figure shows a typical deployment scenario. In each IGP area, one or more nodes (BGP speakers) are configured with BGP-LS. These BGP speakers form an iBGP mesh by connecting to one or more route-reflectors. This way, all BGP speakers (specifically the route-reflectors) obtain Link-State information from all IGP areas (and from other ASes from eBGP peers).
Usage Guidelines and Limitations
-
BGP-LS supports IS-IS and OSPFv2.
-
The identifier field of BGP-LS (referred to as the Instance-ID) identifies the IGP routing domain where the NLRI belongs. The NLRIs representing link-state objects (nodes, links, or prefixes) from the same IGP routing instance must use the same Instance-ID value.
-
When there is only a single protocol instance in the network where BGP-LS is operational, we recommend configuring the Instance-ID value to 0.
-
Assign consistent BGP-LS Instance-ID values on all BGP-LS Producers within a given IGP domain.
-
NLRIs with different Instance-ID values are considered to be from different IGP routing instances.
-
Unique Instance-ID values must be assigned to routing protocol instances operating in different IGP domains. This allows the BGP-LS Consumer (for example, SR-PCE) to build an accurate segregated multi-domain topology based on the Instance-ID values, even when the topology is advertised via BGP-LS by multiple BGP-LS Producers in the network.
-
If the BGP-LS Instance-ID configuration guidelines are not followed, a BGP-LS Consumer may see duplicate link-state objects for the same node, link, or prefix when there are multiple BGP-LS Producers deployed. This may also result in the BGP-LS Consumers getting an inaccurate network-wide topology.
-
The following table defines the supported extensions to the BGP-LS address family for carrying IGP topology information (including SR information) via BGP. For more information on the BGP-LS TLVs, refer to Border Gateway Protocol - Link State (BGP-LS) Parameters.
TLV Code Point | Description | Produced by IS-IS | Produced by OSPFv2 | Produced by BGP |
---|---|---|---|---|
256 | Local Node Descriptors | X | X | — |
257 | Remote Node Descriptors | X | X | — |
258 | Link Local/Remote Identifiers | X | X | — |
259 | IPv4 interface address | X | X | — |
260 | IPv4 neighbor address | X | ||
261 | IPv6 interface address | X | — | — |
262 | IPv6 neighbor address | X | — | — |
263 | Multi-Topology ID | X | — | — |
264 | OSPF Route Type | — | X | — |
265 | IP Reachability Information | X | X | — |
266 | Node MSD TLV | X | X | — |
267 | Link MSD TLV | X | X | — |
512 | Autonomous System | — | — | X |
513 | BGP-LS Identifier | — | — | X |
514 | OSPF Area-ID | — | X | — |
515 | IGP Router-ID | X | X | — |
516 | BGP Router-ID TLV | — | — | X |
517 | BGP Confederation Member TLV | — | — | X |
1024 | Node Flag Bits | X | X | — |
1026 | Node Name | X | X | — |
1027 | IS-IS Area Identifier | X | — | — |
1028 | IPv4 Router-ID of Local Node | X | X | — |
1029 | IPv6 Router-ID of Local Node | X | — | — |
1030 | IPv4 Router-ID of Remote Node | X | X | — |
1031 | IPv6 Router-ID of Remote Node | X | — | — |
1034 | SR Capabilities TLV | X | X | — |
1035 | SR Algorithm TLV | X | X | — |
1036 | SR Local Block TLV | X | X | — |
1039 | Flex Algo Definition (FAD) TLV | X | X | — |
1044 | Flex Algorithm Prefix Metric (FAPM) TLV | X | X | — |
1088 | Administrative group (color) | X | X | — |
1089 | Maximum link bandwidth | X | X | — |
1090 | Max. reservable link bandwidth | X | X | — |
1091 | Unreserved bandwidth | X | X | — |
1092 | TE Default Metric | X | X | — |
1093 | Link Protection Type | X | X | — |
1094 | MPLS Protocol Mask | X | X | — |
1095 | IGP Metric | X | X | — |
1096 | Shared Risk Link Group | X | X | — |
1099 | Adjacency SID TLV | X | X | — |
1100 | LAN Adjacency SID TLV | X | X | — |
1101 | PeerNode SID TLV | — | — | X |
1102 | PeerAdj SID TLV | — | — | X |
1103 | PeerSet SID TLV | — | — | X |
1114 | Unidirectional Link Delay TLV | X | X | — |
1115 | Min/Max Unidirectional Link Delay TLV | X | X | — |
1116 | Unidirectional Delay Variation TLV | X | X | — |
1117 | Unidirectional Link Loss | X | X | — |
1118 | Unidirectional Residual Bandwidth | X | X | — |
1119 | Unidirectional Available Bandwidth | X | X | — |
1120 | Unidirectional Utilized Bandwidth | X | X | — |
1122 | Application-Specific Link Attribute TLV | X | X | — |
1152 | IGP Flags | X | X | — |
1153 | IGP Route Tag | X | X | — |
1154 | IGP Extended Route Tag | X | — | — |
1155 | Prefix Metric | X | X | — |
1156 | OSPF Forwarding Address | — | X | — |
1158 | Prefix-SID | X | X | — |
1159 | Range | X | X | — |
1161 | SID/Label TLV | X | X | — |
1170 | Prefix Attribute Flags | X | X | — |
1171 | Source Router Identifier | X | — | — |
1172 | L2 Bundle Member Attributes TLV | X | — | — |
1173 | Extended Administrative Group | X | X | — |
Exchange Link State Information with BGP Neighbor
The following example shows how to exchange link-state information with a BGP neighbor:
Router# configure
Router(config)# router bgp 1
Router(config-bgp)# neighbor 10.0.0.2
Router(config-bgp-nbr)# remote-as 1
Router(config-bgp-nbr)# address-family link-state link-state
Router(config-bgp-nbr-af)# exit
IGP Link-State Database Distribution
A given BGP node may have connections to multiple, independent routing domains. IGP link-state database distribution into BGP-LS is supported for both OSPF and IS-IS protocols in order to distribute this information on to controllers or applications that desire to build paths spanning or including these multiple domains.
To distribute IS-IS link-state data using BGP-LS, use the distribute link-state command in router configuration mode.
Router# configure
Router(config)# router isis isp
Router(config-isis)# distribute link-state instance-id 32
To distribute OSPFv2 link-state data using BGP-LS, use the distribute link-state command in router configuration mode.
Router# configure
Router(config)# router ospf 100
Router(config-ospf)# distribute link-state instance-id 32