Skip to content

Commit b6107b8

Browse files
committed
Initial docs.
1 parent 1bdce81 commit b6107b8

File tree

12 files changed

+469
-173
lines changed

12 files changed

+469
-173
lines changed

LICENSE

Lines changed: 37 additions & 170 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,119 @@
1-
openbmp
2-
=======
1+
Open BGP Monitoring Protocol (OpenBMP) Collector
2+
================================================
3+
4+
OpenBMP is an open source project that implements **draft-ietf-grow-bmp-07**. BMP protocol version 3 is defined in draft 07, while versions 1 and 2 are defined in the previous revisions of the draft.
5+
6+
JunOS 10.4 implements the older versions of BMP. Cisco IOS XE 3.12, IOS XR, and JunOS 13.3 implement version 3 (draft 07).
7+
8+
> **NOTE:**
9+
> Source and binary packages are pending internal review. The process should be completed by Aug 2014.
10+
> The binary packages as well as source should be available in Aug 2014.
11+
12+
13+
### Daemon
14+
OpenBMP daemon is a BMP receiver for devices that implement BMP, such as Cisco and Juniper routers. Collected BMP messages are decoded and stored in a SQL database.
15+
16+
> Raw dumps are on the roadmap
17+
18+
### UI
19+
OpenBMP UI is a Web-App UI that interacts with OpenBMP server/daemon. Multiple OpenBMP daemons can be centrally managed via the same UI.
20+
21+
### Database
22+
The SQL/transactional database is designed to be flexible for all types of reporting on the collected data by simply linking tables or by creating views.
23+
24+
The database is tuned to support high transactional rates and storage for millions of prefixes and other BGP information. OpenBMP statistics track how well the database is performing and will alert if there are any issues.
25+
26+
The OpenBMP daemon will automatically configure the database if the database does not exist, or if the UI instructs to recreate it. Schemas are less likely to change, but in the event they change, a migration script and instructions will be provided in the [installation](docs/INSTALL.md) notes to explain how to upgrade.
27+
28+
29+
OpenBMP Flow
30+
------------
31+
32+
![OpenBMP High Level Flow](docs/images/openbmp-highlevel-flow.png "OpenBMP High Level Flow")
33+
34+
1. BMP devices (e.g. routers) send BMP messages to a OpenBMP collector/daemon. One OpenBMP daemon can handle many routers and bgp peers, but in a large network with transit links and full internet routing tables, multiple OpenBMP daemons is recommended. Simply configure on the BMP device (router) which BMP server that should be used.
35+
2. Open Daylight (ODL) controller SQL plugin with SQL <-> Yang interfaces with the OpenBMP database. ODL in this fashion provides an abstract view of all OpenBMP data.
36+
3. Admins, Network Engineers, automated programs/scripts, etc. interact via ODL northbound interfaces to run various BMP analytics.
37+
4. Admins, Network Engineers, automated programs/scripts, etc. can also go direct to the BMP database as needed.
38+
39+
Supported Features
40+
------------------
41+
Below is a list of features supported today in OpenBMP. Many more features are on the roadmap, including BGP-LS (draft-ietf-idr-ls-distribution). See the **roadmap** for more details.
42+
43+
Feature | Description
44+
-------: | -----------
45+
draft-ietf-grow-bmp-07| BMP Version 3
46+
Database | Access to all collected data via standard ODBC/DB drivers
47+
IPv4 | IPv4 Unicast routing table information
48+
IPv6 | IPv6 Unicast routing table information
49+
VPNv4 | L3VPN routing information
50+
Prefix Log| Tracking of withdraws and updates by prefix, including path attributes
51+
Advanced Reporting| Built-in views for common reports, such as route tables, prefixes as paths, and route table history of changes
52+
53+
Use-Cases
54+
---------
55+
There are many reasons to use OpenBMP, but to highlight a few common ones:
56+
57+
* **Looking Glasses** - IPv4, IPv6, and VPN4
58+
59+
* **Route Analytics** - Track convergence times, history of prefixes as they change over time, monitor and track BGP policy changes, etc...
60+
61+
* **Traffic Engineering Analytics** - Adapt dynamically to change and know what is the best shift
62+
63+
* **BGP pre-policy What-Ifs** - Pre-policy routing information provides insight into all path attributes from various points in the network allowing nonintrusive what-if topology views for new policy validations
64+
65+
* *many more*
66+
67+
Installation and Configuration
68+
------------------------------
69+
See the [docs/INSTALL.md](docs/INSTALL.md) documentation for detailed information on how to install and configure OpenBMP daemon and UI.
70+
71+
The installation documentation provides step by step instructions for how to install and configure OpenBMP, including the database.
72+
73+
Instructions are for Ubuntu and CentOS/RHEL. Other Linux distributions should work, but instructions might vary.
74+
75+
76+
Using Open Daylight
77+
-------------------
78+
See the [docs/ODL.md](docs/ODL.md) documentation for detailed information on how to use Open Daylight with OpenBMP.
79+
80+
This includes details on how to setup ODL to use OpenBMP database(s).
81+
82+
83+
Interfacing with the Database
84+
-----------------------------
85+
See the [docs/DATABASE.md](docs/DATABASE.md) documentation for the database schema and how to interact with it.
86+
87+
88+
Change Log
89+
----------
90+
The [docs/CHANGELOG.md](docs/CHANGELOG.md) details changes by release.
91+
92+
93+
Road Map
94+
--------
95+
Below are a list of features/changes that are targetted in the next release:
96+
97+
### OpenBMP Daemon
98+
* Inbound message caching to offload socket buffers
99+
* New feature to allow saving raw BGP messages based on filters
100+
* Add Ubuntu and Redhat binary packages
101+
* Add OpenBMP statistic counters to database
102+
* Add TCP MD5SIG support for BMP sessions
103+
* Add configuration option to restrict BMP devices to ones provisioned
104+
* Add support for active BMP connections - OpenBMP makes connections to routers
105+
* Add postgres DB support
106+
* Verify and document MariaDB instead of using MySQL on Ubuntu and CentOS
107+
* Implement RFC5424 logging with configuration options to fine tune
108+
109+
### OpenBMP UI
110+
* Add configuration tuning/modification support
111+
* Add OpenBMP statistics
112+
* Add Router and Peering Summary report
113+
114+
115+
Building from Source
116+
--------------------
117+
See the [docs/BUILD.md](docs/BUILD.md) document for details on how to build OpenBMP from source. Includes how to create DEB and RPM packages.
118+
3119

4-
OpenBMP Server and UI

docs/BUILD.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Compiling
2+
3+
## Install the dependancies
4+
* apt-get install libmysqlcppconn-dev
5+
6+
1. cmake .
7+
2. make
8+
3. make install
9+
10+

docs/DATABASE.md

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
Interaction with the Database
2+
=============================
3+
4+
OpenBMP stores the parsed BMP messages in a database. The DB is updated realtime as messages are received.
5+
6+
The design allows for admins, network engineers, scripts/programs, etc. to interact with the Database in a read-only fashion. A single database instance running with 8G of RAM and 4 vCPU's can handle several routers with several full Internet routing bgp peers.
7+
8+
Primary Keys
9+
------------
10+
OpenBMP is not just logging BMP/BGP messages, instead it is actively maintaining the information. Therefore, there is a need for OpenBMP to update existing objects, such as NLRI and timestamps. To facilitate this, each table includes a **hash_id** which is currently a MD5 hash of various columns. Each table hash_id is computed on column information instead of requiring multiple column primary keys or unique key constraints.
11+
12+
To facilitate table linking, **hash_id's** of other tables are referenced. Each table defines the reference to other table hash_id's.
13+
14+
Schema for Views
15+
----------------
16+
Views are pre-defined queries in a nice table format, making it easier for integration. Views look just like tables. You can run normal select queries against them.
17+
18+
### v_routes
19+
The routes table is similar to looking at the routing table on a router. The difference is that you can look at them across all routers, including pre-policy.
20+
21+
Column | DataType | Description
22+
------ | -------- | -----------
23+
RouterName | varchar | DNS/custom name or BMP initiate message (sysName)
24+
PeerName | varchar | Name or IP address of peer
25+
Prefix | varchar | Prefix
26+
PrefixLen | int | Prefix length in bits
27+
NH | varchar | Next-hop IP address in printed format
28+
Origin | varchar| BGP origin in string format
29+
Origin_AS | int | First AS PATh entry, origin of the prefix
30+
MED | int | BGP MED value
31+
LocalPref | int | BGP local preference
32+
AS_Path | varchar | AS Path in string format
33+
ASPath_Count | int | Count of ASN's in the path
34+
Communities | varchar | Standard Communities in string format
35+
ClusterList | varchar | Cluster list in string format
36+
Aggregator | varchar | Aggregator IP address in printed format
37+
PeerAddress | varchar | Peer IP address in printed format
38+
LastModified | timestamp | Timestamp of when last modified/udpated
39+
40+
41+
### v_routes_history
42+
Routes history is just like the routes table, but this will return prefixes with their history of path attributes. You can use this view to show the prefix history over time. For example, show a prefix as it converges or how it has moved from one transit to another in a given time period.
43+
44+
Column | DataType | Description
45+
------ | -------- | -----------
46+
RouterName | varchar | DNS/custom name or BMP initiate message (sysName)
47+
PeerName | varchar | Name or IP address of peer
48+
Prefix | varchar | Prefix
49+
PrefixLen | int | Prefix length in bits
50+
NH | varchar | Next-hop IP address in printed format
51+
Origin | varchar| BGP origin in string format
52+
Origin_AS | int | First AS PATh entry, origin of the prefix
53+
MED | int | BGP MED value
54+
LocalPref | int | BGP local preference
55+
AS_Path | varchar | AS Path in string format
56+
ASPath_Count | int | Count of ASN's in the path
57+
Communities | varchar | Standard Communities in string format
58+
ClusterList | varchar | Cluster list in string format
59+
Aggregator | varchar | Aggregator IP address in printed format
60+
PeerAddress | varchar | Peer IP address in printed format
61+
LastModified | timestamp | Timestamp of when last modified/udpated
62+
63+
### v_peers
64+
View of BGP peers with session information and details of last down and up notifications. This is similar to looking at the bgp peer on the router. Like with routes, you can see a much larger list of peers by looking at all routers, not just one.
65+
66+
For example, one could use this view to report on public peers in different peering locations. Another report could be to track peering stability.
67+
68+
Column | DataType | Description
69+
------ | -------- | -----------
70+
RouterName | varchar | DNS/custom name or BMP initiate message (sysName)
71+
LocalIP | varchar | IP Address of the BMP router local peering address
72+
LocalPort | int | Local port number of the BMP router local peering session
73+
LocalASN | int | Local ASN for peering sessions
74+
PeerName | varchar | Name or IP address of peer
75+
PeerAddress | varchar | Peer IP address in printed format
76+
PeerPort | int | Remote port number of the peer
77+
PeerASN | int | Peer ASN for session
78+
holdTime | int | BGP holdtime being used, if up
79+
isUp | boolean | True if peer is up, or false if peer is down
80+
isBMPConnected | boolean | True if the router BMP session is connected, false if not
81+
SentParams | varchar(variable) | String list of open params sent to peer
82+
RecvParams | varchar(variable) | String list of open params received from peer
83+
LastDownCode | int | BGP error code of the last down notification
84+
LastDownSubCode | int | BGP error subcode of the last down notification
85+
LastDownMessage | varchar | Meaning of last peer down notification
86+
LastDownTimestamp | timestamp | Timestamp of the last time peer down was sent
87+
LastUpTimestamp | timestamp | Timestamp of the last time peer up was sent
88+
89+
90+
Schema for Stored Procedures
91+
----------------------------
92+
Currently there are no stored procedures.
93+
94+
Schema for Data Tables
95+
----------------------
96+
97+
### Routers
98+
This table is a list of all BMP devices. Normally this table is populated based on connections made to the OpenBMP server. This table is used for provisioning allowed BMP devices OpenBMP will accept, as well as to indicate which BMP devices are in *passive* mode requiring *active* tcp connections to be made by OpenBMP.
99+
100+
Column | DataType | Description
101+
------ | -------- | -----------
102+
hash_id | char(32) | Hash ID for this table
103+
name | varchar(255) | DNS/custom name or if empty the BMP initiate message (sysName)
104+
descr | varchar(255) | Description of router/BMP device (if empty will be sysDescr learned)
105+
src_addr | varchar(40) | IPv4/IPv6 address of the BMP device
106+
asn | unsigned int 32bit | ASN of the BMP device
107+
isConnected | boolean | BMP connection state ; true is established
108+
isPassive | boolean | Indicates if OpenBMP is passive or active
109+
term_reason_code | int | BMP termination reason code for last termination (isConnected=false)
110+
term_reason_text | varchar(255) | Text description of the reason code meaning
111+
term_data | blob/text | Attribute value pairs provided in termination data
112+
initiate_data| blob/text | Attribute value paris provided in initiation message
113+
timestamp| timestamp | Last time the record was updated - seconds since EPOCH
114+
115+
116+
### bgp_peers
117+
BGP peers are added to this table as BMP devices send information. The **router_hash_id** provides a way to link which BMP device the peer belongs to.
118+
119+
Column | DataType | Description
120+
------ | -------- | -----------
121+
hash_id | char(32) | Hash ID of this table
122+
router_hash_id | char(32) | Hash ID of the routers table
123+
name | varchar(255) | BGP peer name
124+
peer_rd | varchar(32) | Route distinguisher ID in printed format
125+
peer_addr | varchar(40) | Peer IP address (IPv4/IPv6) in printed format
126+
peer_bgp_id | varchar(15) | Peer BGP ID in printed format
127+
peer_as | unsigned int 32bit | Peer ASN
128+
isL3VPN | boolean | Peer is VPNv4 if true and global if false
129+
isIPv4 | boolean | Peer IP type is IPv4 if true and IPv6 if false
130+
isPrePolicy | boolean | True if pre-policy (adj-rib-in) or false if post-policy (loc-rib)
131+
peer_state | int | Peer state is 0=down, 1=up, 2=receiving initial dump via bmp
132+
timestamp| timestamp | Last time the record was updated - seconds since EPOCH
133+
134+
135+
### path_attrs
136+
BGP path attributes table primarily holds the path attributes for NLRI entries. This includes MP_REACH. BGP-LS attributes will be stored in separate (*new*) tables.
137+
138+
Column | DataType | Description
139+
------ | -------- | -----------
140+
hash_id | char(32) | Hash ID of this table
141+
peer_hash_id | char (32) | Hash ID of the bgp_peers table
142+
origin | varchar(16) | BGP Origin in printed format
143+
as_path | varchar(variable) | AS_PATH in string format
144+
as_path_count | int | Count of AS's in the path, including in sets
145+
origin_as | unsigned int 32bit | Origin AS - first ASN in path
146+
nexthop_isIPv4 | boolean | Next-hop is IPv4 if true and IPv6 if false
147+
next_hop | varchar(40) | IP address of next-hop in printed format
148+
aggregator | varchar(40) | Aggregator IP in printed format
149+
originator_id| varchar(15) | Originator ID in printed format
150+
atomic_agg | boolean | True if atomic aggregate, false if not
151+
med | unsigned int 32bit | BGP med value
152+
local_pref | unsigned int 32bit | BGP local preference
153+
community_list | varchar(variable) | Standard community list in string format
154+
ext_community_list | varchar(variable) | Extended community list in string format
155+
cluster_list | varchar(variable) | Cluster list in string format
156+
timestamp| timestamp | Last time the record was updated - seconds since EPOCH
157+
158+
159+
### rib
160+
The rib table details the prefixes, both IPv4, IPv6, and VPNv4. Linking the path_attrs table is needed in order to determine the attributes of prefix. The **v_routes** view provides a simple view of routes with their attributes.
161+
162+
Column | DataType | Description
163+
------ | -------- | -----------
164+
hash_id | char(32) | Hash ID of this table
165+
path_attr_hash_id | char(32) | Hash ID of the path_attrs table
166+
peer_hash_id | char(32) | Hash ID of the bgp_peers table
167+
prefix | varchar(40) | Prefix in printed format
168+
prefix_len | int | Length of prefix in bits
169+
timestamp| timestamp | Last time the record was updated - seconds since EPOCH
170+
171+
172+
### peer_down_events
173+
Peer down events are logged whenever received in this table.
174+
175+
Column | DataType | Description
176+
------ | -------- | -----------
177+
peer_hash_id | char(32) | Hash ID of bgp_peers table
178+
bmp_reason | varchar(64) | Short text description of the BMP reason code
179+
bgp_error_code | int | BGP notification error code (see RFC4271 Section 4.5)
180+
bgp_error_subcode | int | BGP notification error subcode (see RFC4271 Section 4.5)
181+
error_text | varchar(255) | Text description of bgp error code and subcode meaning
182+
timestamp| timestamp | BMP recorded time - seconds since EPOCH
183+
184+
### peer_up_events
185+
Peer up events are logged whenever bmp device is established with OpenBMP and when the peer transitions from down to up.
186+
187+
> It is possible to link this table to the peer table to get a full picture of
188+
> the peering session. See **v_peers** view for peering session information.
189+
190+
Column | DataType | Description
191+
------ | -------- | -----------
192+
peer_hash_id | char(32) | Hash ID of the bgp_peers table
193+
local_ip | varchar(40) | printed form of the Local BMP device peer IP address (IPv4 or IPv6)
194+
local_port | int | Local port number for the peer session
195+
remote_port | int | Remote port number for the peer session
196+
hold_time | int | BGP hold time for the peer session
197+
sent_open_params | varchar(variable) | String list of open params sent to peer
198+
recv_open_params | varchar(variable) | String list of open params received from peer
199+
timestamp| timestamp | BMP recorded time - seconds since EPOCH
200+
201+
### stat_reports
202+
203+
Status reports are metrics based on periods defined/configured on the BMP device. Each time the BMP device sends a report, an entry will be placed in this table.
204+
205+
Column | DataType | Description
206+
------ | -------- | -----------
207+
peer_hash_id | char(32) | Hash ID of bgp_peers table
208+
prefixes_rej | unsigned int 32bit | Number of prefixes rejected by inbound policy
209+
known_dup_prefixes | unsigned int 32bit | Number of (known) duplicate prefix advertisements
210+
known_dup_withdraws | unsigned int 32bit | Number of (known) duplicate withdraws
211+
invalid_cluster_list | unsigned int 32bit | Number of updates invalidated due to CLUSTER_LIST loop
212+
invalid_as_path_loop | unsigned int 32bit | Number of updates invalidated due to AS_PATH loop
213+
invalid_originator_id | unsigned int 32bit | Number of updates invalidated due to ORIGINATOR_ID
214+
invalid_as_confed_loop | unsigned int 32bit | Number of updates invalidated due to AS_CONFED loop
215+
routes_adj_rib_in | unsigned int 64bit | Number of routes in Adj-RIBs-In
216+
routes_loc_rib | unsigned int 64bit | Number of routes in Loc-RIB
217+
timestamp| timestamp | BMP recorded time - seconds since EPOCH
218+
219+
> Other metrics can be added
220+
221+
### withdrawn_log
222+
Every time a prefix is withdrawn a log entry is created in this table.
223+
224+
Column | DataType | Description
225+
------ | -------- | -----------
226+
id | unsigned int 64bit | Incrementing number for log entry
227+
peer_hash_id | char (32) | Hash ID of the bgp_peers table
228+
prefix | varchar(40) | Prefix IP address in printed format
229+
prefix_len | int | Length of prefix in bits
230+
timestamp| timestamp | Last time the record was updated - seconds since EPOCH
231+
232+
233+
### path_attr_log
234+
Every time a prefix path attribute is changed, a log entry is added to this table.
235+
236+
Column | DataType | Description
237+
------ | -------- | -----------
238+
rib_hash_id | char(32) | Hash ID of the rib table
239+
path_attr_hash_id | char (32) | Hash ID of the path_attrs table for the current attrs, before update
240+
timestamp| timestamp | Last time the record was updated - seconds since EPOCH
241+
242+
243+

docs/Doxyfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
PROJECT_NAME = "OpenBMP"
2+
INPUT = ../Server/src
3+

0 commit comments

Comments
 (0)