Merge "ODL BGP LS PCEP release notes"
[docs.git] / docs / user-guide / bgp-monitoring-protocol-user-guide.rst
1 .. _bgp-monitoring-protocol-user-guide:
2 BGP Monitoring Protocol User Guide
3 ==================================
4 This guide contains information on how to use the OpenDaylight BGP Monitoring Protocol (BMP) plugin.
5 It covers BMP basic concepts, supported capabilities, configuration and operations.
6
7 .. contents:: Contents
8    :depth: 1
9    :local:
10
11 Overview
12 --------
13 This section provides high-level overview of the BMP plugin, OpenDaylight implementation and BMP usage for SDN.
14
15 .. contents:: Contents
16    :depth: 2
17    :local:
18
19 BGP Monitoring Protocol
20 ^^^^^^^^^^^^^^^^^^^^^^^
21 The BGP Monitoring Protocol (BMP) serves to monitor BGP sessions.
22 The BMP can be used to obtain route view instead of screen scraping.
23 The BMP provides access to unprocessed routing information (Adj-RIB-In) and processed routes (applied inbound policy) of monitored router's peer.
24 In addition, monitored router can provide periodic dump of statistics.
25
26 The BMP runs over TCP.
27 Both monitored router and monitoring station can be configured as active or passive party of the connection.
28 The passive party listens at particular port.
29 The router can be monitored by multiple monitoring stations.
30 BMP messages are sent by monitored router only, monitoring station supposed to collect and process data received over BMP.
31
32 .. figure:: ./images/bgpcep/bmp.png
33    :align: center
34    :alt: BMP
35
36    The BMP overview - Monitoring Station, Monitored Router and Monitored Peers.
37
38
39 BMP in SDN
40 ^^^^^^^^^^
41 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
43 Moreover, BMP provides provides peer RIBs visibility, without need to establish BGP sessions.
44 Unprocessed routes may serve as a source of information for software-driven routing optimization.
45 In this case, SDN controller, a BMP monitoring station, collects routing information from monitored routers.
46 The routes are used in subsequent optimization procedures.
47
48
49 OpenDaylight BMP plugin
50 ^^^^^^^^^^^^^^^^^^^^^^^
51 The OpenDaylight BMP plugin provides monitoring station implementation.
52 The plugin can establish BMP session with one or more monitored routers in order to collect routing and statistical information.
53
54 * Runtime configurable monitoring station
55 * Read-only routes and statistics view
56 * Supports various routing information types
57
58 .. figure:: ./images/bgpcep/bmp-plugin.png
59    :align: center
60    :alt: BMP plugin
61
62    OpenDaylight BMP plugin overview.
63
64 .. important:: The BMP plugin is not storing historical data, it provides current snapshot only.
65
66 List of supported capabilities
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 The BMP plugin implementation is based on Internet standards:
69
70 * `RFC7854 <https://tools.ietf.org/html/rfc7854>`_ - BGP Monitoring Protocol (BMP)
71
72 .. note:: The BMP plugin is capable to process various types of routing information (IP Unicast, EVPN, L3VPN, Link-State,...).
73    Please, see complete list in BGP user guide.
74
75 Running BMP
76 -----------
77 This section explains how to install BMP plugin.
78
79 1. Install BMP feature - ``odl-bgpcep-bmp``.
80    Also, for sake of this sample, it is required to install RESTCONF.
81    In the Karaf console, type command:
82
83    .. code-block:: console
84
85       feature:install odl-restconf odl-bgpcep-bmp
86
87 2. The BMP plugin contains a default configuration, which is applied after the feature starts up.
88    One instance of BMP monitoring station is created (named *example-bmp-monitor*), and its presence can be verified via REST:
89
90    **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor``
91
92    **Method:** ``GET``
93
94    **Response Body:**
95
96    .. code-block:: xml
97
98       <monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
99           <monitor-id>example-bmp-monitor</monitor-id>
100       </monitor>
101
102 BMP Monitoring Station
103 ----------------------
104 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
106 The monitoring station is responsible for received BMP PDUs processing and storage.
107 The default BMP server is listening at port *12345*.
108
109 .. contents:: Contents
110    :depth: 2
111    :local:
112
113 Configuration
114 ^^^^^^^^^^^^^
115 This section shows the way to configure the BMP monitoring station via REST API.
116
117 .. warning:: The BMP monitoring station configuration is going to be changed in Carbon.
118    This user-guide will be updated accordingly.
119
120 Monitoring station configuration
121 ''''''''''''''''''''''''''''''''
122 In order to change default's BMP monitoring station configuration, use following request.
123 It is required to install ``odl-netconf-connector-ssh`` feature first.
124
125 **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``
126
127 **Method:** ``PUT``
128
129 **Content-Type:** ``application/xml``
130
131 **Request Body:**
132
133 .. code-block:: xml
134    :linenos:
135    :emphasize-lines: 4,5
136
137     <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
138       <name>example-bmp-monitor</name>
139       <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
140       <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12355</binding-port>
141       <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
142       <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
143         <type>bmp-dispatcher</type>
144         <name>global-bmp-dispatcher</name>
145       </bmp-dispatcher>
146       <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
147         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
148         <name>runtime-mapping-singleton</name>
149       </codec-tree-factory>
150       <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
151         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
152         <name>global-rib-extensions</name>
153       </extensions>
154       <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
155         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
156         <name>pingpong-broker</name>
157       </dom-data-provider>
158     </module>
159
160 @line 4: **binding-port** - The BMP server listening port.
161
162 @line 5: **binding-address** - The BMP server biding address.
163
164 .. note:: User may create multiple BMP monitoring station instances at runtime.
165
166 Active mode configuration
167 '''''''''''''''''''''''''
168 In order to enable active connection, use following request.
169 It is required to install ``odl-netconf-connector-ssh`` feature first.
170
171 **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``
172
173 **Method:** ``PUT``
174
175 **Content-Type:** ``application/xml``
176
177 **Request Body:**
178
179 .. code-block:: xml
180    :linenos:
181    :emphasize-lines: 23,24,25
182
183     <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
184       <name>example-bmp-monitor</name>
185       <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
186       <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
187         <type>bmp-dispatcher</type>
188         <name>global-bmp-dispatcher</name>
189       </bmp-dispatcher>
190       <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
191         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
192         <name>runtime-mapping-singleton</name>
193       </codec-tree-factory>
194       <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
195         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
196         <name>global-rib-extensions</name>
197       </extensions>
198       <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
199           <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
200         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
201         <name>pingpong-broker</name>
202       </dom-data-provider>
203       <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12345</binding-port>
204       <monitored-router xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
205         <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">10.10.10.10</address>
206         <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">1234</port>
207         <active xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">true</active>
208       </monitored-router>
209     </module>
210
211 @line 23: **address** - The monitored router's IP address.
212
213 @line 24: **port** - The monitored router's port.
214
215 @line 25: **active** - Active mode set.
216
217 .. note:: User may configure active session establishment for multiple monitored routers.
218
219 MD5 authentication configuration
220 ''''''''''''''''''''''''''''''''
221 In order to enable active connection, use following request.
222 It is required to install ``odl-netconf-connector-ssh`` feature first.
223
224 **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``
225
226 **Method:** ``PUT``
227
228 **Content-Type:** ``application/xml``
229
230 **Request Body:**
231
232 .. code-block:: xml
233    :linenos:
234    :emphasize-lines: 23,24
235
236     <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
237       <name>example-bmp-monitor</name>
238       <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
239       <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
240         <type>bmp-dispatcher</type>
241         <name>global-bmp-dispatcher</name>
242       </bmp-dispatcher>
243       <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
244         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
245         <name>runtime-mapping-singleton</name>
246       </codec-tree-factory>
247       <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
248         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
249         <name>global-rib-extensions</name>
250       </extensions>
251       <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
252           <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
253         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
254         <name>pingpong-broker</name>
255       </dom-data-provider>
256       <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12345</binding-port>
257       <monitored-router xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
258         <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">11.11.11.11</address>
259         <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">topsecret</password>
260       </monitored-router>
261     </module>
262
263 @line 23: **address** - The monitored router's IP address.
264
265 @line 24: **password** - The TCP MD5 signature.
266
267 Collector DB Tree
268 ^^^^^^^^^^^^^^^^^
269
270 .. code-block:: console
271
272    module: bmp-monitor
273       +--rw bmp-monitor
274          +--ro monitor* [monitor-id]
275             +--ro monitor-id    monitor-id
276             +--ro router* [router-id]
277                +--ro name?          string
278                +--ro description?   string
279                +--ro info?          string
280                +--ro router-id      router-id
281                +--ro status?        status
282                +--ro peer* [peer-id]
283                   +--ro peer-id                 rib:peer-id
284                   +--ro type                    peer-type
285                   x--ro distinguisher
286                   |  +--ro distinguisher-type?   distinguisher-type
287                   |  +--ro distinguisher?        string
288                   +--ro peer-distinguisher?     union
289                   +--ro address                 inet:ip-address
290                   +--ro as                      inet:as-number
291                   +--ro bgp-id                  inet:ipv4-address
292                   +--ro router-distinguisher?   string
293                   +--ro peer-session
294                   |  +--ro local-address      inet:ip-address
295                   |  +--ro local-port         inet:port-number
296                   |  +--ro remote-port        inet:port-number
297                   |  +--ro sent-open
298                   |  |  +--ro version?          protocol-version
299                   |  |  +--ro my-as-number?     uint16
300                   |  |  +--ro hold-timer        uint16
301                   |  |  +--ro bgp-identifier    inet:ipv4-address
302                   |  |  +--ro bgp-parameters*
303                   |  |     +--ro optional-capabilities*
304                   |  |        +--ro c-parameters
305                   |  |           +--ro as4-bytes-capability
306                   |  |           |  +--ro as-number?   inet:as-number
307                   |  |           +--ro bgp-extended-message-capability!
308                   |  |           +--ro multiprotocol-capability
309                   |  |           |  +--ro afi?    identityref
310                   |  |           |  +--ro safi?   identityref
311                   |  |           +--ro graceful-restart-capability
312                   |  |           |  +--ro restart-flags    bits
313                   |  |           |  +--ro restart-time     uint16
314                   |  |           |  +--ro tables* [afi safi]
315                   |  |           |     +--ro afi          identityref
316                   |  |           |     +--ro safi         identityref
317                   |  |           |     +--ro afi-flags    bits
318                   |  |           +--ro add-path-capability
319                   |  |           |  +--ro address-families*
320                   |  |           |     +--ro afi?            identityref
321                   |  |           |     +--ro safi?           identityref
322                   |  |           |     +--ro send-receive?   send-receive
323                   |  |           +--ro route-refresh-capability!
324                   |  +--ro received-open
325                   |  |  +--ro version?          protocol-version
326                   |  |  +--ro my-as-number?     uint16
327                   |  |  +--ro hold-timer        uint16
328                   |  |  +--ro bgp-identifier    inet:ipv4-address
329                   |  |  +--ro bgp-parameters*
330                   |  |     +--ro optional-capabilities*
331                   |  |        +--ro c-parameters
332                   |  |           +--ro as4-bytes-capability
333                   |  |           |  +--ro as-number?   inet:as-number
334                   |  |           +--ro bgp-extended-message-capability!
335                   |  |           +--ro multiprotocol-capability
336                   |  |           |  +--ro afi?    identityref
337                   |  |           |  +--ro safi?   identityref
338                   |  |           +--ro graceful-restart-capability
339                   |  |           |  +--ro restart-flags    bits
340                   |  |           |  +--ro restart-time     uint16
341                   |  |           |  +--ro tables* [afi safi]
342                   |  |           |     +--ro afi          identityref
343                   |  |           |     +--ro safi         identityref
344                   |  |           |     +--ro afi-flags    bits
345                   |  |           +--ro add-path-capability
346                   |  |           |  +--ro address-families*
347                   |  |           |     +--ro afi?            identityref
348                   |  |           |     +--ro safi?           identityref
349                   |  |           |     +--ro send-receive?   send-receive
350                   |  |           +--ro route-refresh-capability!
351                   |  +--ro information
352                   |  |  +--ro string-information*
353                   |  |     +--ro string-tlv
354                   |  |        +--ro string-info?   string
355                   |  +--ro status?            status
356                   |  +--ro timestamp-sec?     yang:timestamp
357                   |  +--ro timestamp-micro?   yang:timestamp
358                   +--ro stats
359                   |  +--ro rejected-prefixes?                 yang:counter32
360                   |  +--ro duplicate-prefix-advertisements?   yang:counter32
361                   |  +--ro duplicate-withdraws?               yang:counter32
362                   |  +--ro invalidated-cluster-list-loop?     yang:counter32
363                   |  +--ro invalidated-as-path-loop?          yang:counter32
364                   |  +--ro invalidated-originator-id?         yang:counter32
365                   |  +--ro invalidated-as-confed-loop?        yang:counter32
366                   |  +--ro adj-ribs-in-routes?                yang:gauge64
367                   |  +--ro loc-rib-routes?                    yang:gauge64
368                   |  +--ro per-afi-safi-adj-rib-in-routes
369                   |  |  +--ro afi-safi* [afi safi]
370                   |  |     +--ro afi      identityref
371                   |  |     +--ro safi     identityref
372                   |  |     +--ro count?   yang:gauge64
373                   |  +--ro per-afi-safi-loc-rib-routes
374                   |  |  +--ro afi-safi* [afi safi]
375                   |  |     +--ro afi      identityref
376                   |  |     +--ro safi     identityref
377                   |  |     +--ro count?   yang:gauge64
378                   |  +--ro updates-treated-as-withdraw?       yang:counter32
379                   |  +--ro prefixes-treated-as-withdraw?      yang:counter32
380                   |  +--ro duplicate-updates?                 yang:counter32
381                   |  +--ro timestamp-sec?                     yang:timestamp
382                   |  +--ro timestamp-micro?                   yang:timestamp
383                   +--ro pre-policy-rib
384                   |  +--ro tables* [afi safi]
385                   |     +--ro afi           identityref
386                   |     +--ro safi          identityref
387                   |     +--ro attributes
388                   |     |  +--ro uptodate?   boolean
389                   |     +--ro (routes)?
390                   +--ro post-policy-rib
391                   |  +--ro tables* [afi safi]
392                   |     +--ro afi           identityref
393                   |     +--ro safi          identityref
394                   |     +--ro attributes
395                   |     |  +--ro uptodate?   boolean
396                   |     +--ro (routes)?
397                   +--ro mirrors
398                      +--ro information?       bmp-msg:mirror-information-code
399                      +--ro timestamp-sec?     yang:timestamp
400                      +--ro timestamp-micro?   yang:timestamp
401
402
403 Operations
404 ^^^^^^^^^^
405 The BMP plugin offers view of collected routes and statistical information from monitored peers.
406 To get top-level view of monitoring station:
407
408 **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor``
409
410 **Method:** ``GET``
411
412 **Response Body:**
413
414 .. code-block:: xml
415    :linenos:
416    :emphasize-lines: 3,5,11,12,13,14,15,17,20,21,22,27,33,50,53
417
418    <bmp-monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
419       <monitor>
420          <monitor-id>example-bmp-monitor</monitor-id>
421             <router>
422                <router-id>10.10.10.10</router-id>
423                <name>name</name>
424                <description>monitored-router</description>
425                <info>monitored router;</info>
426                <status>up</status>
427                <peer>
428                    <peer-id>20.20.20.20</peer-id>
429                    <address>20.20.20.20</address>
430                    <bgp-id>20.20.20.20</bgp-id>
431                    <as>65000</as>
432                    <type>global</type>
433                    <peer-session>
434                      <remote-port>1790</remote-port>
435                      <timestamp-sec>0</timestamp-sec>
436                      <status>up</status>
437                      <local-address>10.10.10.10</local-address>
438                      <local-port>2200</local-port>
439                      <received-open>
440                         <hold-timer>180</hold-timer>
441                         <my-as-number>65000</my-as-number>
442                         <bgp-identifier>20.20.20.20</bgp-identifier>
443                      </received-open>
444                      <sent-open>
445                         <hold-timer>180</hold-timer>
446                         <my-as-number>65000</my-as-number>
447                         <bgp-identifier>65000</bgp-identifier>
448                      </sent-open>
449                    </peer-session>
450                    <pre-policy-rib>
451                      <tables>
452                         <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
453                         <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
454                         <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
455                            <ipv4-route>
456                               <prefix>10.10.10.0/24</prefix>
457                               <attributes>
458                               ...
459                               </attributes>
460                            </ipv4-route>
461                         </ipv4-routes>
462                         <attributes>
463                            <uptodate>true</uptodate>
464                         </attributes>
465                      </tables>
466                    </pre-policy-rib>
467                    <post-policy-rib>
468                      ...
469                    </post-policy-rib>
470                    <stats>
471                      <timestamp-sec>0</timestamp-sec>
472                      <invalidated-cluster-list-loop>0</invalidated-cluster-list-loop>
473                      <duplicate-prefix-advertisements>0</duplicate-prefix-advertisements>
474                      <loc-rib-routes>100</loc-rib-routes>
475                      <duplicate-withdraws>0</duplicate-withdraws>
476                      <invalidated-as-confed-loop>0</invalidated-as-confed-loop>
477                      <adj-ribs-in-routes>10</adj-ribs-in-routes>
478                      <invalidated-as-path-loop>0</invalidated-as-path-loop>
479                      <invalidated-originator-id>0</invalidated-originator-id>
480                      <rejected-prefixes>8</rejected-prefixes>
481                   </stats>
482                </peer>
483          </router>
484       </monitor>
485    </bmp-monitor>
486
487 @line 3: **monitor-id** - The BMP monitoring station instance identifier.
488
489 @line 5: **router-id** - The monitored router IP address, serves as an identifier.
490
491 @line 11: **peer-id** - The monitored peer's BGP identifier, serves a an identifier.
492
493 @line 12: **address** - The IP address of the peer, associated with the TCP session.
494
495 @line 13: **bgp-id** - The BGP Identifier of the peer.
496
497 @line 14: **as** - The Autonomous System number of the peer.
498
499 @line 15: **type** - Identifies type of the peer - *Global Instance*, *RD Instance* or *Local Instance*
500
501 @line 17: **remote-port** - The peer's port number associated with TCP session.
502
503 @line 20: **local-address** - The IP address of the monitored router associated with the peering TCP session.
504
505 @line 21: **local-port** - The port number of the monitored router associated with the peering TCP session.
506
507 @line 22: **received-open** - The full OPEN message received by monitored router from the peer.
508
509 @line 27: **sent-open** - The full OPEN message send by monitored router to the peer.
510
511 @line 33: **pre-policy-rib** - The Adj-RIB-In that contains unprocessed routing information.
512
513 @line 50: **post-policy-rib** - The Post-Policy Ad-RIB-In that contains routes filtered by inbound policy.
514
515 @line 53: **stats** - Contains various statistics, periodically updated by the router.
516
517 -----
518
519 * To view collected information from particular monitored router:
520       **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor/router/10.10.10.10``
521
522 * To view collected information from particular monitored peer:
523       **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor/router/10.10.10.10/peer/20.20.20.20``
524
525 Test tools
526 ----------
527 BMP test tool serves to test basic BMP functionality, scalability and performance.
528
529 BMP mock
530 ^^^^^^^^
531 The BMP mock is a stand-alone Java application purposed to simulate a BMP-enabled router(s) and peers.
532 The simulator is capable to report dummy routes and statistics.
533 This application is not part of the OpenDaylight Karaf distribution, however it can be downloaded from OpenDaylight's Nexus (use latest release version):
534
535 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/bgp-bmp-mock``
536
537 Usage
538 '''''
539 The application can be run from command line:
540
541 .. code-block:: console
542
543    java -jar bgp-bmp-mock-*-executable.jar
544
545
546 with optional input parameters:
547
548 .. code-block:: console
549
550    --local_address <address> (optional, default 127.0.0.1)
551       The IPv4 address where BMP mock is bind to.
552
553    --remote_address <address:port> (optional, default 127.0.0.1:12345)
554       The remote IPv4 Address and port number of BMP monitoring station.
555
556    --passive (optional, not present by default)
557       This flags enables passive mode for simulated routers.
558
559    --routers_count <0..N> (optional, default 1)
560        An amount of BMP routers to be connected to the BMP monitoring station.
561
562    --peers_count <0..N> (optional, default 0)
563       An amount of peers reported by each BMP router.
564
565    --pre_policy_routes <0..N> (optional, default 0)
566       An amount of "pre-policy" simple IPv4 routes reported by each peer.
567
568    --post_policy_routes <0..N> (optional, default 0)
569       An amount of "post-policy" simple IPv4 routes reported by each peer.
570
571    --log_level <FATAL|ERROR|INFO|DEBUG|TRACE> (optional, default INFO)
572       Set logging level for BMP mock.
573
574 Troubleshooting
575 ---------------
576 This section offers advices in a case OpenDaylight BMP plugin is not working as expected.
577
578 .. contents:: Contents
579    :depth: 2
580    :local:
581
582 BMP is not working...
583 ^^^^^^^^^^^^^^^^^^^^^
584 * First of all, ensure that all required features are installed, local monitoring station and monitored router/peers configuration is correct.
585
586   To list all installed features in OpenDaylight use the following command at the Karaf console:
587
588   .. code-block:: console
589
590      feature:list -i
591
592 * Check OpenDaylight Karaf logs:
593
594   From Karaf console:
595
596   .. code-block:: console
597
598      log:tail
599
600   or open log file: ``data/log/karaf.log``
601
602   Possibly, a reason/hint for a cause of the problem can be found there.
603
604 * Try to minimize effect of other OpenDaylight features, when searching for a reason of the problem.
605
606 * Try to set DEBUG severity level for BMP logger via Karaf console commands, in order to collect more information:
607
608   .. code-block:: console
609
610      log:set DEBUG org.opendaylight.protocol.bmp
611
612 Bug reporting
613 ^^^^^^^^^^^^^
614 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
616 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
617
618 #. State OpenDaylight version
619
620 #. Describe your use-case and provide as much details related to BMP as possible
621
622 #. Steps to reproduce
623
624 #. Attach Karaf log files, optionally packet captures, REST input/output