1 .. _bgp-user-guide-linkstate-family:
5 The BGP Link-State (BGP-LS) Multiprotocol extension allows to distribute Link-State and Traffic Engineering (TE) information.
6 This information is typically distributed by IGP routing protocols with in the network, limiting LSDB or TED visibility to the IGP area.
7 The BGP-LS-enabled routers are capable to collect such information from networks (multiple IGP areas, inter-AS) and share with external components (i.e. OpenDaylight BGP).
8 The information is applicable in ALTO servers and PCEs, as both need to gather information about topologies.
9 In addition, link-state information is extended to carry segment information (Spring).
11 .. contents:: Contents
17 This section shows a way to enable IPv4 and IPv6 Labeled Unicast family in BGP speaker and peer configuration.
21 To enable BGP-LS support in BGP plugin, first configure BGP speaker instance:
23 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols``
27 **Content-Type:** ``application/xml``
33 <protocol xmlns="http://openconfig.net/yang/network-instance">
34 <name>bgp-example</name>
35 <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
36 <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
39 <router-id>192.0.2.2</router-id>
44 <afi-safi-name>LINKSTATE</afi-safi-name>
51 Linkstate path attribute
52 ''''''''''''''''''''''''
53 IANA allocation for BGP-LS path attribute is TYPE 29.
54 Some older BGP-LS implementations might still require earliest asigned allocation TYPE 99.
55 To use TYPE = 99, you need to set value bellow to false.
57 **URL:** ``/restconf/config/bgp-linkstate-app-config:bgp-linkstate-app-config``
61 **Content-Type:** ``application/xml``
67 <bgp-linkstate-app-config xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate-app-config">
68 <iana-linkstate-attribute-type>false</iana-linkstate-attribute-type>
69 </bgp-linkstate-app-config>
73 Here is an example for BGP peer configuration with enabled BGP-LS family.
75 **URL:** ``/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/bgp-example/bgp/neighbors``
79 **Content-Type:** ``application/xml``
85 <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
86 <neighbor-address>192.0.2.1</neighbor-address>
89 <afi-safi-name>LINKSTATE</afi-safi-name>
96 Following tree illustrate the BGP Link-State route structure.
98 .. code-block:: console
100 :(linkstate-routes-case)
101 +--ro linkstate-routes
102 +--ro linkstate-route* [route-key path-id]
103 +--ro route-key string
104 +--ro path-id path-id
105 +--ro protocol-id protocol-id
106 +--ro identifier identifier
109 | | +--ro node-descriptors
110 | | +--ro as-number? inet:as-number
111 | | +--ro area-id? area-identifier
112 | | +--ro domain-id? domain-identifier
113 | | +--ro (c-router-identifier)?
114 | | +--:(isis-node-case)
115 | | | +--ro isis-node
116 | | | +--ro iso-system-id netc:iso-system-identifier
117 | | +--:(isis-pseudonode-case)
118 | | | +--ro isis-pseudonode
119 | | | +--ro is-is-router-identifier
120 | | | | +--ro iso-system-id netc:iso-system-identifier
121 | | | +--ro psn uint8
122 | | +--:(ospf-node-case)
123 | | | +--ro ospf-node
124 | | | +--ro ospf-router-id uint32
125 | | +--:(ospf-pseudonode-case)
126 | | +--ro ospf-pseudonode
127 | | +--ro ospf-router-id uint32
128 | | +--ro lan-interface ospf-interface-identifier
130 | | +--ro local-node-descriptors
131 | | | +--ro as-number? inet:as-number
132 | | | +--ro area-id? area-identifier
133 | | | +--ro domain-id? domain-identifier
134 | | | +--ro (c-router-identifier)?
135 | | | | +--:(isis-node-case)
136 | | | | | +--ro isis-node
137 | | | | | +--ro iso-system-id netc:iso-system-identifier
138 | | | | +--:(isis-pseudonode-case)
139 | | | | | +--ro isis-pseudonode
140 | | | | | +--ro is-is-router-identifier
141 | | | | | | +--ro iso-system-id netc:iso-system-identifier
142 | | | | | +--ro psn uint8
143 | | | | +--:(ospf-node-case)
144 | | | | | +--ro ospf-node
145 | | | | | +--ro ospf-router-id uint32
146 | | | | +--:(ospf-pseudonode-case)
147 | | | | +--ro ospf-pseudonode
148 | | | | +--ro ospf-router-id uint32
149 | | | | +--ro lan-interface ospf-interface-identifier
150 | | | +--ro bgp-router-id? inet:ipv4-address
151 | | | +--ro member-asn? inet:as-number
152 | | +--ro remote-node-descriptors
153 | | | +--ro as-number? inet:as-number
154 | | | +--ro area-id? area-identifier
155 | | | +--ro domain-id? domain-identifier
156 | | | +--ro (c-router-identifier)?
157 | | | | +--:(isis-node-case)
158 | | | | | +--ro isis-node
159 | | | | | +--ro iso-system-id netc:iso-system-identifier
160 | | | | +--:(isis-pseudonode-case)
161 | | | | | +--ro isis-pseudonode
162 | | | | | +--ro is-is-router-identifier
163 | | | | | | +--ro iso-system-id netc:iso-system-identifier
164 | | | | | +--ro psn uint8
165 | | | | +--:(ospf-node-case)
166 | | | | | +--ro ospf-node
167 | | | | | +--ro ospf-router-id uint32
168 | | | | +--:(ospf-pseudonode-case)
169 | | | | +--ro ospf-pseudonode
170 | | | | +--ro ospf-router-id uint32
171 | | | | +--ro lan-interface ospf-interface-identifier
172 | | | +--ro bgp-router-id? inet:ipv4-address
173 | | | +--ro member-asn? inet:as-number
174 | | +--ro link-descriptors
175 | | +--ro link-local-identifier? uint32
176 | | +--ro link-remote-identifier? uint32
177 | | +--ro ipv4-interface-address? ipv4-interface-identifier
178 | | +--ro ipv6-interface-address? ipv6-interface-identifier
179 | | +--ro ipv4-neighbor-address? ipv4-interface-identifier
180 | | +--ro ipv6-neighbor-address? ipv6-interface-identifier
181 | | +--ro multi-topology-id? topology-identifier
183 | | +--ro advertising-node-descriptors
184 | | | +--ro as-number? inet:as-number
185 | | | +--ro area-id? area-identifier
186 | | | +--ro domain-id? domain-identifier
187 | | | +--ro (c-router-identifier)?
188 | | | +--:(isis-node-case)
189 | | | | +--ro isis-node
190 | | | | +--ro iso-system-id netc:iso-system-identifier
191 | | | +--:(isis-pseudonode-case)
192 | | | | +--ro isis-pseudonode
193 | | | | +--ro is-is-router-identifier
194 | | | | | +--ro iso-system-id netc:iso-system-identifier
195 | | | | +--ro psn uint8
196 | | | +--:(ospf-node-case)
197 | | | | +--ro ospf-node
198 | | | | +--ro ospf-router-id uint32
199 | | | +--:(ospf-pseudonode-case)
200 | | | +--ro ospf-pseudonode
201 | | | +--ro ospf-router-id uint32
202 | | | +--ro lan-interface ospf-interface-identifier
203 | | +--ro prefix-descriptors
204 | | +--ro multi-topology-id? topology-identifier
205 | | +--ro ospf-route-type? ospf-route-type
206 | | +--ro ip-reachability-information? inet:ip-prefix
208 | +--ro (address-family)?
210 | | | +--ro ipv4-tunnel-sender-address inet:ipv4-address
211 | | | +--ro ipv4-tunnel-endpoint-address inet:ipv4-address
213 | | +--ro ipv6-tunnel-sender-address inet:ipv6-address
214 | | +--ro ipv6-tunnel-endpoint-address inet:ipv6-address
215 | +--ro tunnel-id? rsvp:tunnel-id
216 | +--ro lsp-id? rsvp:lsp-id
218 +--ro (link-state-attribute)?
219 +--:(node-attributes-case)
220 | +--ro node-attributes
221 | +--ro topology-identifier* topology-identifier
222 | +--ro node-flags? node-flag-bits
223 | +--ro isis-area-id* isis-area-identifier
224 | +--ro dynamic-hostname? string
225 | +--ro ipv4-router-id? ipv4-router-identifier
226 | +--ro ipv6-router-id? ipv6-router-identifier
227 | +--ro sr-capabilities
228 | | +--ro mpls-ipv4? boolean
229 | | +--ro mpls-ipv6? boolean
230 | | +--ro sr-ipv6? boolean
231 | | +--ro range-size? uint32
232 | | +--ro (sid-label-index)?
233 | | +--:(local-label-case)
234 | | | +--ro local-label? netc:mpls-label
235 | | +--:(ipv6-address-case)
236 | | | +--ro ipv6-address? inet:ipv6-address
238 | | +--ro sid? uint32
240 | +--ro algorithms* algorithm
241 +--:(link-attributes-case)
242 | +--ro link-attributes
243 | +--ro local-ipv4-router-id? ipv4-router-identifier
244 | +--ro local-ipv6-router-id? ipv6-router-identifier
245 | +--ro remote-ipv4-router-id? ipv4-router-identifier
246 | +--ro remote-ipv6-router-id? ipv6-router-identifier
247 | +--ro mpls-protocol? mpls-protocol-mask
248 | +--ro te-metric? netc:te-metric
249 | +--ro metric? netc:metric
250 | +--ro shared-risk-link-groups* rsvp:srlg-id
251 | +--ro link-name? string
252 | +--ro max-link-bandwidth? netc:bandwidth
253 | +--ro max-reservable-bandwidth? netc:bandwidth
254 | +--ro unreserved-bandwidth* [priority]
255 | | +--ro priority uint8
256 | | +--ro bandwidth? netc:bandwidth
257 | +--ro link-protection? link-protection-type
258 | +--ro admin-group? administrative-group
261 | | | +--:(ospf-adj-flags-case)
262 | | | | +--ro backup? boolean
263 | | | | +--ro set? boolean
264 | | | +--:(isis-adj-flags-case)
265 | | | +--ro backup? boolean
266 | | | +--ro set? boolean
267 | | | +--ro address-family? boolean
268 | | +--ro weight? weight
269 | | +--ro (sid-label-index)?
270 | | +--:(local-label-case)
271 | | | +--ro local-label? netc:mpls-label
272 | | +--:(ipv6-address-case)
273 | | | +--ro ipv6-address? inet:ipv6-address
275 | | +--ro sid? uint32
276 | +--ro sr-lan-adj-ids*
278 | | | +--:(ospf-adj-flags-case)
279 | | | | +--ro backup? boolean
280 | | | | +--ro set? boolean
281 | | | +--:(isis-adj-flags-case)
282 | | | +--ro backup? boolean
283 | | | +--ro set? boolean
284 | | | +--ro address-family? boolean
285 | | +--ro weight? weight
286 | | +--ro iso-system-id? netc:iso-system-identifier
287 | | +--ro neighbor-id? inet:ipv4-address
288 | | +--ro (sid-label-index)?
289 | | +--:(local-label-case)
290 | | | +--ro local-label? netc:mpls-label
291 | | +--:(ipv6-address-case)
292 | | | +--ro ipv6-address? inet:ipv6-address
294 | | +--ro sid? uint32
295 | +--ro peer-node-sid
296 | | +--ro weight? weight
297 | | +--ro (sid-label-index)?
298 | | +--:(local-label-case)
299 | | | +--ro local-label? netc:mpls-label
300 | | +--:(ipv6-address-case)
301 | | | +--ro ipv6-address? inet:ipv6-address
303 | | +--ro sid? uint32
305 | | +--ro weight? weight
306 | | +--ro (sid-label-index)?
307 | | +--:(local-label-case)
308 | | | +--ro local-label? netc:mpls-label
309 | | +--:(ipv6-address-case)
310 | | | +--ro ipv6-address? inet:ipv6-address
312 | | +--ro sid? uint32
313 | +--ro peer-set-sids*
314 | +--ro weight? weight
315 | +--ro (sid-label-index)?
316 | +--:(local-label-case)
317 | | +--ro local-label? netc:mpls-label
318 | +--:(ipv6-address-case)
319 | | +--ro ipv6-address? inet:ipv6-address
322 +--:(prefix-attributes-case)
323 | +--ro prefix-attributes
325 | | x--ro up-down? bits
326 | | +--ro is-is-up-down? boolean
327 | | +--ro ospf-no-unicast? boolean
328 | | +--ro ospf-local-address? boolean
329 | | +--ro ospf-propagate-nssa? boolean
330 | +--ro route-tags* route-tag
331 | +--ro extended-tags* extended-route-tag
332 | +--ro prefix-metric? netc:igp-metric
333 | +--ro ospf-forwarding-address? inet:ip-address
336 | | | +--:(isis-prefix-flags-case)
337 | | | | +--ro no-php? boolean
338 | | | | +--ro explicit-null? boolean
339 | | | | +--ro readvertisement? boolean
340 | | | | +--ro node-sid? boolean
341 | | | +--:(ospf-prefix-flags-case)
342 | | | +--ro no-php? boolean
343 | | | +--ro explicit-null? boolean
344 | | | +--ro mapping-server? boolean
345 | | +--ro algorithm? algorithm
346 | | +--ro (sid-label-index)?
347 | | +--:(local-label-case)
348 | | | +--ro local-label? netc:mpls-label
349 | | +--:(ipv6-address-case)
350 | | | +--ro ipv6-address? inet:ipv6-address
352 | | +--ro sid? uint32
353 | +--ro ipv6-sr-prefix
354 | | +--ro algorithm? algorithm
356 | | +--ro inter-area? boolean
357 | | +--ro range-size? uint16
359 | | +--ro (range-sub-tlv)?
360 | | +--:(binding-sid-tlv-case)
361 | | | +--ro weight? weight
363 | | | | +--:(isis-binding-flags-case)
364 | | | | | +--ro address-family? boolean
365 | | | | | +--ro mirror-context? boolean
366 | | | | | +--ro spread-tlv? boolean
367 | | | | | +--ro leaked-from-level-2? boolean
368 | | | | | +--ro attached-flag? boolean
369 | | | | +--:(ospf-binding-flags-case)
370 | | | | +--ro mirroring? boolean
371 | | | +--ro binding-sub-tlvs*
372 | | | +--ro (binding-sub-tlv)?
373 | | | +--:(prefix-sid-case)
374 | | | | +--ro (flags)?
375 | | | | | +--:(isis-prefix-flags-case)
376 | | | | | | +--ro no-php? boolean
377 | | | | | | +--ro explicit-null? boolean
378 | | | | | | +--ro readvertisement? boolean
379 | | | | | | +--ro node-sid? boolean
380 | | | | | +--:(ospf-prefix-flags-case)
381 | | | | | +--ro no-php? boolean
382 | | | | | +--ro explicit-null? boolean
383 | | | | | +--ro mapping-server? boolean
384 | | | | +--ro algorithm? algorithm
385 | | | | +--ro (sid-label-index)?
386 | | | | +--:(local-label-case)
387 | | | | | +--ro local-label? netc:mpls-label
388 | | | | +--:(ipv6-address-case)
389 | | | | | +--ro ipv6-address? inet:ipv6-address
390 | | | | +--:(sid-case)
391 | | | | +--ro sid? uint32
392 | | | +--:(ipv6-prefix-sid-case)
393 | | | | +--ro algorithm? algorithm
394 | | | +--:(sid-label-case)
395 | | | | +--ro (sid-label-index)?
396 | | | | +--:(local-label-case)
397 | | | | | +--ro local-label? netc:mpls-label
398 | | | | +--:(ipv6-address-case)
399 | | | | | +--ro ipv6-address? inet:ipv6-address
400 | | | | +--:(sid-case)
401 | | | | +--ro sid? uint32
402 | | | +--:(ero-metric-case)
403 | | | | +--ro ero-metric? netc:te-metric
404 | | | +--:(ipv4-ero-case)
405 | | | | +--ro loose? boolean
406 | | | | +--ro address inet:ipv4-address
407 | | | +--:(ipv6-ero-case)
408 | | | | +--ro loose? boolean
409 | | | | +--ro address inet:ipv6-address
410 | | | +--:(unnumbered-interface-id-ero-case)
411 | | | | +--ro loose? boolean
412 | | | | +--ro router-id? uint32
413 | | | | +--ro interface-id? uint32
414 | | | +--:(ipv4-ero-backup-case)
415 | | | | +--ro loose? boolean
416 | | | | +--ro address inet:ipv4-address
417 | | | +--:(ipv6-ero-backup-case)
418 | | | | +--ro loose? boolean
419 | | | | +--ro address inet:ipv6-address
420 | | | +--:(unnumbered-interface-id-backup-ero-case)
421 | | | +--ro loose? boolean
422 | | | +--ro router-id? uint32
423 | | | +--ro interface-id? uint32
424 | | +--:(prefix-sid-tlv-case)
426 | | | | +--:(isis-prefix-flags-case)
427 | | | | | +--ro no-php? boolean
428 | | | | | +--ro explicit-null? boolean
429 | | | | | +--ro readvertisement? boolean
430 | | | | | +--ro node-sid? boolean
431 | | | | +--:(ospf-prefix-flags-case)
432 | | | | +--ro no-php? boolean
433 | | | | +--ro explicit-null? boolean
434 | | | | +--ro mapping-server? boolean
435 | | | +--ro algorithm? algorithm
436 | | | +--ro (sid-label-index)?
437 | | | +--:(local-label-case)
438 | | | | +--ro local-label? netc:mpls-label
439 | | | +--:(ipv6-address-case)
440 | | | | +--ro ipv6-address? inet:ipv6-address
442 | | | +--ro sid? uint32
443 | | +--:(ipv6-prefix-sid-tlv-case)
444 | | | +--ro algorithm? algorithm
445 | | +--:(sid-label-tlv-case)
446 | | +--ro (sid-label-index)?
447 | | +--:(local-label-case)
448 | | | +--ro local-label? netc:mpls-label
449 | | +--:(ipv6-address-case)
450 | | | +--ro ipv6-address? inet:ipv6-address
452 | | +--ro sid? uint32
453 | +--ro sr-binding-sid-labels*
454 | +--ro weight? weight
456 | | +--:(isis-binding-flags-case)
457 | | | +--ro address-family? boolean
458 | | | +--ro mirror-context? boolean
459 | | | +--ro spread-tlv? boolean
460 | | | +--ro leaked-from-level-2? boolean
461 | | | +--ro attached-flag? boolean
462 | | +--:(ospf-binding-flags-case)
463 | | +--ro mirroring? boolean
464 | +--ro binding-sub-tlvs*
465 | +--ro (binding-sub-tlv)?
466 | +--:(prefix-sid-case)
468 | | | +--:(isis-prefix-flags-case)
469 | | | | +--ro no-php? boolean
470 | | | | +--ro explicit-null? boolean
471 | | | | +--ro readvertisement? boolean
472 | | | | +--ro node-sid? boolean
473 | | | +--:(ospf-prefix-flags-case)
474 | | | +--ro no-php? boolean
475 | | | +--ro explicit-null? boolean
476 | | | +--ro mapping-server? boolean
477 | | +--ro algorithm? algorithm
478 | | +--ro (sid-label-index)?
479 | | +--:(local-label-case)
480 | | | +--ro local-label? netc:mpls-label
481 | | +--:(ipv6-address-case)
482 | | | +--ro ipv6-address? inet:ipv6-address
484 | | +--ro sid? uint32
485 | +--:(ipv6-prefix-sid-case)
486 | | +--ro algorithm? algorithm
487 | +--:(sid-label-case)
488 | | +--ro (sid-label-index)?
489 | | +--:(local-label-case)
490 | | | +--ro local-label? netc:mpls-label
491 | | +--:(ipv6-address-case)
492 | | | +--ro ipv6-address? inet:ipv6-address
494 | | +--ro sid? uint32
495 | +--:(ero-metric-case)
496 | | +--ro ero-metric? netc:te-metric
497 | +--:(ipv4-ero-case)
498 | | +--ro loose? boolean
499 | | +--ro address inet:ipv4-address
500 | +--:(ipv6-ero-case)
501 | | +--ro loose? boolean
502 | | +--ro address inet:ipv6-address
503 | +--:(unnumbered-interface-id-ero-case)
504 | | +--ro loose? boolean
505 | | +--ro router-id? uint32
506 | | +--ro interface-id? uint32
507 | +--:(ipv4-ero-backup-case)
508 | | +--ro loose? boolean
509 | | +--ro address inet:ipv4-address
510 | +--:(ipv6-ero-backup-case)
511 | | +--ro loose? boolean
512 | | +--ro address inet:ipv6-address
513 | +--:(unnumbered-interface-id-backup-ero-case)
514 | +--ro loose? boolean
515 | +--ro router-id? uint32
516 | +--ro interface-id? uint32
517 x--:(te-lsp-attributes-case)
518 +--ro te-lsp-attributes
523 The Link-State table in a instance of the speaker's Loc-RIB can be verified via REST:
525 **URL:** ``/restconf/operational/bgp-rib:bgp-rib/rib/bgp-example/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-address-family/linkstate-routes``
533 <linkstate-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-linkstate">
537 .. note:: Link-State routes mapping to topology links/nodes/prefixes is supported by BGP Topology Provider.
541 * `North-Bound Distribution of Link-State and Traffic Engineering (TE) Information Using BGP <https://tools.ietf.org/html/rfc7752>`_
542 * `BGP Link-State extensions for Segment Routing <https://tools.ietf.org/html/draft-gredler-idr-bgp-ls-segment-routing-ext-03>`_
543 * `Segment Routing BGP Egress Peer Engineering BGP-LS Extensions <https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-05>`_
544 * `BGP Link-State Information Distribution Implementation Report <https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-impl-04>`_