7 The OpenDaylight Karaf distribution comes pre-configured with a baseline
8 BGP configuration. You can find it in the ``etc/opendaylight/karaf``
9 directory and it consists of two files:
12 defines the basic parser and RIB support
14 ``41-bgp-example.xml``
15 contains a sample configuration which needs to be customized to your
18 The next sections will describe how to configure BGP manually or using
24 The configuration of the Routing Information Base (RIB) is specified
25 using a block in the ``41-bgp-example.xml`` file.
30 <type>prefix:rib-impl</type>
31 <name>example-bgp-rib</name>
32 <rib-id>example-bgp-rib</rib-id>
33 <local-as>64496</local-as>
34 <bgp-id>192.0.2.2</bgp-id>
35 <cluster-id>192.0.2.3</cluster-id>
39 - **type** - should always be set to ``prefix:rib-impl``
41 - **name** and **rib-id** - BGP RIB Identifier, you can specify
42 multiple BGP RIBs by having multiple the above ``module`` blocks.
43 Each such RIB must have a unique rib-id and name.
45 - **local-as** - the local AS number (where OpenDaylight is deployed),
46 we use this in best path selection
48 - **bgp-id** - the local BGP identifier (the IP of the VM where
49 OpenDaylight is deployed), we use this in best path selection.
51 - **cluster-id** - cluster identifier, optional, if not specified, BGP
52 Identifier will be used
54 Depending on your BGP router, you might need to switch from linkstate
55 attribute type 99 to 29. Check with your router vendor. Change the field
56 iana-linkstate-attribute-type to true if your router supports type 29.
57 This snippet is located in ``31-bgp.xml`` file.
62 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">prefix:bgp-linkstate</type>
63 <name>bgp-linkstate</name>
64 <iana-linkstate-attribute-type>true</iana-linkstate-attribute-type>
67 - **iana-linkstate-attribute-type** - IANA has issued an early
68 allocation for the BGP linkstate path attribute (=29). To preserve he
69 old value (=99) set this to to false; to use IANA assigned type set
70 the value to true or remove it as it’s true by default.
75 The initial configuration is written so that it will be ignored to
76 prevent the client from starting with default configuration. Therefore
77 the first step is to uncomment the module containing bgp-peer.
82 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
83 <name>example-bgp-peer</name>
84 <host>192.0.2.1</host>
85 <holdtimer>180</holdtimer>
86 <peer-role>ibgp</peer-role>
88 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
89 <name>example-bgp-rib</name>
94 - **name** - BGP Peer name, in this configuration file you specify
95 multiple BGP Peers by replicating the above ``module`` block. Each
96 peers must have a unique name.
98 - **host** - IP address or hostname of BGP speaker where OpenDaylight
99 should connect to the peer
101 - **holdtimer** - hold time in seconds
103 - **peer-role** - If peer role is not present, default value "ibgp"
104 will be used (other allowed values are "ebgp" and "rr-client"). This
105 field is case-sensitive.
107 - **rib** - BGP RIB identifier
109 Configure Connection Attributes (Optional)
110 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:reconnectstrategy">prefix:timed-reconnect-strategy</type>
116 <name>example-reconnect-strategy</name>
117 <min-sleep>1000</min-sleep>
118 <max-sleep>180000</max-sleep>
119 <sleep-factor>2.00</sleep-factor>
120 <connect-time>5000</connect-time>
122 <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
123 <name>global-event-executor</name>
127 - **min-sleep** - minimum sleep time (miliseconds) in between reconnect
130 - **max-sleep** - maximum sleep time (miliseconds) in between reconnect
133 - **sleep-factor** - power factor of the sleep time between reconnect
134 tries, i.e., the previous sleep time will be multiplied by this
135 number to determine the next sleep time, but never exceed
138 - **connect-time** - how long BGP should wait (miliseconds) for the TCP
139 connect attempt, overrides default connection timeout dictated by
142 BGP Speaker Configuration
143 ~~~~~~~~~~~~~~~~~~~~~~~~~
145 The previous entries described configuration of a BGP connections
146 initiated by OpenDaylight. OpenDaylight can also accept incoming BGP
149 The configuration of BGP speaker is located in: ``41-bgp-example.xml``:
154 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-acceptor</type>
155 <name>bgp-peer-server</name>
157 <!--Default parameters-->
158 <!--<binding-address>0.0.0.0</binding-address>-->
159 <!--<binding-port>1790</binding-port>-->
162 <!--Drops or accepts incoming BGP connection, every BGP Peer that should be accepted needs to be added to this registry-->
164 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
165 <name>global-bgp-peer-registry</name>
169 - Changing binding address: Uncomment tag binding-address and change
170 the address to e.g. *127.0.0.1*. The default binding address is
173 - Changing binding port: Uncomment tag binding-port and change the port
174 to e.g. *1790*. The default binding port is *179* as specified in
175 `RFC 4271 <http://tools.ietf.org/html/rfc4271>`__.
177 Incomming BGP Connections
178 ~~~~~~~~~~~~~~~~~~~~~~~~~
180 **The BGP speaker drops all BGP connections from unknown BGP peers.**
181 The decision is made in component bgp-peer-registry that is injected
182 into the speaker (The registry is configured in ``31-bgp.xml``).
184 To add a BGP Peer configuration into the registry, it is necessary to
185 configure regular BGP peer just like in example in
186 ``41-bgp-example.xml``. Notice that the BGP peer depends on the same
187 bgp-peer-registry as bgp-speaker:
192 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
193 <name>example-bgp-peer</name>
194 <host>192.0.2.1</host>
197 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
198 <name>global-bgp-peer-registry</name>
203 The BGP peer registers itself into the registry, which allows incoming
204 BGP connections handled by the bgp-speaker. (Config attribute
205 peer-registry is optional for now to preserve backwards compatibility).
206 With this configuration, the connection to 192.0.2.1 is initiated by
207 OpenDaylight but will also be accepted from 192.0.2.1. In case both
208 connections are being established, only one of them will be preserved
209 and the other will be dropped. The connection initiated from device with
210 lower BGP id will be dropped by the registry. Each BGP peer must be
211 configured in its own ``module`` block. Note, that the name of the
212 module needs to be unique, so if you are configuring more peers, when
213 changing the **host**, also change the **name**.
215 To configure a peer that only listens for incoming connections and
216 instruct OpenDaylight not to initiate the connection, add the
217 initiate-connection attribute to peer’s configuration and set it to
223 <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
224 <name>example-bgp-peer</name>
225 <host>192.0.2.1</host> // IP address or hostname of the speaker
226 <holdtimer>180</holdtimer>
227 <initiate-connection>false</initiate-connection> // Connection will not be initiated by ODL
231 - **initiate-connection** - if set to false OpenDaylight will not
232 initiate connection to this peer. Default value is true.
237 A BGP speaker needs to register all peers that can be connected to it
238 (meaning if a BGP peer is not configured, the connection with
239 OpenDaylight won’t be successful). As a first step, configure RIB. Then,
240 instead of configuring regular peer, configure this application peer,
241 with its own application RIB. Change the bgp-peer-id, which is your
242 local BGP ID that will be used in BGP best path selection algorithm.
247 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
248 <name>example-bgp-peer-app</name>
249 <bgp-peer-id>10.25.1.9</bgp-peer-id>
251 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
252 <name>example-bgp-rib</name>
254 <application-rib-id>example-app-rib</application-rib-id>
258 - **bgp-peer-id** - the local BGP identifier (the IP of the VM where
259 OpenDaylight is deployed), we use this in best path selection
261 - **target-rib** - RIB ID of existing RIB where the data should be
264 - **application-rib-id** - RIB ID of local application RIB (all the
265 routes that you put to OpenDaylight will be displayed here)
267 Configuration through RESTCONF
268 ------------------------------
270 Another method to configure BGP is dynamically through RESTCONF. Instead
271 of restarting Karaf, install another feature, that provides you the
272 access to *restconf/config/* URLs.
276 feature:install odl-netconf-connector-all
278 To check what modules you have currently configured, check following
280 http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
282 This URL is also used to POST new configuration. If you want to change
283 any other configuration that is listed here, make sure you include the
284 correct namespaces. RESTCONF will tell you if some namespace is wrong.
286 To update an existing configuration use **PUT** and give the full path
287 to the element you wish to update.
289 It is vital that you respect the order of steps described in user guide.
294 First, configure the RIB. This module is already present in the
295 configuration, therefore we change only the parameters we need. In this
296 case, it’s **bgp-rib-id** and **local-as**.
299 *http://127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib*
305 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
306 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type>
307 <name>example-bgp-rib</name>
308 <session-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
309 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type>
310 <name>example-reconnect-strategy-factory</name>
311 </session-reconnect-strategy>
312 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-rib</rib-id>
313 <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
314 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
315 <name>global-rib-extensions</name>
317 <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
318 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
319 <name>runtime-mapping-singleton</name>
320 </codec-tree-factory>
321 <tcp-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
322 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type>
323 <name>example-reconnect-strategy-factory</name>
324 </tcp-reconnect-strategy>
325 <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
326 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
327 <name>pingpong-binding-data-broker</name>
329 <local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as>
330 <bgp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
331 <type>bgp-dispatcher</type>
332 <name>global-bgp-dispatcher</name>
334 <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
335 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
336 <name>pingpong-broker</name>
338 <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
339 <type>bgp-table-type</type>
340 <name>ipv4-unicast</name>
342 <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
343 <type>bgp-table-type</type>
344 <name>ipv6-unicast</name>
346 <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
347 <type>bgp-table-type</type>
348 <name>linkstate</name>
350 <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
351 <type>bgp-table-type</type>
352 <name>ipv4-flowspec</name>
354 <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
355 <type>bgp-table-type</type>
356 <name>ipv6-flowspec</name>
358 <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
359 <type>bgp-table-type</type>
360 <name>labeled-unicast</name>
362 <bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.2</bgp-rib-id>
363 <openconfig-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
364 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp-openconfig-spi">x:bgp-openconfig-provider</type>
365 <name>openconfig-bgp</name>
366 </openconfig-provider>
369 Depending on your BGP router, you might need to switch from linkstate
370 attribute type 99 to 29. Check with your router vendor. Change the field
371 iana-linkstate-attribute-type to true if your router supports type 29.
372 You can do that with the following RESTCONF operation:
375 *http://127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-linkstate-cfg:bgp-linkstate/bgp-linkstate*
381 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
382 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">x:bgp-linkstate</type>
383 <name>bgp-linkstate</name>
384 <iana-linkstate-attribute-type xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">true</iana-linkstate-attribute-type>
390 We also need to add a new module to configuration (bgp-peer). In this
391 case, the whole module needs to be configured. Please change values
392 **host**, **holdtimer** and **peer-role** (if necessary).
395 *http://127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules*
401 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
402 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer</type>
403 <name>example-bgp-peer</name>
404 <host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.1</host>
405 <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">180</holdtimer>
406 <peer-role xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">ibgp</peer-role>
407 <rib xmlns"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
408 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
409 <name>example-bgp-rib</name>
411 <peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
412 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer-registry</type>
413 <name>global-bgp-peer-registry</name>
415 <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
416 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
417 <name>ipv4-unicast</name>
419 <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
420 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
421 <name>ipv6-unicast</name>
423 <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
424 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
425 <name>linkstate</name>
427 <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
428 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
429 <name>ipv4-flowspec</name>
431 <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
432 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
433 <name>ipv6-flowspec</name>
435 <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
436 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
437 <name>labeled-unicast</name>
441 This is all necessary information that you need to get ODL connect to
447 Change the value **bgp-peer-id** which is your local BGP ID that will be
448 used in BGP Best Path Selection algorithm.
451 *http://127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules*
457 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
458 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
459 <name>example-bgp-peer-app</name>
460 <bgp-peer-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">10.25.1.9</bgp-peer-id> <!-- Your local BGP-ID that will be used in BGP Best Path Selection algorithm -->
461 <target-rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
462 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
463 <name>example-bgp-rib</name>
465 <application-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-app-rib</application-rib-id>
466 <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
467 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
468 <name>pingpong-broker</name>
478 This section summarizes how data from BGP can be viewed through
479 RESTCONF. Currently it is the only way to view the data.
481 Network Topology View
482 ^^^^^^^^^^^^^^^^^^^^^
484 The URL for network topology is:
485 http://localhost:8181/restconf/operational/network-topology:network-topology/
487 If BGP is configured properly, it should display output similar to:
493 <topology-id>pcep-topology</topology-id>
499 <server-provided>true</server-provided>
500 <topology-id>example-ipv4-topology</topology-id>
504 <server-provided>true</server-provided>
505 <topology-id>example-linkstate-topology</topology-id>
510 BGP topology information as learned from BGP peers are is in three
511 topologies (if all three are configured):
513 - **example-linkstate-topology** - displays links and nodes advertised
514 through linkstate update messages
516 - http://localhost:8181/restconf/operational/network-topology:network-topology/topology/example-linkstate-topology
518 - **example-ipv4-topology** - display IPv4 addresses of nodes in the
521 - http://localhost:8181/restconf/operational/network-topology:network-topology/topology/example-ipv4-topology
523 - **example-ipv6-topology** - display IPv6 addresses of nodes in the
526 - http://localhost:8181/restconf/operational/network-topology:network-topology/topology/example-ipv6-topology
528 Route Information Base (RIB) View
529 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
531 Another view of BGP data is through **BGP RIBs**, located here:
532 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/
534 There are multiple RIBs configured:
536 - AdjRibsIn (per Peer) : Adjacency RIBs In, BGP routes as they come
539 - EffectiveRib (per Peer) : BGP routes after applying Import policies
541 - LocRib (per RIB) : Local RIB, BGP routes from all peers
543 - AdjRibsOut (per Peer) : BGP routes that will be advertizes, after
544 applying Export policies
546 This is how the empty output looks like, when address families for IPv4
547 Unicast, IPv6 Unicast, IPv4 Flowspec, IPv6 Flowspec, IPv4 Labeled
548 Unicast and Linkstate were configured:
552 <loc-rib xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
554 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv6-address-family</afi>
555 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
557 <uptodate>false</uptodate>
559 <ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
563 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
564 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
566 <uptodate>false</uptodate>
568 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
572 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
573 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">x:flowspec-subsequent-address-family</safi>
575 <uptodate>false</uptodate>
577 <flowspec-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
581 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv6-address-family</afi>
582 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">x:flowspec-subsequent-address-family</safi>
584 <uptodate>false</uptodate>
586 <flowspec-ipv6-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
587 </flowspec-ipv6-routes>
590 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
591 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">x:labeled-unicast-subsequent-address-family</safi>
593 <uptodate>false</uptodate>
595 <labeled-unicast-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
596 </labeled-unicast-routes>
599 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-linkstate">x:linkstate-address-family</afi>
600 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-linkstate">x:linkstate-subsequent-address-family</safi>
602 <uptodate>false</uptodate>
604 <linkstate-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-linkstate">
609 You can see details for each AFI by expanding the RESTCONF link:
612 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/ipv4-routes
615 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv6-address-family/bgp-types:unicast-subsequent-address-family/ipv6-routes
617 - **IPv4 Labeled Unicast** :
618 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes
620 - **IPv4 Flowspec** :
621 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes
623 - **IPv6 Flowspec** :
624 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes
627 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-linkstate:linkstate-address-family/bgp-linkstate:linkstate-subsequent-address-family/linkstate-routes
632 If an application peer is configured, you can populate its RIB by making
633 POST calls to RESTCONF like the following.
641 http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/
643 - where example-app-rib is your application RIB id (that you specified
644 in the configuration) and tables specifies AFI and SAFI of the data
645 that you want to add.
649 **Content-Type:** application/xml
653 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
654 <ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
655 <prefix>1.1.1.1/32</prefix>
658 <global>199.20.160.41</global>
659 </ipv4-next-hop><as-path/>
667 <originator>41.41.41.41</originator>
673 <cluster>40.40.40.40</cluster>
678 The request results in **204 No content**. This is expected.
683 `http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/bgp-inet:ipv4-route/<route-id> <http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/bgp-inet:ipv4-route/<route-id>>`__
693 http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv6-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv6-routes/
697 **Content-Type:** application/xml
701 <ipv6-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
702 <prefix>2001:db8:30::3/128</prefix>
705 <global>2001:db8:1::6</global>
714 The request results in **204 No content**. This is expected.
719 `http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv6-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv6-routes/bgp-inet:ipv6-route/<route-id> <http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv6-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv6-routes/bgp-inet:ipv6-route/<route-id>>`__
729 http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes
733 **Content-Type:** application/xml
737 <labeled-unicast-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-labeled-unicast">
738 <route-key>label1</route-key>
739 <prefix>1.1.1.1/32</prefix>
741 <label-value>123</label-value>
744 <label-value>456</label-value>
747 <label-value>342</label-value>
751 <global>199.20.160.41</global>
761 </labeled-unicast-route>
763 The request results in **204 No content**. This is expected.
768 `http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes/bgp-labeled-unicast:labeled-unicast-route/<route-id> <http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-labeled-unicast:labeled-unicast-subsequent-address-family/bgp-labeled-unicast:labeled-unicast-routes/bgp-labeled-unicast:labeled-unicast-route/<route-id>>`__
778 http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes
782 **Content-Type:** application/xml
786 <flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
787 <route-key>flow1</route-key>
789 <destination-prefix>192.168.0.1/32</destination-prefix>
792 <source-prefix>10.0.0.1/32</source-prefix>
796 <op>equals end-of-list</op>
802 <op>equals end-of-list</op>
808 <op>greater-than</op>
812 <op>and-bit less-than end-of-list</op>
818 <op>greater-than end-of-list</op>
824 <op>equals end-of-list</op>
830 <op>equals end-of-list</op>
836 <op>match end-of-list</op>
842 <op>greater-than</op>
846 <op>and-bit less-than end-of-list</op>
852 <op>equals end-of-list</op>
858 <op>match end-of-list</op>
870 <extended-communities>
872 </extended-communities>
876 **Flowspec Extended Communities (Actions):**
880 <extended-communities>
881 <transitive>true</transitive>
882 <traffic-rate-extended-community>
883 <informative-as>123</informative-as>
884 <local-administrator>AAAAAA==</local-administrator>
885 </traffic-rate-extended-community>
886 </extended-communities>
888 <extended-communities>
889 <transitive>true</transitive>
890 <traffic-action-extended-community>
891 <sample>true</sample>
892 <terminal-action>false</terminal-action>
893 </traffic-action-extended-community>
894 </extended-communities>
896 <extended-communities>
897 <transitive>true</transitive>
898 <redirect-extended-community>
899 <global-administrator>123</global-administrator>
900 <local-administrator>AAAAew==</local-administrator>
901 </redirect-extended-community>
902 </extended-communities>
904 <extended-communities>
905 <transitive>true</transitive>
907 <global-administrator>192.168.0.1</global-administrator>
908 <local-administrator>12345</local-administrator>
910 </extended-communities>
912 <extended-communities>
913 <transitive>true</transitive>
915 <global-administrator>64495</global-administrator>
916 <local-administrator>12345</local-administrator>
918 </extended-communities>
920 <extended-communities>
921 <transitive>true</transitive>
922 <redirect-ip-nh-extended-community>
924 </redirect-ip-nh-extended-community>
925 </extended-communities>
927 <extended-communities>
928 <transitive>true</transitive>
929 <traffic-marking-extended-community>
930 <global-administrator>20</global-administrator>
931 </traffic-marking-extended-community>
932 </extended-communities>
934 The request results in **204 No content**. This is expected.
939 `http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes/bgp-flowspec:flowspec-route/<route-id> <http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes/bgp-flowspec:flowspec-route/<route-id>>`__
949 http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes
953 **Content-Type:** application/xml
957 <flowspec-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-flowspec">
958 <route-key>flow-v6</route-key>
960 <destination-prefix>2001:db8:30::3/128</destination-prefix>
963 <source-prefix>2001:db8:31::3/128</source-prefix>
967 <op>equals end-of-list</op>
972 <extended-communities>
974 <global-administrator>2001:db8:1::6</global-administrator>
975 <local-administrator>12345</local-administrator>
977 </extended-communities>
988 The request results in **204 No content**. This is expected.
993 `http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes/bgp-flowspec:flowspec-route/<route-id> <http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv6-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-ipv6-routes/bgp-flowspec:flowspec-route/<route-id>>`__