Merge "Migrate ALTO user docs to rst"
[docs.git] / docs / user-guide / bgp-monitoring-protocol-user-guide.rst
1 BGP Monitoring Protocol User Guide
2 ==================================
3
4 Overview
5 --------
6
7 The OpenDaylight Karaf distribution comes preconfigured with baseline
8 BMP configuration.
9
10 -  **32-bmp.xml** (initial configuration for BMP messages handler
11    service provider and BMP client/server dispatcher settings)
12
13 -  **42-bmp-example.xml** (sample initial configuration for the BMP
14    Monitoring Station application)
15
16 Configuring BMP
17 ---------------
18
19 Server Binding
20 ~~~~~~~~~~~~~~
21
22 The default shipped configuration will start a BMP server on
23 0.0.0.0:12345.You can change this behavior in **42-bmp-example.xml**:
24
25 .. code:: xml
26
27      <module>
28       <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">prefix:bmp-monitor-impl</type>
29       <name>example-bmp-monitor</name>
30       <!--<binding-address>0.0.0.0</binding-address>-->
31       <binding-port>12345</binding-port>
32       ...
33      </module>
34
35 -  **binding-address** - adress on which BMP will be started and listen;
36    to change value, uncomment then line first
37
38 -  **binding-port** - port on which the address will be started and
39    listen
40
41 Multiple instances of the BMP monitoring station (**bmp-monitor-impl**
42 module) can be created. However, each instance must have a unique pair
43 of **binding-address** and **binding-port**
44
45 Active mode
46 ~~~~~~~~~~~
47
48 OpenDaylight’s BMP might be configured to act as an active party of the
49 connection (ODL BMP < = > Monitored router). To enable this
50 functionality, configure monitored-router with mandatory parameters:
51
52 -  address (must be unique for each configured "monitored-router"),
53
54 -  port,
55
56 -  active.
57
58 See following example from 42-bmp-example.xml:
59
60 .. code:: xml
61
62      <monitored-router>
63       <address>192.0.2.2</address>
64       <port>1234</port>
65       <active>true</active>
66      </monitored-router>
67
68 Configuration through RESTCONF
69 ------------------------------
70
71 Server Binding
72 ~~~~~~~~~~~~~~
73
74 **URL:**
75 *`http://<controllerIP>:8181/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 <http://<controllerIP>:8181/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>`__*
76
77 **Content-Type:** application/xml
78
79 **Method:** PUT
80
81 **Body:**
82
83 .. code:: xml
84
85     <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
86       <name>example-bmp-monitor</name>
87       <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
88       <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
89         <type>bmp-dispatcher</type>
90         <name>global-bmp-dispatcher</name>
91       </bmp-dispatcher>
92       <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
93         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
94         <name>runtime-mapping-singleton</name>
95       </codec-tree-factory>
96       <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
97         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
98         <name>global-rib-extensions</name>
99       </extensions>
100       <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
101       <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
102         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
103         <name>pingpong-broker</name>
104       </dom-data-provider>
105       <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12345</binding-port>
106     </module>
107
108 -  change values for **binding-address** and/or **binding-port**
109
110 Active mode
111 ~~~~~~~~~~~
112
113 **URL:**
114 *`http://<controllerIP>:8181/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 <http://<controllerIP>:8181/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>`__*
115
116 **Content-Type:** application/xml
117
118 **Method:** PUT
119
120 **Body:**
121
122 .. code:: xml
123
124     <module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
125       <name>example-bmp-monitor</name>
126       <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">x:bmp-monitor-impl</type>
127       <bmp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
128         <type>bmp-dispatcher</type>
129         <name>global-bmp-dispatcher</name>
130       </bmp-dispatcher>
131       <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
132         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
133         <name>runtime-mapping-singleton</name>
134       </codec-tree-factory>
135       <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
136         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
137         <name>global-rib-extensions</name>
138       </extensions>
139       <binding-address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">0.0.0.0</binding-address>
140           <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
141         <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
142         <name>pingpong-broker</name>
143       </dom-data-provider>
144       <binding-port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">12345</binding-port>
145       <monitored-router xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">
146         <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">127.0.0.1</address>
147         <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">1234</port>
148         <active xmlns="urn:opendaylight:params:xml:ns:yang:controller:bmp:impl">true</active>
149       </monitored-router>
150     </module>
151
152 -  change values for **address** and **port**
153