Merge "PCEP user guide reworked"
[docs.git] / docs / user-guide / bgp-monitoring-protocol-user-guide.rst
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.
5
6 .. contents:: Contents
7    :depth: 1
8    :local:
9
10 Overview
11 --------
12 This section provides high-level overview of the BMP plugin, OpenDaylight implementation and BMP usage for SDN.
13
14 .. contents:: Contents
15    :depth: 2
16    :local:
17
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.
24
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.
30
31 .. figure:: ./images/bgpcep/bmp.png
32    :align: center
33    :alt: BMP
34
35    The BMP overview - Monitoring Station, Monitored Router and Monitored Peers.
36
37
38 BMP in SDN
39 ^^^^^^^^^^
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.
41
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.
46
47
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.
52
53 * Runtime configurable monitoring station
54 * Read-only routes and statistics view
55 * Supports various routing information types
56
57 .. figure:: ./images/bgpcep/bmp-plugin.png
58    :align: center
59    :alt: BMP plugin
60
61    OpenDaylight BMP plugin overview.
62
63 .. important:: The BMP plugin is not storing historical data, it provides current snapshot only.
64
65 List of supported capabilities
66 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 The BMP plugin implementation is based on Internet standards:
68
69 * `RFC7854 <https://tools.ietf.org/html/rfc7854>`_ - BGP Monitoring Protocol (BMP)
70
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.
73
74 Running BMP
75 -----------
76 This section explains how to install BMP plugin.
77
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:
81
82    .. code-block:: console
83
84       feature:install odl-restconf odl-bgpcep-bmp
85
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:
88
89    **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor``
90
91    **Method:** ``GET``
92
93    **Response Body:**
94
95    .. code-block:: xml
96
97       <monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
98           <monitor-id>example-bmp-monitor</monitor-id>
99       </monitor>
100
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.
104
105 The monitoring station is responsible for received BMP PDUs processing and storage.
106 The default BMP server is listening at port *12345*.
107
108 .. contents:: Contents
109    :depth: 2
110    :local:
111
112 Configuration
113 ^^^^^^^^^^^^^
114 This section shows the way to configure the BMP monitoring station via REST API.
115
116 .. warning:: The BMP monitoring station configuration is going to be changed in Carbon.
117    This user-guide will be updated accordingly.
118
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.
123
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``
125
126 **Method:** ``PUT``
127
128 **Content-Type:** ``application/xml``
129
130 **Request Body:**
131
132 .. code-block:: xml
133    :linenos:
134    :emphasize-lines: 4,5
135
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>
144       </bmp-dispatcher>
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>
152       </extensions>
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>
156       </dom-data-provider>
157     </module>
158
159 @line 4: **binding-port** - The BMP server listening port.
160
161 @line 5: **binding-address** - The BMP server biding address.
162
163 .. note:: User may create multiple BMP monitoring station instances at runtime.
164
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.
169
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``
171
172 **Method:** ``PUT``
173
174 **Content-Type:** ``application/xml``
175
176 **Request Body:**
177
178 .. code-block:: xml
179    :linenos:
180    :emphasize-lines: 23,24,25
181
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>
188       </bmp-dispatcher>
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>
196       </extensions>
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>
201       </dom-data-provider>
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>
207       </monitored-router>
208     </module>
209
210 @line 23: **address** - The monitored router's IP address.
211
212 @line 24: **port** - The monitored router's port.
213
214 @line 25: **active** - Active mode set.
215
216 .. note:: User may configure active session establishment for multiple monitored routers.
217
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.
222
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``
224
225 **Method:** ``PUT``
226
227 **Content-Type:** ``application/xml``
228
229 **Request Body:**
230
231 .. code-block:: xml
232    :linenos:
233    :emphasize-lines: 23,24
234
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>
241       </bmp-dispatcher>
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>
249       </extensions>
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>
254       </dom-data-provider>
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>
259       </monitored-router>
260     </module>
261
262 @line 23: **address** - The monitored router's IP address.
263
264 @line 24: **password** - The TCP MD5 signature.
265
266 Collector DB Tree
267 ^^^^^^^^^^^^^^^^^
268
269 .. code-block:: console
270
271    module: bmp-monitor
272       +--rw bmp-monitor
273          +--ro monitor* [monitor-id]
274             +--ro monitor-id    monitor-id
275             +--ro router* [router-id]
276                +--ro name?          string
277                +--ro description?   string
278                +--ro info?          string
279                +--ro router-id      router-id
280                +--ro status?        status
281                +--ro peer* [peer-id]
282                   +--ro peer-id                 rib:peer-id
283                   +--ro type                    peer-type
284                   x--ro distinguisher
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
292                   +--ro peer-session
293                   |  +--ro local-address      inet:ip-address
294                   |  +--ro local-port         inet:port-number
295                   |  +--ro remote-port        inet:port-number
296                   |  +--ro sent-open
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!
350                   |  +--ro information
351                   |  |  +--ro string-information*
352                   |  |     +--ro string-tlv
353                   |  |        +--ro string-info?   string
354                   |  +--ro status?            status
355                   |  +--ro timestamp-sec?     yang:timestamp
356                   |  +--ro timestamp-micro?   yang:timestamp
357                   +--ro stats
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
382                   +--ro pre-policy-rib
383                   |  +--ro tables* [afi safi]
384                   |     +--ro afi           identityref
385                   |     +--ro safi          identityref
386                   |     +--ro attributes
387                   |     |  +--ro uptodate?   boolean
388                   |     +--ro (routes)?
389                   +--ro post-policy-rib
390                   |  +--ro tables* [afi safi]
391                   |     +--ro afi           identityref
392                   |     +--ro safi          identityref
393                   |     +--ro attributes
394                   |     |  +--ro uptodate?   boolean
395                   |     +--ro (routes)?
396                   +--ro mirrors
397                      +--ro information?       bmp-msg:mirror-information-code
398                      +--ro timestamp-sec?     yang:timestamp
399                      +--ro timestamp-micro?   yang:timestamp
400
401
402 Operations
403 ^^^^^^^^^^
404 The BMP plugin offers view of collected routes and statistical information from monitored peers.
405 To get top-level view of monitoring station:
406
407 **URL:** ``/restconf/operational/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor``
408
409 **Method:** ``GET``
410
411 **Response Body:**
412
413 .. code-block:: xml
414    :linenos:
415    :emphasize-lines: 3,5,11,12,13,14,15,17,20,21,22,27,33,50,53
416
417    <bmp-monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
418       <monitor>
419          <monitor-id>example-bmp-monitor</monitor-id>
420             <router>
421                <router-id>10.10.10.10</router-id>
422                <name>name</name>
423                <description>monitored-router</description>
424                <info>monitored router;</info>
425                <status>up</status>
426                <peer>
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>
430                    <as>65000</as>
431                    <type>global</type>
432                    <peer-session>
433                      <remote-port>1790</remote-port>
434                      <timestamp-sec>0</timestamp-sec>
435                      <status>up</status>
436                      <local-address>10.10.10.10</local-address>
437                      <local-port>2200</local-port>
438                      <received-open>
439                         <hold-timer>180</hold-timer>
440                         <my-as-number>65000</my-as-number>
441                         <bgp-identifier>20.20.20.20</bgp-identifier>
442                      </received-open>
443                      <sent-open>
444                         <hold-timer>180</hold-timer>
445                         <my-as-number>65000</my-as-number>
446                         <bgp-identifier>65000</bgp-identifier>
447                      </sent-open>
448                    </peer-session>
449                    <pre-policy-rib>
450                      <tables>
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">
454                            <ipv4-route>
455                               <prefix>10.10.10.0/24</prefix>
456                               <attributes>
457                               ...
458                               </attributes>
459                            </ipv4-route>
460                         </ipv4-routes>
461                         <attributes>
462                            <uptodate>true</uptodate>
463                         </attributes>
464                      </tables>
465                    </pre-policy-rib>
466                    <post-policy-rib>
467                      ...
468                    </post-policy-rib>
469                    <stats>
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>
480                   </stats>
481                </peer>
482          </router>
483       </monitor>
484    </bmp-monitor>
485
486 @line 3: **monitor-id** - The BMP monitoring station instance identifier.
487
488 @line 5: **router-id** - The monitored router IP address, serves as an identifier.
489
490 @line 11: **peer-id** - The monitored peer's BGP identifier, serves a an identifier.
491
492 @line 12: **address** - The IP address of the peer, associated with the TCP session.
493
494 @line 13: **bgp-id** - The BGP Identifier of the peer.
495
496 @line 14: **as** - The Autonomous System number of the peer.
497
498 @line 15: **type** - Identifies type of the peer - *Global Instance*, *RD Instance* or *Local Instance*
499
500 @line 17: **remote-port** - The peer's port number associated with TCP session.
501
502 @line 20: **local-address** - The IP address of the monitored router associated with the peering TCP session.
503
504 @line 21: **local-port** - The port number of the monitored router associated with the peering TCP session.
505
506 @line 22: **received-open** - The full OPEN message received by monitored router from the peer.
507
508 @line 27: **sent-open** - The full OPEN message send by monitored router to the peer.
509
510 @line 33: **pre-policy-rib** - The Adj-RIB-In that contains unprocessed routing information.
511
512 @line 50: **post-policy-rib** - The Post-Policy Ad-RIB-In that contains routes filtered by inbound policy.
513
514 @line 53: **stats** - Contains various statistics, periodically updated by the router.
515
516 -----
517
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``
520
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``
523
524 Test tools
525 ----------
526 BMP test tool serves to test basic BMP functionality, scalability and performance.
527
528 BMP mock
529 ^^^^^^^^
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):
533
534 ``https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/bgpcep/bgp-bmp-mock``
535
536 Usage
537 '''''
538 The application can be run from command line:
539
540 .. code-block:: console
541
542    java -jar bgp-bmp-mock-*-executable.jar
543
544
545 with optional input parameters:
546
547 .. code-block:: console
548
549    --local_address <address> (optional, default 127.0.0.1)
550       The IPv4 address where BMP mock is bind to.
551
552    --remote_address <address:port> (optional, default 127.0.0.1:12345)
553       The remote IPv4 Address and port number of BMP monitoring station.
554
555    --passive (optional, not present by default)
556       This flags enables passive mode for simulated routers.
557
558    --routers_count <0..N> (optional, default 1)
559        An amount of BMP routers to be connected to the BMP monitoring station.
560
561    --peers_count <0..N> (optional, default 0)
562       An amount of peers reported by each BMP router.
563
564    --pre_policy_routes <0..N> (optional, default 0)
565       An amount of "pre-policy" simple IPv4 routes reported by each peer.
566
567    --post_policy_routes <0..N> (optional, default 0)
568       An amount of "post-policy" simple IPv4 routes reported by each peer.
569
570    --log_level <FATAL|ERROR|INFO|DEBUG|TRACE> (optional, default INFO)
571       Set logging level for BMP mock.
572
573 Troubleshooting
574 ---------------
575 This section offers advices in a case OpenDaylight BMP plugin is not working as expected.
576
577 .. contents:: Contents
578    :depth: 2
579    :local:
580
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.
584
585   To list all installed features in OpenDaylight use the following command at the Karaf console:
586
587   .. code-block:: console
588
589      feature:list -i
590
591 * Check OpenDaylight Karaf logs:
592
593   From Karaf console:
594
595   .. code-block:: console
596
597      log:tail
598
599   or open log file: ``data/log/karaf.log``
600
601   Possibly, a reason/hint for a cause of the problem can be found there.
602
603 * Try to minimize effect of other OpenDaylight features, when searching for a reason of the problem.
604
605 * Try to set DEBUG severity level for BMP logger via Karaf console commands, in order to collect more information:
606
607   .. code-block:: console
608
609      log:set DEBUG org.opendaylight.protocol.bmp
610
611 Bug reporting
612 ^^^^^^^^^^^^^
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.
614
615 Write an e-mail to bgpcep-users@lists.opendaylight.org and provide following information:
616
617 #. State OpenDaylight version
618
619 #. Describe your use-case and provide as much details related to BMP as possible
620
621 #. Steps to reproduce
622
623 #. Attach Karaf log files, optionally packet captures, REST input/output