1 .. _bgp-user-guide-topology-provider:
5 This section provides an overview of the BGP topology provider service.
6 It shows how to configure and use all available BGP topology providers.
7 Providers are building topology view of BGP routes stored in local BGP speaker's Loc-RIB.
8 Output topologies are rendered in a form of standardised IETF network topology model.
10 .. contents:: Contents
14 Inet Reachability Topology
15 ^^^^^^^^^^^^^^^^^^^^^^^^^^
16 Inet reachability topology exporter offers a mapping service from IPv4/6 routes to network topology nodes.
20 Following example shows how to create a new instance of IPv4 BGP topology exporter:
22 **URL:** ``/restconf/config/network-topology:network-topology``
26 **Content-Type:** ``application/xml``
32 :emphasize-lines: 2,4,6
34 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
35 <topology-id>bgp-example-ipv4-topology</topology-id>
37 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv4-reachability-topology>
39 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
42 @line 2: An identifier for a topology.
44 @line 4: Used to identify type of the topology. In this case BGP IPv4 reachability topology.
46 @line 6: A name of the local BGP speaker instance.
50 The topology exporter instance can be removed in a following way:
52 **URL:** ``/restconf/config/network-topology:network-topology/topology/bgp-example-ipv4-topology``
54 **Method:** ``DELETE``
58 Following example shows how to create a new instance of IPv6 BGP topology exporter:
60 **URL:** ``/restconf/config/network-topology:network-topology``
64 **Content-Type:** ``application/xml``
70 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
71 <topology-id>bgp-example-ipv6-topology</topology-id>
73 <bgp-ipv6-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv6-reachability-topology>
75 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
80 Operational state of the topology can be verified via REST:
82 **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-ipv4-topology``
90 :emphasize-lines: 8,11
92 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
93 <topology-id>bgp-example-ipv4-topology</topology-id>
94 <server-provided>true</server-provided>
96 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-ipv4-reachability-topology>
99 <node-id>10.10.1.1</node-id>
100 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
102 <prefix>10.0.0.10/32</prefix>
104 </igp-node-attributes>
108 @line 8: The identifier of a node in a topology. Its value is mapped from route's NEXT_HOP attribute.
110 @line 11: The IP prefix attribute of the node. Its value is mapped from routes's destination IP prefix.
112 BGP Linkstate Topology
113 ^^^^^^^^^^^^^^^^^^^^^^
114 BGP linkstate topology exporter offers a mapping service from BGP-LS routes to network topology nodes and links.
118 Following example shows how to create a new instance of linkstate BGP topology exporter:
120 **URL:** ``/restconf/config/network-topology:network-topology``
124 **Content-Type:** ``application/xml``
130 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
131 <topology-id>bgp-example-linkstate-topology</topology-id>
133 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-linkstate-topology>
135 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">bgp-example</rib-id>
140 Operational state of the topology can be verified via REST.
141 A sample output below represents a two node topology with two unidirectional links interconnecting those nodes.
143 **URL:** ``/restconf/operational/network-topology:network-topology/topology/bgp-example-linkstate-topology``
151 <topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
152 <topology-id>bgp-example-linkstate-topology</topology-id>
153 <server-provided>true</server-provided>
155 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"></bgp-linkstate-topology>
158 <node-id>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</node-id>
160 <tp-id>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</tp-id>
161 <igp-termination-point-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"/>
163 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
165 <prefix>40.40.40.40/32</prefix>
169 <prefix>203.20.160.0/24</prefix>
173 <router-id>40.40.40.40</router-id>
174 <isis-node-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
176 <te-router-id-ipv4>40.40.40.40</te-router-id-ipv4>
179 <iso-system-id>MDAwMDAwMDAwMDY0</iso-system-id>
181 </isis-node-attributes>
182 </igp-node-attributes>
185 <node-id>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</node-id>
187 <tp-id>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</tp-id>
188 <igp-termination-point-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology"/>
190 <igp-node-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
192 <prefix>39.39.39.39/32</prefix>
196 <prefix>203.20.160.0/24</prefix>
200 <router-id>39.39.39.39</router-id>
201 <isis-node-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
203 <te-router-id-ipv4>39.39.39.39</te-router-id-ipv4>
206 <iso-system-id>MDAwMDAwMDAwMDg3</iso-system-id>
208 </isis-node-attributes>
209 </igp-node-attributes>
213 <dest-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</dest-node>
214 <dest-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</dest-tp>
216 <link-id>bgpls://IsisLevel2:1/type=link&local-as=65000&local-domain=673720360&local-router=0000.0000.0040&remote-as=65000&remote-domain=673720360&remote-router=0000.0000.0039&ipv4-iface=203.20.160.40&ipv4-neigh=203.20.160.39</link-id>
218 <source-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</source-node>
219 <source-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</source-tp>
221 <igp-link-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
223 <isis-link-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
226 <max-link-bandwidth>1250000.0</max-link-bandwidth>
227 <max-resv-link-bandwidth>12500.0</max-resv-link-bandwidth>
228 <te-default-metric>0</te-default-metric>
229 <unreserved-bandwidth>
230 <bandwidth>12500.0</bandwidth>
231 <priority>0</priority>
232 </unreserved-bandwidth>
233 <unreserved-bandwidth>
234 <bandwidth>12500.0</bandwidth>
235 <priority>1</priority>
236 </unreserved-bandwidth>
237 <unreserved-bandwidth>
238 <bandwidth>12500.0</bandwidth>
239 <priority>2</priority>
240 </unreserved-bandwidth>
241 <unreserved-bandwidth>
242 <bandwidth>12500.0</bandwidth>
243 <priority>3</priority>
244 </unreserved-bandwidth>
245 <unreserved-bandwidth>
246 <bandwidth>12500.0</bandwidth>
247 <priority>4</priority>
248 </unreserved-bandwidth>
249 <unreserved-bandwidth>
250 <bandwidth>12500.0</bandwidth>
251 <priority>5</priority>
252 </unreserved-bandwidth>
253 <unreserved-bandwidth>
254 <bandwidth>12500.0</bandwidth>
255 <priority>6</priority>
256 </unreserved-bandwidth>
257 <unreserved-bandwidth>
258 <bandwidth>12500.0</bandwidth>
259 <priority>7</priority>
260 </unreserved-bandwidth>
262 </isis-link-attributes>
263 </igp-link-attributes>
267 <dest-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0040</dest-node>
268 <dest-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.40</dest-tp>
270 <link-id>bgpls://IsisLevel2:1/type=link&local-as=65000&local-domain=673720360&local-router=0000.0000.0039&remote-as=65000&remote-domain=673720360&remote-router=0000.0000.0040&ipv4-iface=203.20.160.39&ipv4-neigh=203.20.160.40</link-id>
272 <source-node>bgpls://IsisLevel2:1/type=node&as=65000&domain=673720360&router=0000.0000.0039</source-node>
273 <source-tp>bgpls://IsisLevel2:1/type=tp&ipv4=203.20.160.39</source-tp>
275 <igp-link-attributes xmlns="urn:TBD:params:xml:ns:yang:nt:l3-unicast-igp-topology">
277 <isis-link-attributes xmlns="urn:TBD:params:xml:ns:yang:network:isis-topology">
280 <max-link-bandwidth>1250000.0</max-link-bandwidth>
281 <max-resv-link-bandwidth>12500.0</max-resv-link-bandwidth>
282 <te-default-metric>0</te-default-metric>
283 <unreserved-bandwidth>
284 <bandwidth>12500.0</bandwidth>
285 <priority>0</priority>
286 </unreserved-bandwidth>
287 <unreserved-bandwidth>
288 <bandwidth>12500.0</bandwidth>
289 <priority>1</priority>
290 </unreserved-bandwidth>
291 <unreserved-bandwidth>
292 <bandwidth>12500.0</bandwidth>
293 <priority>2</priority>
294 </unreserved-bandwidth>
295 <unreserved-bandwidth>
296 <bandwidth>12500.0</bandwidth>
297 <priority>3</priority>
298 </unreserved-bandwidth>
299 <unreserved-bandwidth>
300 <bandwidth>12500.0</bandwidth>
301 <priority>4</priority>
302 </unreserved-bandwidth>
303 <unreserved-bandwidth>
304 <bandwidth>12500.0</bandwidth>
305 <priority>5</priority>
306 </unreserved-bandwidth>
307 <unreserved-bandwidth>
308 <bandwidth>12500.0</bandwidth>
309 <priority>6</priority>
310 </unreserved-bandwidth>
311 <unreserved-bandwidth>
312 <bandwidth>12500.0</bandwidth>
313 <priority>7</priority>
314 </unreserved-bandwidth>
316 </isis-link-attributes>
317 </igp-link-attributes>
321 BGP Network Topology Configuration Loader
322 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
324 BGP Network Topology Configuration Loader allows user to define static initial configuration for a BGP protocol instance.
325 This service will detect the creation of new configuration files following the pattern "network-topology-*.xml" under the path "etc/opendaylight/bgpcep".
326 Once the file is processed, the defined configuration will be available from the configuration Data Store.
328 .. note:: If the BGP topology instance is already present, no update or configuration will be applied.
330 **PATH:** ``etc/opendaylight/bgpcep/network-topology-config.xml``
334 <network-topology xmlns="urn:TBD:params:xml:ns:yang:network-topology">
336 <topology-id>example-ipv4-topology</topology-id>
338 <bgp-ipv4-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"/>
340 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">example-bgp-rib</rib-id>
343 <topology-id>example-ipv6-topology</topology-id>
345 <bgp-ipv6-reachability-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"/>
347 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">example-bgp-rib</rib-id>
350 <topology-id>example-linkstate-topology</topology-id>
352 <bgp-linkstate-topology xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-types"/>
354 <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:odl-bgp-topology-config">example-bgp-rib</rib-id>