Fix release schedule headers
[docs.git] / docs / developer-guide / bgp-monitoring-protocol-developer-guide.rst
1 .. _bgp-monitoring-protocol-developer-guide:
2 BGP Monitoring Protocol Developer Guide
3 =======================================
4
5 Overview
6 --------
7
8 This section provides an overview of **feature odl-bgpcep-bmp**. This
9 feature will install everything needed for BMP (BGP Monitoring Protocol)
10 including establishing the connection, processing messages, storing
11 information about monitored routers, peers and their Adj-RIB-In
12 (unprocessed routing information) and Post-Policy Adj-RIB-In and
13 displaying data in BGP RIBs overview. The OpenDaylight BMP plugin plays
14 the role of a monitoring station.
15
16 Key APIs and Interfaces
17 -----------------------
18
19 Session handling
20 ~~~~~~~~~~~~~~~~
21
22 *32-bmp.xml* defines only bmp-dispatcher the parser should be using
23 (global-bmp-extensions).
24
25 .. code:: xml
26
27      <module>
28       <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">prefix:bmp-dispatcher-impl</type>
29       <name>global-bmp-dispatcher</name>
30        <bmp-extensions>
31         <type xmlns:bmp-spi="urn:opendaylight:params:xml:ns:yang:controller:bmp:spi">bmp-spi:extensions</type>
32         <name>global-bmp-extensions</name>
33        </bmp-extensions>
34        <boss-group>
35         <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
36         <name>global-boss-group</name>
37        </boss-group>
38        <worker-group>
39         <type xmlns:netty="urn:opendaylight:params:xml:ns:yang:controller:netty">netty:netty-threadgroup</type>
40         <name>global-worker-group</name>
41       </worker-group>
42      </module>
43
44 For user configuration of BMP, check User Guide.
45
46 Parser
47 ~~~~~~
48
49 The base BMP parser includes messages and attributes from
50 https://tools.ietf.org/html/draft-ietf-grow-bmp-15
51
52 Registration
53 ~~~~~~~~~~~~
54
55 All parsers and serializers need to be registered into *Extension
56 provider*. This *Extension provider* is configured in initial
57 configuration of the parser (*32-bmp.xml*).
58
59 .. code:: xml
60
61      <module>
62       <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bmp:spi">prefix:bmp-extensions-impl</type>
63       <name>global-bmp-extensions</name>
64       <extension>
65        <type xmlns:bmp-spi="urn:opendaylight:params:xml:ns:yang:controller:bmp:spi">bmp-spi:extension</type>
66        <name>bmp-parser-base</name>
67       </extension>
68      </module>
69
70 -  *bmp-parser-base* - will register parsers and serializers implemented
71    in bmp-impl module
72
73 Parsing
74 ~~~~~~~
75
76 Parsing of BMP elements is mostly done equally to BGP. Some of the BMP
77 messages includes wrapped BGP messages.
78
79 BMP Monitoring Station
80 ~~~~~~~~~~~~~~~~~~~~~~
81
82 The BMP application (Monitoring Station) serves as message processor
83 incoming from monitored routers. The processed message is transformed
84 and relevant information is stored. Route information is stored in a BGP
85 RIB data structure.
86
87 BMP data is displayed only through one URL that is accessible from the
88 base BMP URL:
89
90 *`http://<controllerIP>:8181/restconf/operational/bmp-monitor:bmp-monitor <http://<controllerIP>:8181/restconf/operational/bmp-monitor:bmp-monitor>`__*
91
92 Each Monitor station will be displayed and it may contains multiple
93 monitored routers and peers within:
94
95 .. code:: xml
96
97     <bmp-monitor xmlns="urn:opendaylight:params:xml:ns:yang:bmp-monitor">
98      <monitor>
99      <monitor-id>example-bmp-monitor</monitor-id>
100       <router>
101       <router-id>127.0.0.11</router-id>
102        <status>up</status>
103        <peer>
104         <peer-id>20.20.20.20</peer-id>
105         <as>72</as>
106         <type>global</type>
107         <peer-session>
108          <remote-port>5000</remote-port>
109          <timestamp-sec>5</timestamp-sec>
110          <status>up</status>
111          <local-address>10.10.10.10</local-address>
112          <local-port>220</local-port>
113         </peer-session>
114         <pre-policy-rib>
115          <tables>
116           <afi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:ipv4-address-family</afi>
117           <safi xmlns:x="urn:opendaylight:params:xml:ns:yang:bgp-types">x:unicast-subsequent-address-family</safi>
118           <ipv4-routes xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
119            <ipv4-route>
120             <prefix>10.10.10.0/24</prefix>
121              <attributes>
122               ...
123              </attributes>
124            </ipv4-route>
125           </ipv4-routes>
126           <attributes>
127            <uptodate>true</uptodate>
128           </attributes>
129          </tables>
130         </pre-policy-rib>
131         <address>10.10.10.10</address>
132         <post-policy-rib>
133          ...
134         </post-policy-rib>
135         <bgp-id>20.20.20.20</bgp-id>
136         <stats>
137          <timestamp-sec>5</timestamp-sec>
138          <invalidated-cluster-list-loop>53</invalidated-cluster-list-loop>
139          <duplicate-prefix-advertisements>16</duplicate-prefix-advertisements>
140          <loc-rib-routes>100</loc-rib-routes>
141          <duplicate-withdraws>11</duplicate-withdraws>
142          <invalidated-as-confed-loop>55</invalidated-as-confed-loop>
143          <adj-ribs-in-routes>10</adj-ribs-in-routes>
144          <invalidated-as-path-loop>66</invalidated-as-path-loop>
145          <invalidated-originator-id>70</invalidated-originator-id>
146          <rejected-prefixes>8</rejected-prefixes>
147         </stats>
148        </peer>
149        <name>name</name>
150        <description>description</description>
151        <info>some info;</info>
152       </router>
153      </monitor>
154     </bmp-monitor>
155     </source>
156
157 API Reference Documentation
158 ---------------------------
159
160 Javadocs are generated while creating mvn:site and they are located in
161 target/ directory in each module.
162