1 BGP Monitoring Protocol User Guide
2 ==================================
3 This guide contains information on how to use the OpenDaylight BGP Monitoring Protocol (BMP) plugin.
4 It covers BMP basic concepts, supported capabilities, configuration and operations.
12 This section provides high-level overview of the BMP plugin, OpenDaylight implementation and BMP usage for SDN.
14 .. contents:: Contents
18 BGP Monitoring Protocol
19 ^^^^^^^^^^^^^^^^^^^^^^^
20 The BGP Monitoring Protocol (BMP) serves to monitor BGP sessions.
21 The BMP can be used to obtain route view instead of screen scraping.
22 The BMP provides access to unprocessed routing information (Adj-RIB-In) and processed routes (applied inbound policy) of monitored router's peer.
23 In addition, monitored router can provide periodic dump of statistics.
25 The BMP runs over TCP.
26 Both monitored router and monitoring station can be configured as active or passive party of the connection.
27 The passive party listens at particular port.
28 The router can be monitored by multiple monitoring stations.
29 BMP messages are sent by monitored router only, monitoring station supposed to collect and process data received over BMP.
31 .. figure:: ./images/bgpcep/bmp.png
35 The BMP overview - Monitoring Station, Monitored Router and Monitored Peers.
40 The main concept of BMP is to monitor BGP sessions - monitoring station is aware of monitored peer's status, collects statistics and analyzes them in order to provide valuable information for network operators.
42 Moreover, BMP provides provides peer RIBs visibility, without need to establish BGP sessions.
43 Unprocessed routes may serve as a source of information for software-driven routing optimization.
44 In this case, SDN controller, a BMP monitoring station, collects routing information from monitored routers.
45 The routes are used in subsequent optimization procedures.
48 OpenDaylight BMP plugin
49 ^^^^^^^^^^^^^^^^^^^^^^^
50 The OpenDaylight BMP plugin provides monitoring station implementation.
51 The plugin can establish BMP session with one or more monitored routers in order to collect routing and statistical information.
53 * Runtime configurable monitoring station
54 * Read-only routes and statistics view
55 * Supports various routing information types
57 .. figure:: ./images/bgpcep/bmp-plugin.png
61 OpenDaylight BMP plugin overview.
63 .. important:: The BMP plugin is not storing historical data, it provides current snapshot only.
65 List of supported capabilities
66 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 The BMP plugin implementation is based on Internet standards:
69 * `RFC7854 <https://tools.ietf.org/html/rfc7854>`_ - BGP Monitoring Protocol (BMP)
71 .. note:: The BMP plugin is capable to process various types of routing information (IP Unicast, EVPN, L3VPN, Link-State,...).
72 Please, see complete list in BGP user guide.
76 This section explains how to install BMP plugin.
78 1. Install BMP feature - ``odl-bgpcep-bmp``.
79 Also, for sake of this sample, it is required to install RESTCONF.
80 In the Karaf console, type command:
82 .. code-block:: console
84 feature:install odl-restconf odl-bgpcep-bmp
86 2. The BMP plugin contains a default configuration, which is applied after the feature starts up.
87 One instance of BMP monitoring station is created (named *example-bmp-monitor*), and its presence can be verified via REST:
89 **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor``
97 <monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
98 <monitor-id>example-bmp-monitor</monitor-id>
101 BMP Monitoring Station
102 ----------------------
103 The following section shows how to configure BMP basics, how to verify functionality and presents essential components of the plugin. Next samples demonstrate the plugin’s runtime configuration capability.
105 The monitoring station is responsible for received BMP PDUs processing and storage.
106 The default BMP server is listening at port *12345*.
108 .. contents:: Contents
114 This section shows the way to configure the BMP monitoring station via REST API.
116 .. warning:: The BMP monitoring station configuration is going to be changed in Carbon.
117 This user-guide will be updated accordingly.
119 Monitoring station configuration
120 ''''''''''''''''''''''''''''''''
121 In order to change default's BMP monitoring station configuration, use following request.
122 It is required to install ``odl-netconf-connector-ssh`` feature first.
124 **URL:** ``/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/config:module/odl-bmp-impl-cfg:bmp-monitor-impl/example-bmp-monitor``
128 **Content-Type:** ``application/xml``
134 :emphasize-lines: 4,5
136 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
137 <name>example-bmp-monitor</name>
138 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
139 <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12355</binding-port>
140 <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
141 <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
142 <type>bmp-dispatcher</type>
143 <name>global-bmp-dispatcher</name>
145 <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
146 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
147 <name>runtime-mapping-singleton</name>
148 </codec-tree-factory>
149 <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
150 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
151 <name>global-rib-extensions</name>
153 <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
154 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
155 <name>pingpong-broker</name>
159 @line 4: **binding-port** - The BMP server listening port.
161 @line 5: **binding-address** - The BMP server biding address.
163 .. note:: User may create multiple BMP monitoring station instances at runtime.
165 Active mode configuration
166 '''''''''''''''''''''''''
167 In order to enable active connection, use following request.
168 It is required to install ``odl-netconf-connector-ssh`` feature first.
170 **URL:** ``/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/config:module/odl-bmp-impl-cfg:bmp-monitor-impl/example-bmp-monitor``
174 **Content-Type:** ``application/xml``
180 :emphasize-lines: 23,24,25
182 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
183 <name>example-bmp-monitor</name>
184 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
185 <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
186 <type>bmp-dispatcher</type>
187 <name>global-bmp-dispatcher</name>
189 <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
190 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
191 <name>runtime-mapping-singleton</name>
192 </codec-tree-factory>
193 <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
194 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
195 <name>global-rib-extensions</name>
197 <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
198 <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
199 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
200 <name>pingpong-broker</name>
202 <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12345</binding-port>
203 <monitored-router xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
204 <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">10.10.10.10</address>
205 <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">1234</port>
206 <active xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">true</active>
210 @line 23: **address** - The monitored router's IP address.
212 @line 24: **port** - The monitored router's port.
214 @line 25: **active** - Active mode set.
216 .. note:: User may configure active session establishment for multiple monitored routers.
218 MD5 authentication configuration
219 ''''''''''''''''''''''''''''''''
220 In order to enable active connection, use following request.
221 It is required to install ``odl-netconf-connector-ssh`` feature first.
223 **URL:** ``/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/config:module/odl-bmp-impl-cfg:bmp-monitor-impl/example-bmp-monitor``
227 **Content-Type:** ``application/xml``
233 :emphasize-lines: 23,24
235 <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
236 <name>example-bmp-monitor</name>
237 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
238 <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
239 <type>bmp-dispatcher</type>
240 <name>global-bmp-dispatcher</name>
242 <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
243 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
244 <name>runtime-mapping-singleton</name>
245 </codec-tree-factory>
246 <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
247 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
248 <name>global-rib-extensions</name>
250 <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
251 <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
252 <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
253 <name>pingpong-broker</name>
255 <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12345</binding-port>
256 <monitored-router xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
257 <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">11.11.11.11</address>
258 <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">topsecret</password>
262 @line 23: **address** - The monitored router's IP address.
264 @line 24: **password** - The TCP MD5 signature.
269 .. code-block:: console
273 +--ro monitor* [monitor-id]
274 +--ro monitor-id monitor-id
275 +--ro router* [router-id]
277 +--ro description? string
279 +--ro router-id router-id
281 +--ro peer* [peer-id]
282 +--ro peer-id rib:peer-id
285 | +--ro distinguisher-type? distinguisher-type
286 | +--ro distinguisher? string
287 +--ro peer-distinguisher? union
288 +--ro address inet:ip-address
289 +--ro as inet:as-number
290 +--ro bgp-id inet:ipv4-address
291 +--ro router-distinguisher? string
293 | +--ro local-address inet:ip-address
294 | +--ro local-port inet:port-number
295 | +--ro remote-port inet:port-number
297 | | +--ro version? protocol-version
298 | | +--ro my-as-number? uint16
299 | | +--ro hold-timer uint16
300 | | +--ro bgp-identifier inet:ipv4-address
301 | | +--ro bgp-parameters*
302 | | +--ro optional-capabilities*
303 | | +--ro c-parameters
304 | | +--ro as4-bytes-capability
305 | | | +--ro as-number? inet:as-number
306 | | +--ro bgp-extended-message-capability!
307 | | +--ro multiprotocol-capability
308 | | | +--ro afi? identityref
309 | | | +--ro safi? identityref
310 | | +--ro graceful-restart-capability
311 | | | +--ro restart-flags bits
312 | | | +--ro restart-time uint16
313 | | | +--ro tables* [afi safi]
314 | | | +--ro afi identityref
315 | | | +--ro safi identityref
316 | | | +--ro afi-flags bits
317 | | +--ro add-path-capability
318 | | | +--ro address-families*
319 | | | +--ro afi? identityref
320 | | | +--ro safi? identityref
321 | | | +--ro send-receive? send-receive
322 | | +--ro route-refresh-capability!
323 | +--ro received-open
324 | | +--ro version? protocol-version
325 | | +--ro my-as-number? uint16
326 | | +--ro hold-timer uint16
327 | | +--ro bgp-identifier inet:ipv4-address
328 | | +--ro bgp-parameters*
329 | | +--ro optional-capabilities*
330 | | +--ro c-parameters
331 | | +--ro as4-bytes-capability
332 | | | +--ro as-number? inet:as-number
333 | | +--ro bgp-extended-message-capability!
334 | | +--ro multiprotocol-capability
335 | | | +--ro afi? identityref
336 | | | +--ro safi? identityref
337 | | +--ro graceful-restart-capability
338 | | | +--ro restart-flags bits
339 | | | +--ro restart-time uint16
340 | | | +--ro tables* [afi safi]
341 | | | +--ro afi identityref
342 | | | +--ro safi identityref
343 | | | +--ro afi-flags bits
344 | | +--ro add-path-capability
345 | | | +--ro address-families*
346 | | | +--ro afi? identityref
347 | | | +--ro safi? identityref
348 | | | +--ro send-receive? send-receive
349 | | +--ro route-refresh-capability!
351 | | +--ro string-information*
353 | | +--ro string-info? string
354 | +--ro status? status
355 | +--ro timestamp-sec? yang:timestamp
356 | +--ro timestamp-micro? yang:timestamp
358 | +--ro rejected-prefixes? yang:counter32
359 | +--ro duplicate-prefix-advertisements? yang:counter32
360 | +--ro duplicate-withdraws? yang:counter32
361 | +--ro invalidated-cluster-list-loop? yang:counter32
362 | +--ro invalidated-as-path-loop? yang:counter32
363 | +--ro invalidated-originator-id? yang:counter32
364 | +--ro invalidated-as-confed-loop? yang:counter32
365 | +--ro adj-ribs-in-routes? yang:gauge64
366 | +--ro loc-rib-routes? yang:gauge64
367 | +--ro per-afi-safi-adj-rib-in-routes
368 | | +--ro afi-safi* [afi safi]
369 | | +--ro afi identityref
370 | | +--ro safi identityref
371 | | +--ro count? yang:gauge64
372 | +--ro per-afi-safi-loc-rib-routes
373 | | +--ro afi-safi* [afi safi]
374 | | +--ro afi identityref
375 | | +--ro safi identityref
376 | | +--ro count? yang:gauge64
377 | +--ro updates-treated-as-withdraw? yang:counter32
378 | +--ro prefixes-treated-as-withdraw? yang:counter32
379 | +--ro duplicate-updates? yang:counter32
380 | +--ro timestamp-sec? yang:timestamp
381 | +--ro timestamp-micro? yang:timestamp
383 | +--ro tables* [afi safi]
384 | +--ro afi identityref
385 | +--ro safi identityref
387 | | +--ro uptodate? boolean
389 +--ro post-policy-rib
390 | +--ro tables* [afi safi]
391 | +--ro afi identityref
392 | +--ro safi identityref
394 | | +--ro uptodate? boolean
397 +--ro information? bmp-msg:mirror-information-code
398 +--ro timestamp-sec? yang:timestamp
399 +--ro timestamp-micro? yang:timestamp
404 The BMP plugin offers view of collected routes and statistical information from monitored peers.
405 To get top-level view of monitoring station:
407 **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor``
415 :emphasize-lines: 3,5,11,12,13,14,15,17,20,21,22,27,33,50,53
417 <bmp-monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
419 <monitor-id>example-bmp-monitor</monitor-id>
421 <router-id>10.10.10.10</router-id>
423 <description>monitored-router</description>
424 <info>monitored router;</info>
427 <peer-id>20.20.20.20</peer-id>
428 <address>20.20.20.20</address>
429 <bgp-id>20.20.20.20</bgp-id>
433 <remote-port>1790</remote-port>
434 <timestamp-sec>0</timestamp-sec>
436 <local-address>10.10.10.10</local-address>
437 <local-port>2200</local-port>
439 <hold-timer>180</hold-timer>
440 <my-as-number>65000</my-as-number>
441 <bgp-identifier>20.20.20.20</bgp-identifier>
444 <hold-timer>180</hold-timer>
445 <my-as-number>65000</my-as-number>
446 <bgp-identifier>65000</bgp-identifier>
451 <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
452 <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
453 <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
455 <prefix>10.10.10.0/24</prefix>
462 <uptodate>true</uptodate>
470 <timestamp-sec>0</timestamp-sec>
471 <invalidated-cluster-list-loop>0</invalidated-cluster-list-loop>
472 <duplicate-prefix-advertisements>0</duplicate-prefix-advertisements>
473 <loc-rib-routes>100</loc-rib-routes>
474 <duplicate-withdraws>0</duplicate-withdraws>
475 <invalidated-as-confed-loop>0</invalidated-as-confed-loop>
476 <adj-ribs-in-routes>10</adj-ribs-in-routes>
477 <invalidated-as-path-loop>0</invalidated-as-path-loop>
478 <invalidated-originator-id>0</invalidated-originator-id>
479 <rejected-prefixes>8</rejected-prefixes>
486 @line 3: **monitor-id** - The BMP monitoring station instance identifier.
488 @line 5: **router-id** - The monitored router IP address, serves as an identifier.
490 @line 11: **peer-id** - The monitored peer's BGP identifier, serves a an identifier.
492 @line 12: **address** - The IP address of the peer, associated with the TCP session.
494 @line 13: **bgp-id** - The BGP Identifier of the peer.
496 @line 14: **as** - The Autonomous System number of the peer.
498 @line 15: **type** - Identifies type of the peer - *Global Instance*, *RD Instance* or *Local Instance*
500 @line 17: **remote-port** - The peer's port number associated with TCP session.
502 @line 20: **local-address** - The IP address of the monitored router associated with the peering TCP session.
504 @line 21: **local-port** - The port number of the monitored router associated with the peering TCP session.
506 @line 22: **received-open** - The full OPEN message received by monitored router from the peer.
508 @line 27: **sent-open** - The full OPEN message send by monitored router to the peer.
510 @line 33: **pre-policy-rib** - The Adj-RIB-In that contains unprocessed routing information.
512 @line 50: **post-policy-rib** - The Post-Policy Ad-RIB-In that contains routes filtered by inbound policy.
514 @line 53: **stats** - Contains various statistics, periodically updated by the router.
518 * To view collected information from particular monitored router:
519 **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor/router/10.10.10.10``
521 * To view collected information from particular monitored peer:
522 **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor/router/10.10.10.10/peer/20.20.20.20``
526 BMP test tool serves to test basic BMP functionality, scalability and performance.
530 The BMP mock is a stand-alone Java application purposed to simulate a BMP-enabled router(s) and peers.
531 The simulator is capable to report dummy routes and statistics.
532 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
534 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/bgp-bmp-mock``
538 The application can be run from command line:
540 .. code-block:: console
542 java -jar bgp-bmp-mock-*-executable.jar
545 with optional input parameters:
547 .. code-block:: console
549 --local_address <address> (optional, default 127.0.0.1)
550 The IPv4 address where BMP mock is bind to.
552 --remote_address <address:port> (optional, default 127.0.0.1:12345)
553 The remote IPv4 Address and port number of BMP monitoring station.
555 --passive (optional, not present by default)
556 This flags enables passive mode for simulated routers.
558 --routers_count <0..N> (optional, default 1)
559 An amount of BMP routers to be connected to the BMP monitoring station.
561 --peers_count <0..N> (optional, default 0)
562 An amount of peers reported by each BMP router.
564 --pre_policy_routes <0..N> (optional, default 0)
565 An amount of "pre-policy" simple IPv4 routes reported by each peer.
567 --post_policy_routes <0..N> (optional, default 0)
568 An amount of "post-policy" simple IPv4 routes reported by each peer.
570 --log_level <FATAL|ERROR|INFO|DEBUG|TRACE> (optional, default INFO)
571 Set logging level for BMP mock.
575 This section offers advices in a case OpenDaylight BMP plugin is not working as expected.
577 .. contents:: Contents
581 BMP is not working...
582 ^^^^^^^^^^^^^^^^^^^^^
583 * First of all, ensure that all required features are installed, local monitoring station and monitored router/peers configuration is correct.
585 To list all installed features in OpenDaylight use the following command at the Karaf console:
587 .. code-block:: console
591 * Check OpenDaylight Karaf logs:
595 .. code-block:: console
599 or open log file: ``data/log/karaf.log``
601 Possibly, a reason/hint for a cause of the problem can be found there.
603 * Try to minimize effect of other OpenDaylight features, when searching for a reason of the problem.
605 * Try to set DEBUG severity level for BMP logger via Karaf console commands, in order to collect more information:
607 .. code-block:: console
609 log:set DEBUG org.opendaylight.protocol.bmp
613 Before you report a bug, check `BGPCEP Bugzilla <https://bugs.opendaylight.org/buglist.cgi?list_id=65849&product=bgpcep&resolution=--->`_ to ensure same/similar bug is not already filed there.
615 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
617 #. State OpenDaylight version
619 #. Describe your use-case and provide as much details related to BMP as possible
621 #. Steps to reproduce
623 #. Attach Karaf log files, optionally packet captures, REST input/output