BMP Monitoring Station

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.

The monitoring station is responsible for received BMP PDUs processing and storage. The default BMP server is listening at port 12345.

Configuration

This section shows the way to configure the BMP monitoring station via REST API.

Monitoring station configuration

In order to change default’s BMP monitoring station configuration, use following request.

URL: /rests/data/odl-bmp-monitor-config:odl-bmp-monitors/bmp-monitor-config/example-bmp-monitor

Method: PUT

Content-Type: application/xml

Request Body:

1<bmp-monitor-config xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor-config">
2   <monitor-id>example-bmp-monitor</monitor-id>
3   <server>
4      <binding-port>12345</binding-port>
5      <binding-address>0.0.0.0</binding-address>
6   </server>
7</bmp-monitor-config>

@line 4: binding-port - The BMP server listening port.

@line 5: binding-address - The BMP server biding address.

Note

User may create multiple BMP monitoring station instances at runtime.

Active mode configuration

In order to enable active connection, use following request.

URL: /rests/data/odl-bmp-monitor-config:odl-bmp-monitors/bmp-monitor-config/example-bmp-monitor

Method: PUT

Content-Type: application/xml

Request Body:

 1<bmp-monitor-config xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor-config">
 2   <monitor-id>example-bmp-monitor</monitor-id>
 3   <server>
 4      <binding-port>12345</binding-port>
 5      <binding-address>0.0.0.0</binding-address>
 6   </server>
 7   <monitored-router>
 8      <address>192.0.2.2</address>
 9      <port>1234</port>
10      <active>true</active>
11   </monitored-router>
12</bmp-monitor-config>

@line 8: address - The monitored router’s IP address.

@line 9: port - The monitored router’s port.

@line 10: active - Active mode set.

Note

User may configure active session establishment for multiple monitored routers.

MD5 authentication configuration

In order to enable active connection, use following request.

URL: /rests/data/odl-bmp-monitor-config:odl-bmp-monitors/bmp-monitor-config/example-bmp-monitor

Method: PUT

Content-Type: application/xml

Request Body:

 1<bmp-monitor-config xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor-config">
 2   <monitor-id>example-bmp-monitor</monitor-id>
 3   <server>
 4      <binding-port>12345</binding-port>
 5      <binding-address>0.0.0.0</binding-address>
 6   </server>
 7   <monitored-router>
 8      <address>192.0.2.2</address>
 9      <password>changeme</password>
10   </monitored-router>
11</bmp-monitor-config>

@line 8: address - The monitored router’s IP address.

@line 9: password - The TCP MD5 signature.

BMP Monitors Configuration Loader

BMP Monitors Configuration Loader allows user to define static initial configuration for a BMP protocol instance. This service will detect the creation of new configuration files following the pattern odl-bmp-monitors-*.xml under the path etc/opendaylight/bgpcep. Once the file is processed, the defined configuration will be available from the configuration Data Store.

Note

If the BMP Monitor instance is already present, no update or configuration will be applied.

PATH: etc/opendaylight/bgpcep/odl-bmp-monitors-config.xml

<odl-bmp-monitors xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor-config">
    <bmp-monitor-config>
        <monitor-id>example-bmp-monitor</monitor-id>
        <server>
            <binding-port>12345</binding-port>
            <binding-address>0.0.0.0</binding-address>
        </server>
    </bmp-monitor-config>
</odl-bmp-monitors>

BMP Monitor Configuration Example

BGP provides a feature providing a BMP Monitor configuration file example. Once feature is installed defined configuration will be loaded and setup.

feature:install odl-bgpcep-bmp-config-example

Collector DB Tree

module: bmp-monitor
   +--rw bmp-monitor
      +--ro monitor* [monitor-id]
         +--ro monitor-id    monitor-id
         +--ro router* [router-id]
            +--ro name?          string
            +--ro description?   string
            +--ro info?          string
            +--ro router-id      router-id
            +--ro status?        status
            +--ro peer* [peer-id]
               +--ro peer-id                 rib:peer-id
               +--ro type                    peer-type
               x--ro distinguisher
               |  +--ro distinguisher-type?   distinguisher-type
               |  +--ro distinguisher?        string
               +--ro peer-distinguisher?     union
               +--ro address                 inet:ip-address
               +--ro as                      inet:as-number
               +--ro bgp-id                  inet:ipv4-address
               +--ro router-distinguisher?   string
               +--ro peer-session
               |  +--ro local-address      inet:ip-address
               |  +--ro local-port         inet:port-number
               |  +--ro remote-port        inet:port-number
               |  +--ro sent-open
               |  |  +--ro version?          protocol-version
               |  |  +--ro my-as-number?     uint16
               |  |  +--ro hold-timer        uint16
               |  |  +--ro bgp-identifier    inet:ipv4-address
               |  |  +--ro bgp-parameters*
               |  |     +--ro optional-capabilities*
               |  |        +--ro c-parameters
               |  |           +--ro as4-bytes-capability
               |  |           |  +--ro as-number?   inet:as-number
               |  |           +--ro bgp-extended-message-capability!
               |  |           +--ro multiprotocol-capability
               |  |           |  +--ro afi?    identityref
               |  |           |  +--ro safi?   identityref
               |  |           +--ro graceful-restart-capability
               |  |           |  +--ro restart-flags    bits
               |  |           |  +--ro restart-time     uint16
               |  |           |  +--ro tables* [afi safi]
               |  |           |     +--ro afi          identityref
               |  |           |     +--ro safi         identityref
               |  |           |     +--ro afi-flags    bits
               |  |           +--ro add-path-capability
               |  |           |  +--ro address-families*
               |  |           |     +--ro afi?            identityref
               |  |           |     +--ro safi?           identityref
               |  |           |     +--ro send-receive?   send-receive
               |  |           +--ro route-refresh-capability!
               |  +--ro received-open
               |  |  +--ro version?          protocol-version
               |  |  +--ro my-as-number?     uint16
               |  |  +--ro hold-timer        uint16
               |  |  +--ro bgp-identifier    inet:ipv4-address
               |  |  +--ro bgp-parameters*
               |  |     +--ro optional-capabilities*
               |  |        +--ro c-parameters
               |  |           +--ro as4-bytes-capability
               |  |           |  +--ro as-number?   inet:as-number
               |  |           +--ro bgp-extended-message-capability!
               |  |           +--ro multiprotocol-capability
               |  |           |  +--ro afi?    identityref
               |  |           |  +--ro safi?   identityref
               |  |           +--ro graceful-restart-capability
               |  |           |  +--ro restart-flags    bits
               |  |           |  +--ro restart-time     uint16
               |  |           |  +--ro tables* [afi safi]
               |  |           |     +--ro afi          identityref
               |  |           |     +--ro safi         identityref
               |  |           |     +--ro afi-flags    bits
               |  |           +--ro add-path-capability
               |  |           |  +--ro address-families*
               |  |           |     +--ro afi?            identityref
               |  |           |     +--ro safi?           identityref
               |  |           |     +--ro send-receive?   send-receive
               |  |           +--ro route-refresh-capability!
               |  +--ro information
               |  |  +--ro string-information*
               |  |     +--ro string-tlv
               |  |        +--ro string-info?   string
               |  +--ro status?            status
               |  +--ro timestamp-sec?     yang:timestamp
               |  +--ro timestamp-micro?   yang:timestamp
               +--ro stats
               |  +--ro rejected-prefixes?                 yang:counter32
               |  +--ro duplicate-prefix-advertisements?   yang:counter32
               |  +--ro duplicate-withdraws?               yang:counter32
               |  +--ro invalidated-cluster-list-loop?     yang:counter32
               |  +--ro invalidated-as-path-loop?          yang:counter32
               |  +--ro invalidated-originator-id?         yang:counter32
               |  +--ro invalidated-as-confed-loop?        yang:counter32
               |  +--ro adj-ribs-in-routes?                yang:gauge64
               |  +--ro loc-rib-routes?                    yang:gauge64
               |  +--ro per-afi-safi-adj-rib-in-routes
               |  |  +--ro afi-safi* [afi safi]
               |  |     +--ro afi      identityref
               |  |     +--ro safi     identityref
               |  |     +--ro count?   yang:gauge64
               |  +--ro per-afi-safi-loc-rib-routes
               |  |  +--ro afi-safi* [afi safi]
               |  |     +--ro afi      identityref
               |  |     +--ro safi     identityref
               |  |     +--ro count?   yang:gauge64
               |  +--ro updates-treated-as-withdraw?       yang:counter32
               |  +--ro prefixes-treated-as-withdraw?      yang:counter32
               |  +--ro duplicate-updates?                 yang:counter32
               |  +--ro timestamp-sec?                     yang:timestamp
               |  +--ro timestamp-micro?                   yang:timestamp
               +--ro pre-policy-rib
               |  +--ro tables* [afi safi]
               |     +--ro afi           identityref
               |     +--ro safi          identityref
               |     +--ro attributes
               |     |  +--ro uptodate?   boolean
               |     +--ro (routes)?
               +--ro post-policy-rib
               |  +--ro tables* [afi safi]
               |     +--ro afi           identityref
               |     +--ro safi          identityref
               |     +--ro attributes
               |     |  +--ro uptodate?   boolean
               |     +--ro (routes)?
               +--ro mirrors
                  +--ro information?       bmp-msg:mirror-information-code
                  +--ro timestamp-sec?     yang:timestamp
                  +--ro timestamp-micro?   yang:timestamp

Operations

The BMP plugin offers view of collected routes and statistical information from monitored peers. To get top-level view of monitoring station:

URL: /rests/data/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor?content=nonconfig

Method: GET

Response Body:

 1<bmp-monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
 2   <monitor>
 3      <monitor-id>example-bmp-monitor</monitor-id>
 4         <router>
 5            <router-id>10.10.10.10</router-id>
 6            <name>name</name>
 7            <description>monitored-router</description>
 8            <info>monitored router;</info>
 9            <status>up</status>
10            <peer>
11                <peer-id>20.20.20.20</peer-id>
12                <address>20.20.20.20</address>
13                <bgp-id>20.20.20.20</bgp-id>
14                <as>65000</as>
15                <type>global</type>
16                <peer-session>
17                  <remote-port>1790</remote-port>
18                  <timestamp-sec>0</timestamp-sec>
19                  <status>up</status>
20                  <local-address>10.10.10.10</local-address>
21                  <local-port>2200</local-port>
22                  <received-open>
23                     <hold-timer>180</hold-timer>
24                     <my-as-number>65000</my-as-number>
25                     <bgp-identifier>20.20.20.20</bgp-identifier>
26                  </received-open>
27                  <sent-open>
28                     <hold-timer>180</hold-timer>
29                     <my-as-number>65000</my-as-number>
30                     <bgp-identifier>65000</bgp-identifier>
31                  </sent-open>
32                </peer-session>
33                <pre-policy-rib>
34                  <tables>
35                     <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
36                     <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
37                     <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
38                        <ipv4-route>
39                           <prefix>10.10.10.0/24</prefix>
40                           <attributes>
41                           ...
42                           </attributes>
43                        </ipv4-route>
44                     </ipv4-routes>
45                     <attributes>
46                        <uptodate>true</uptodate>
47                     </attributes>
48                  </tables>
49                </pre-policy-rib>
50                <post-policy-rib>
51                  ...
52                </post-policy-rib>
53                <stats>
54                  <timestamp-sec>0</timestamp-sec>
55                  <invalidated-cluster-list-loop>0</invalidated-cluster-list-loop>
56                  <duplicate-prefix-advertisements>0</duplicate-prefix-advertisements>
57                  <loc-rib-routes>100</loc-rib-routes>
58                  <duplicate-withdraws>0</duplicate-withdraws>
59                  <invalidated-as-confed-loop>0</invalidated-as-confed-loop>
60                  <adj-ribs-in-routes>10</adj-ribs-in-routes>
61                  <invalidated-as-path-loop>0</invalidated-as-path-loop>
62                  <invalidated-originator-id>0</invalidated-originator-id>
63                  <rejected-prefixes>8</rejected-prefixes>
64               </stats>
65            </peer>
66      </router>
67   </monitor>
68</bmp-monitor>

@line 3: monitor-id - The BMP monitoring station instance identifier.

@line 5: router-id - The monitored router IP address, serves as an identifier.

@line 11: peer-id - The monitored peer’s BGP identifier, serves a an identifier.

@line 12: address - The IP address of the peer, associated with the TCP session.

@line 13: bgp-id - The BGP Identifier of the peer.

@line 14: as - The Autonomous System number of the peer.

@line 15: type - Identifies type of the peer - Global Instance, RD Instance or Local Instance

@line 17: remote-port - The peer’s port number associated with TCP session.

@line 20: local-address - The IP address of the monitored router associated with the peering TCP session.

@line 21: local-port - The port number of the monitored router associated with the peering TCP session.

@line 22: received-open - The full OPEN message received by monitored router from the peer.

@line 27: sent-open - The full OPEN message send by monitored router to the peer.

@line 33: pre-policy-rib - The Adj-RIB-In that contains unprocessed routing information.

@line 50: post-policy-rib - The Post-Policy Ad-RIB-In that contains routes filtered by inbound policy.

@line 53: stats - Contains various statistics, periodically updated by the router.


  • To view collected information from particular monitored router:

    URL: /rests/data/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor/router/10.10.10.10?content=nonconfig

  • To view collected information from particular monitored peer:

    URL: /rests/data/bmp-monitor:bmp-monitor/monitor/example-bmp-monitor/router/10.10.10.10/peer/20.20.20.20?content=nonconfig