Fixed invalid outputs for PUTs in BGPCEP.
[docs.git] / manuals / user-guide / src / main / asciidoc / bgpcep / odl-bgpcep-bgp-all-user.adoc
1 == BGP User Guide ==
2
3 === Overview ===
4 The OpenDaylight Karaf distribution comes pre-configured with baseline BGP
5 configuration. You can find it in the etc/opendaylight/karaf directory and it
6 consists of two files:
7
8 - *31-bgp.xml* (defines the basic parser and RIB support)
9 - *41-bgp-example.xml* (which contains a sample configuration which needs to be
10   customized to your deployment)
11
12 The next sections will describe how to configure BGP manually or using RESTCONF.
13
14 === Configuring BGP ===
15
16 ==== RIB ====
17 [source,xml]
18 ----
19 <module>
20     <type>prefix:rib-impl</type>
21     <name>example-bgp-rib</name>
22     <rib-id>example-bgp-rib</rib-id>
23     <local-as>64496</local-as>
24     <bgp-id>192.0.2.2</bgp-id>
25     <cluster-id>192.0.2.3</cluster-id>
26     ...
27 </module>
28 ----
29
30 - *rib-id* - BGP RIB Identifier, in this configuration file you can specify more BGP RIBs by
31 copy-pasting the above module. These RIBs must have a unique rib-id and name.
32 - *local-as* - Our local AS number (where OpenDaylight is deployed), we use this in best path selection
33 - *bgp-id* - Our local BGP identifier (the IP of the VM where OpenDaylight is deployed),
34 we use this in best path selection.
35 - *cluster-id* - Cluster Identifier, non-mandatory, if not specified, BGP Identifier will be used
36
37 MIGHT NOT BE NEEDED: depending on your BGP router, you might need to switch from
38 linkstate attribute type 99 to 29. Check with your router vendor. Change the
39 field iana-linkstate-attribute-type to true if your router supports type 29.
40 This snippet is located in 31-bgp.xml file.
41
42 [source,xml]
43 ----
44 <module>
45  <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">prefix:bgp-linkstate</type>
46  <name>bgp-linkstate</name>
47  <iana-linkstate-attribute-type>true</iana-linkstate-attribute-type>
48 </module>
49 ----
50
51 - *iana-linkstate-attribute-type* - IANA has issued an early allocation for the
52 BGP Linkstate path attribute (=29). To preserve (TYPE = 99) set value bellow
53 to false; to use IANA assigned type set the value to true or remove it as it's true by default.
54
55 ==== BGP Peer ====
56
57 The initial configuration is written so that it will be ignored to prevent the
58 client from starting with default configuration. Therefore the first step is to
59 uncomment the module containing bgp-peer.
60
61 [source,xml]
62 ----
63 <module>
64  <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
65  <name>example-bgp-peer</name>
66  <host>192.0.2.1</host>
67  <holdtimer>180</holdtimer>
68  <peer-role>ibgp</peer-role>
69  <rib>
70   <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">prefix:rib</type>
71   <name>example-bgp-rib</name>
72  </rib>
73  ...
74 </module>
75 ----
76
77 - *name* - BGP Peer name, in this configuration file you can specify more BGP Peers by copy-pasting the above module. These peers must have a *unique* name.
78 - *host* - IP address or hostname of BGP speaker (IP where OpenDaylight should connect to gather topology)
79 - *holdtimer* - unit: seconds
80 - *peer-role* - If peer role is not present, default value "ibgp" will be used (allowed values are also "ebgp" and "rr-client"). This field is case-sensitive.
81 - *rib* - BGP RIB identifier
82
83 ==== Configure Connection Attributes - OPTIONAL ====
84
85 [source,xml]
86 ----
87 <module>
88    <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:reconnectstrategy">prefix:timed-reconnect-strategy</type>
89    <name>example-reconnect-strategy</name>
90    <min-sleep>1000</min-sleep>
91    <max-sleep>180000</max-sleep>
92    <sleep-factor>2.00</sleep-factor>
93    <connect-time>5000</connect-time>
94    <executor>
95        <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-event-executor</type>
96        <name>global-event-executor</name>
97    </executor>
98 </module>
99 ----
100
101 - *min-sleep* - Minimum sleep time (miliseconds) in between reconnect tries
102 - *max-sleep* - Maximum sleep time (miliseconds) in between reconnect tries
103 - *sleep-factor* - Power factor of the sleep time between reconnect tries
104 - *connect-time* - How long we should wait (miliseconds) for the TCP connect
105 attempt, overrides default connection timeout dictated by TCP retransmits
106
107
108 ==== BGP Speaker Configuration ====
109
110 Previous entries addressed the configuration of a BGP connection initiated by
111 OpenDaylight. OpenDaylight also supports BGP Speaker functionality and accepts
112 incoming BGP connections.
113
114 *The configuration of BGP speaker is located in: 41-bgp-example.xml:
115
116 [source,xml]
117 ----
118 <module>
119     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-acceptor</type>
120     <name>bgp-peer-server</name>
121
122     <!--Default parameters-->
123     <!--<binding-address>0.0.0.0</binding-address>-->
124     <!--<binding-port>1790</binding-port>-->
125
126     ...
127     <!--Drops or accepts incoming BGP connection, every BGP Peer that should be accepted needs to be added to this registry-->
128     <peer-registry>
129         <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
130         <name>global-bgp-peer-registry</name>
131     </peer-registry>
132 </module>
133 ----
134
135 *Changing speaker configuration*
136 - Changing binding address: Uncomment tag binding-address and change the address to e.g. _127.0.0.1_. The default binding address is _0.0.0.0_.
137 - Changing binding port: Uncomment tag binding-port and change the port to e.g.
138   _1790_. The default binding port is _179_ as specified in link:http://tools.ietf.org/html/rfc4271[BGP RFC].  --
139
140 ==== Incomming BGP Connections ====
141
142 *BGP speaker drops all BGP connections from unknown BGP peers.* The decision is
143 made in component bgp-peer-registry that is injected into the speaker (The
144 registry is configured in 31-bgp.xml).
145
146 To add BGP Peer configuration into the registry, it is necessary to configure
147 regular BGP peer just like in example in 41-bgp-example.xml. Notice that the
148 BGP peer depends on the same bgp-peer-registry as bgp-speaker:
149
150 [source,xml]
151 ----
152 <module>
153     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
154     <name>example-bgp-peer</name>
155     <host>192.0.2.1</host>
156     ...
157     <peer-registry>
158         <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
159         <name>global-bgp-peer-registry</name>
160     </peer-registry>
161     ...
162 </module>
163 ----
164
165 The BGP peer registers itself into the registry, which allows incoming BGP
166 connections handled by the bgp-speaker. (Config attribute peer-registry is
167 optional for now to preserve backwards compatibility). With this configuration,
168 the connection to 192.0.2.1 is initiated by OpenDaylight but will also be accepted from
169 192.0.2.1. In case both connections are being established, only one of them
170 will be preserved and the other will be dropped. The connection initiated from
171 device with lower bgp id will be dropped by the registry.  Each BGP peer must
172 be configured in its own module. Note, that the name of the module needs to be
173 unique, so if you are configuring more peers, when changing the *host*, change
174 also the *name*.
175 There is a way to configure the peer only for incoming connections (The
176 connection will not be initiated by the OpenDaylight, OpenDaylight will only wait for incoming
177 connection from the peer. The peer is identified by its IP address). To
178 configure peer only for incoming connection add attribute initiate-connection
179 to peer's configuration:
180
181 [source,xml]
182 ----
183 <module>
184     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
185     <name>example-bgp-peer</name>
186     <host>192.0.2.1</host>                         // IP address or hostname of the speaker
187     <holdtimer>180</holdtimer>
188     <initiate-connection>false</initiate-connection>  // Connection will not be initiated by ODL
189     ...
190 </module>
191 ----
192
193 - *initiate-connection* - if set to false OpenDaylight will not initiate connection to this peer. Default value is true for all peers.
194
195 ==== BGP Application Peer  ====
196
197 A BGP speaker needs to register all peers that can be connected to it (meaning if
198 a BGP peer is not configured, the connection with OpenDaylight won't be
199 successful). As a first step, configure RIB. Then, instead of configuring
200 regular peer, configure this application peer, with its own application RIB.
201 Change the value in bold bgp-peer-id which is your local BGP-ID that will be
202 used in BGP Best Path Selection algorithm.
203
204 [source,xml]
205 ----
206 <module>
207  <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
208  <name>example-bgp-peer-app</name>
209  <bgp-peer-id>10.25.1.9</bgp-peer-id>
210  <target-rib>
211   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
212   <name>example-bgp-rib</name>
213  </target-rib>
214  <application-rib-id>example-app-rib</application-rib-id>
215  ...
216 </module>
217 ----
218
219 - *bgp-peer-id* - Our local BGP identifier (the IP of the VM where OpenDaylight is deployed), we use this in best path selection
220 - *target-rib* - RIB ID of existing RIB where the data should be transferred
221 - *application-rib-id* - RIB ID of local application RIB (all the routes that you put to OpenDaylight will be displayed here)
222
223 To populate RIB use //TODO: internal link to Populate RIB
224
225 In order to get routes advertised to other peers, you have to also configure the peers, as described in section BGP Peer //TODO: internal jump to section?
226
227 === Configuration through RESTCONF ===
228
229 Another method to configure BGP is dynamically through RESTCONF. Before you
230 start, make sure, you've completed steps 1-5 in Installation Guide. Instead of
231 restarting Karaf, install another feature, that provides you the access to
232 'restconf/config/' URLs.
233
234 feature:install odl-netconf-connector-all
235
236 To check what modules you have currently configured, check following link:
237 http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
238 This URL is also used to POST new configuration. If you want to change any
239 other configuration that is listed here, make sure you include the correct
240 namespaces. RESTCONF will tell you if some namespace is wrong.
241
242 It is vital that you respect the order of steps described in user guide.
243
244 ==== RIB ====
245
246 First, configure RIB. This module is already present in the configuration,
247 therefore we change only the parameters we need. In this case, it's
248 *bgp-rib-id* and *local-as*.
249
250 *URL:* _
251 _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_
252
253 *PUT:*
254 [source,xml]
255 ----
256 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
257  <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type>
258  <name>example-bgp-rib</name>
259  <session-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
260   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type>
261   <name>example-reconnect-strategy-factory</name>
262  </session-reconnect-strategy>
263  <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-rib</rib-id>
264  <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
265   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
266   <name>global-rib-extensions</name>
267  </extensions>
268  <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
269   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
270   <name>runtime-mapping-singleton</name>
271  </codec-tree-factory>
272  <tcp-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
273   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type>
274   <name>example-reconnect-strategy-factory</name>
275  </tcp-reconnect-strategy>
276  <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
277   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
278   <name>pingpong-binding-data-broker</name>
279  </data-provider>
280  <local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as>
281  <bgp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
282   <type>bgp-dispatcher</type>
283   <name>global-bgp-dispatcher</name>
284  </bgp-dispatcher>
285  <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
286   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
287   <name>pingpong-broker</name>
288  </dom-data-provider>
289  <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
290   <type>bgp-table-type</type>
291   <name>ipv4-unicast</name>
292  </local-table>
293  <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
294   <type>bgp-table-type</type>
295   <name>ipv6-unicast</name>
296  </local-table>
297  <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
298   <type>bgp-table-type</type>
299   <name>linkstate</name>
300  </local-table>
301  <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
302   <type>bgp-table-type</type>
303   <name>flowspec</name>
304  </local-table>
305  <bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.2</bgp-rib-id>
306 </module>
307 ----
308
309 IMPORTANT: MIGHT NOT BE NEEDED depending on your BGP router, you might need a
310 switch from linkstate attribute type 99 to 29. Check with your router vendor.
311 Switch the field to true if your router supports type 29.
312
313 *URL:* _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_
314
315 *PUT:*
316 [source,xml]
317 ----
318 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
319  <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">x:bgp-linkstate</type>
320  <name>bgp-linkstate</name>
321  <iana-linkstate-attribute-type xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:linkstate">true</iana-linkstate-attribute-type>
322 </module>
323 ----
324
325 ==== BGP Peer ====
326
327 We also need to add new module to configuration (bgp-peer). In this case, the
328 whole module needs to be configured. Please change values *host*, *holdtimer*
329 and *peer-role* (if necessary).
330
331 .*POST:*
332
333 [source,xml]
334 ----
335 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
336  <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer</type>
337  <name>example-bgp-peer</name>
338  <host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.1</host>
339  <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">180</holdtimer>
340  <peer-role xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">ibgp</peer-role>
341  <rib xmlns"urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
342   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">x:rib</type>
343   <name>example-bgp-rib</name>
344  </rib>
345  <peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
346   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer-registry</type>
347   <name>global-bgp-peer-registry</name>
348  </peer-registry>
349  <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
350   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
351   <name>ipv4-unicast</name>
352  </advertized-table>
353  <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
354   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
355   <name>ipv6-unicast</name>
356  </advertized-table>
357  <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
358   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
359   <name>linkstate</name>
360  </advertized-table>
361  <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
362   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
363   <name>flowspec</name>
364  </advertized-table>
365 </module>
366 ----
367
368 This is all necessary information that you need to get ODL connect to your speaker.
369
370 ==== BGP Application Peer ====
371
372 Change the value *bgp-peer-id* which is your local BGP ID that will be used in
373 BGP Best Path Selection algorithm.
374
375 .*POST:*
376 [source,xml]
377 ----
378 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
379  <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
380  <name>example-bgp-peer-app</name>
381  <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 -->
382  <target-rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
383   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
384   <name>example-bgp-rib</name>
385   </target-rib>
386  <application-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-app-rib</application-rib-id>
387  <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
388   <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
389   <name>pingpong-binding-data-broker</name>
390  </data-broker>
391 </module>
392 ----
393
394 === Tutorials ===
395
396 ==== Viewing BGP Topology ====
397
398 This section summarizes how data from BGP can be viewed through RESTCONF. Currently it is the only way to view the data.
399
400 IMPORTANT: From Helium release the port changed from 8080 to 8181.
401
402 ===== Network Topology View =====
403
404 Basic URL for network topology is *http://localhost:8181/restconf/operational/network-topology:network-topology/* .
405
406 If BGP is configured properly, it should display output similar to this one:
407
408 [source,xml]
409 ----
410 <network-topology>
411  <topology>
412   <topology-id>pcep-topology</topology-id>
413   <topology-types>
414    <topology-pcep/>
415   </topology-types>
416  </topology>
417  <topology>
418   <server-provided>true</server-provided>
419   <topology-id>example-ipv4-topology</topology-id>
420   <topology-types/>
421  </topology>
422  <topology>
423   <server-provided>true</server-provided>
424   <topology-id>example-linkstate-topology</topology-id>
425   <topology-types/>
426  </topology>
427 </network-topology>
428 ----
429
430 BGP data as were sent from BGP speaker are listed in three topologies (if all three are configured):
431
432 *example-linkstate-topology* - displays links and nodes advertised through linkstate Update messages
433
434 http://localhost:8181/restconf/operational/network-topology:network-topology/topology/example-linkstate-topology
435
436 *example-ipv4-topology* - display Ipv4 adresses of nodes in the topology
437
438 http://localhost:8181/restconf/operational/network-topology:network-topology/topology/example-ipv4-topology
439
440 *example-ipv6-topology* - display Ipv6 adresses of nodes in the topology
441
442 http://localhost:8181/restconf/operational/network-topology:network-topology/topology/example-ipv6-topology
443
444 ===== Route Information Base (RIB) View =====
445
446 Another view of BGP data is through *BGP RIBs*, located here:
447
448 http://localhost:8181/restconf/operational/bgp-rib:bgp-rib/
449
450 There are multiple RIBs configured:
451
452 - AdjRibsIn (per Peer) : Adjacency RIBs In, BGP routes as they come from BGP Peer
453 - EffectiveRib (per Peer) : BGP routes after applying Import policies
454 - LocRib (per RIB) : Local RIB, BGP routes from all peers
455 - AdjRibsOut (per Peer) : BGP routes that will be advertizes, after applying Export policies
456
457 This is how the output looks like, when address families for IPv4 and Linkstate were configured:
458
459 [source,xml]
460 ----
461 <loc-rib>
462  <tables>
463   </attributes>
464   <safi>x:linkstate-subsequent-address-family</safi>
465   <afi>x:linkstate-address-family</afi>
466   </linkstate-routes>
467  </tables>
468  <tables>
469   </attributes>
470   <safi>x:unicast-subsequent-address-family</safi>
471   <afi>x:ipv4-address-family</afi>
472   </ipv4-routes>
473  </tables>
474 </loc-rib>
475 ----
476
477 You can see details for each AFI by expanding the RESTCONF link:
478
479 *IPv4* : 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
480
481 *Linkstate* : 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
482
483 ==== Populate RIB ====
484
485 If your peer is configured, you can populate the RIB by making following POST call to RESTCONF:
486
487 *URL:* http://localhost:8181/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/
488
489 - where example-app-rib is your application RIB id (that you specified in the configuration) and tables specifies AFI and SAFI of the data that you want to add.
490
491 *POST:*
492
493 *Content-Type:* application/xml
494
495 [source,xml]
496 ----
497 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
498 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-rib">
499  <ipv4-route>
500   <prefix>200.20.160.1/32</prefix>
501   <attributes>
502    <ipv4-next-hop>
503     <global>199.20.160.41</global>
504    </ipv4-next-hop><as-path/>
505    <multi-exit-disc>
506     <med>0</med>
507    </multi-exit-disc>
508    <local-pref>
509     <pref>100</pref>
510    </local-pref>
511    <originator-id>
512     <originator>41.41.41.41</originator>
513    </originator-id>
514    <origin>
515     <value>igp</value>
516    </origin>
517    <cluster-id>
518     <cluster>40.40.40.40</cluster>
519    </cluster-id>
520   </attributes>
521  </ipv4-route>
522 </ipv4-routes>
523 ----
524
525 The request results in *204 No content*. This is expected.