The following sections contain examples relating to configuring, verifying, and monitoring BMP.
Examples: Configuring BGP Monitoring Protocol
Note
|
Two levels of configuration are required for the BMP to function as designed. You must enable BMP monitoring on each BGP neighbor
(also called BMP client) to which several peers are connected in a network, and establish connectivity between the BMP servers
and clients. Then, configure each BMP server in BMP server configuration mode for a specific server with the parameters required
for monitoring the associated BMP clients.
|
The following example shows how to activate BMP on a neighbor with IP address 192.168.1.1, which is monitored by BMP servers
(in this case, server 1 and 2):
Device> enable
Device# configure terminal
Device(config)# router bgp 65000
Device(config-router)# neighbor 192.168.1.1 bmp-activate server 1 server 2
Device(config-router)# end
The following example shows how to configure an initial refresh delay of 30 seconds for BGP neighbors on which BMP is activated
using the neighbor bmp-activate command:
Device> enable
Device# configure terminal
Device(config)# router bgp 65000
Device(config-router)# bmp initial-refresh delay 30
Device(config-router)# bmp buffer-size 2048
Device(config-router)# end
The following example shows how to enter BMP server configuration mode and initiate connection between a specific BMP server
with the BGP BMP neighbors. In this example, connection to clients is initiated from BMP servers 1 and 2 along with configuration
of the monitoring parameters.
Device> enable
Device# configure terminal
Device(config)# router bgp 65000
Device(config-router)# bmp server 1
Device(config-router-bmpsrvr)# activate
Device(config-router-bmpsrvr)# address 10.1.1.1 port-number 8000
Device(config-router-bmpsrvr)# description LINE SERVER1
Device(config-router-bmpsrvr)# failure-retry-delay 40
Device(config-router-bmpsrvr)# flapping-delay 120
Device(config-router-bmpsrvr)# initial-delay 20
Device(config-router-bmpsrvr)# set ip dscp 5
Device(config-router-bmpsrvr)# stats-reporting-period 30
Device(config-router-bmpsrvr)# update-source ethernet 0/0
Device(config-router-bmpsrvr)# exit-bmp-server-mode
Device(config-router)# bmp server 2
Device(config-router-bmpsrvr)# activate
Device(config-router-bmpsrvr)# address 20.1.1.1 port-number 9000
Device(config-router-bmpsrvr)# description LINE SERVER2
Device(config-router-bmpsrvr)# failure-retry-delay 40
Device(config-router-bmpsrvr)# flapping-delay 120
Device(config-router-bmpsrvr)# initial-delay 20
Device(config-router-bmpsrvr)# set ip dscp 7
Device(config-router-bmpsrvr)# stats-reporting-period 30
Device(config-router-bmpsrvr)# update-source ethernet 2/0
Device(config-router-bmpsrvr)# exit-bmp-server-mode
Device(config-router)# end
The following is a sample output from the show ip bgp bmp server command for server number 1. The attributes displayed are configured in BMP server configuration mode.
Device# show ip bgp bmp server 1
Print detailed info for 1 server number 1.
bmp server 1
address: 192.168.1.1 port 8000
description SERVER1
up time 00:06:22
session-startup route-refresh
initial-delay 20
failure-retry-delay 40
flapping-delay 120
activated
The following is a sample output from the show ip bgp bmp server command for server number 2. The attributes displayed are configured in BMP server configuration mode.
Device# show ip bgp bmp server 2
Print detailed info for 1 server number 2.
bmp server 2
address: 20.1.1.1 port 9000
description SERVER2
up time 00:06:23
session-startup route-refresh
initial-delay 20
failure-retry-delay 40
flapping-delay 120
activated
The following is a sample output from the show ip bgp bmp server summary command after deactivating the BMP servers 1 and 2 connections.
Device# show ip bgp bmp server summary
Number of BMP servers configured: 2
Number of BMP neighbors configured: 10
Number of neighbors on TransitionQ: 0, MonitoringQ: 0, ConfigQ: 0
Number of BMP servers on StatsQ: 0
BMP Refresh not in progress, refresh not scheduled
Initial Refresh Delay configured, refresh value 30s
BMP buffer size configured, buffer size 2048 MB, buffer size bytes used 0 MB
BGP Message Timestamp will be sent to BMP Servers
ID Host/Net Port TCB Status Uptime MsgSent LastStat
1 10.1.1.1 8000 0x0 Down 0
2 20.1.1.1 9000 0x0 Down 0
The following is a sample output from the show ip bgp bmp neighbors command, which shows the status of the BGP BMP neighbors after reactivating the BMP servers 1 and 2 connections.
Device# show ip bgp bmp server neighbors
Number of BMP neighbors configured: 10
BMP Refresh not in progress, refresh not scheduled
Initial Refresh Delay configured, refresh value 30s
BMP buffer size configured, buffer size 2048 MB, buffer size bytes used 0 MB
Neighbor PriQ MsgQ CfgSvr# ActSvr# RM Sent
30.1.1.1 0 0 1 2 1 2 16
2001:DB8::2001 0 0 1 2 1 2 15
40.1.1.1 0 0 1 2 1 2 26
2001:DB8::2002 0 0 1 2 1 2 15
50.1.1.1 0 0 1 2 1 2 16
60.1.1.1 0 0 1 2 1 2 26
2001:DB8::2002 0 0 1 1 9
70.1.1.1 0 0 2 2 12
Neighbor PriQ MsgQ CfgSvr# ActSvr# RM Sent
80.1.1.1 0 0 1 1 10
2001:DB8::2002 0 0 1 2 1 2 16
The following is a sample output from the show ip bgp bmp server summary command for BMP server number 1 and 2. The statistics reporting interval on BMP servers 1 and 2 has been set to 30 seconds.
Therefore, each server receives statistics messages from its connected BGP BMP neighbor in 30-second cycles.
Device# show ip bgp bmp server summary
Number of BMP servers configured: 2
Number of BMP neighbors configured: 10
Number of neighbors on TransitionQ: 0, MonitoringQ: 0, ConfigQ: 0
Number of BMP servers on StatsQ: 0
BMP Refresh not in progress, refresh not scheduled
Initial Refresh Delay configured, refresh value 30s
BMP buffer size configured, buffer size 2048 MB, buffer size bytes used 0 MB
BGP Message Timestamp will be sent to BMP Servers
ID Host/Net Port TCB Status Uptime MsgSent LastStat
1 10.1.1.1 8000 0x2A98B07138 Up 00:38:49 162 00:00:09
2 20.1.1.1 9000 0x2A98E17C88 Up 00:38:49 46 00:00:04
Device# show ip bgp bmp server summary
Number of BMP servers configured: 2
Number of BMP neighbors configured: 10
Number of neighbors on TransitionQ: 0, MonitoringQ: 0, ConfigQ: 0
Number of BMP servers on StatsQ: 0
BMP Refresh not in progress, refresh not scheduled
Initial Refresh Delay configured, refresh value 30s
BMP buffer size configured, buffer size 2048 MB, buffer size bytes used 0 MB
BGP Message Timestamp will be sent to BMP Servers
ID Host/Net Port TCB Status Uptime MsgSent LastStat
1 10.1.1.1 8000 0x2A98B07138 Up 00:40:19 189 00:00:07
2 20.1.1.1 9000 0x2A98E17C88 Up 00:40:19 55 00:00:02
Note
|
If you configure several BGP BMP neighbors to be monitored by the BMP servers, for example 10, then 10 statistics messages
are received by both the servers during each configured cycle.
|
The following is a sample output from the show running-config command, which shows the running configuration on a device:
Device# show running-config | section bmp
bmp server 1
address 10.1.1.1 port-number 8000
description SERVER1
initial-delay 20
failure-retry-delay 40
flapping-delay 120
update-source Ethernet0/0
set ip dscp 3
activate
exit-bmp-server-mode
bmp server 2
address 20.1.1.1 port-number 9000
description SERVER2
initial-delay 20
failure-retry-delay 40
flapping-delay 120
update-source Ethernet2/0
set ip dscp 5
activate
exit-bmp-server-mode
bmp initial-refresh delay 30
bmp-activate all
The following examples show how to enable debugging of the various BMP attributes:
Device# debug ip bgp bmp event
BGP BMP events debugging is on
Device# debug ip bgp bmp neighbor
BGP BMP neighbor debugging is on
Device# debug ip bgp bmp server
BGP BMP server debugging is on
The following is a sample output from the show debugging command after you enable BGP BMP server debugging:
Device# show debugging
IP routing:
BGP BMP server debugging is on
Device#
*Apr 8 21:04:13.164: BGPBMP: BMP server connection attempt timer expired for server 1 - 10.1.1.1/8000
*Apr 8 21:04:13.165: BGPBMP: BMP server 1 active open process success - 10.1.1.1/8000
*Apr 8 21:04:13.165: BGPBMP: TCP KA interval is set to 15
Device#
*Apr 8 21:04:15.171: BGPBMP: Register read/write notification callbacks with BMP server 1 TCB - 10.1.1.1/8000
*Apr 8 21:04:15.171: BGPBMP: Initiation msg sent to BMP server 1 - 10.1.1.1/8000
*Apr 8 21:04:15.171: BGPBMP: BMP server 1 connection - 10.1.1.1/8000 up, invoke refresh event
Device#
*Apr 8 21:04:16.249: BGPBMP: BMP server connection attempt timer expired for server 2 - 20.1.1.1/9000
*Apr 8 21:04:16.249: BGPBMP: BMP server 2 active open process success - 20.1.1.1/9000
*Apr 8 21:04:16.249: BGPBMP: TCP KA interval is set to 15
*Apr 8 21:04:16.250: BGPBMP: Register read/write notification callbacks with BMP server 2 TCB - 20.1.1.1/9000
*Apr 8 21:04:16.250: BGPBMP: Initiation msg sent to BMP server 2 - 20.1.1.1/9000
*Apr 8 21:04:16.250: BGPBMP: BMP server 2 connection - 20.1.1.1/9000 up, invoke refresh event