Overview BGP Monitoring Protocol

The BGP Monitoring Protocol (BMP) feature supports the following functionalities to monitor Border Gateway Protocol (BGP) neighbors, also called BMP clients:
  • Configure devices to function as BMP servers, and on the servers, set up parameters that are required for monitoring the BGP neighbors.
  • Establish connectivity of the BMP servers with BGP neighbors for monitoring.
  • Generate a statistics report based on monitoring the BGP neighbors.
  • Perform appropriate error handling on the BGP neighbors.
  • Perform graceful scale up and degradation to the point of closing connectivity between the BMP servers and BGP neighbors.

Prerequisites for BGP Monitoring Protocol

Before you configure BGP Monitoring Protocol (BMP) servers, you must configure BGP neighbors that function as BMP clients, and establish a session with its peers using either IPv4 or IPv6, or VPNv4 or VPNv6 address family identifiers.

Information About BGP Monitoring Protocol

The BGP Monitoring Protocol (BMP) feature enables monitoring of BGP neighbors (called BMP clients). You can configure a device to function as a BMP server that monitors BMP clients, which in turn, have several active peer sessions configured. You can also configure a BMP client to connect to one or more BMP servers. The BMP feature enables the configuration of multiple BMP servers (configured as primary servers) to function actively and independent of each other simultaneously to monitor BMP clients.

Each BMP server is specified by a number, and you can use CLI to configure parameters such as IP address, port number, and so on. Upon activation, a BMP server attempts to connect to BMP clients by sending an initiation message. The CLI enables multiple (independent and asynchronous) BMP server connections.

BGP neighbors are configured to send data to specific BMP servers for monitoring purposes. These clients are configured in a queue. When a request for a connection arrives from BMP clients to BMP servers, a connection is established based on the order in which the requests arrived. After a BMP server connects with the first BMP neighbor, it sends out refresh requests to monitor the BMP clients and starts monitoring those BMP clients with whom the connection is already established.

Session connection requests from the other BMP clients to the BMP servers is initiated after an initial delay that you can configure using the initial-delay command. If a connection is established but fails later, the connection request is retried after a delay, which you can configure using the failure-retry-delay command. If there is repeated failure establishing a connection, the connection retries are delayed based on the delay configured using the flapping-delay command. Configuring the delay for such requests becomes significant because the route refresh requests that are sent to all the connected BMP clients causes considerable network traffic and load on the device.

To avoid excessive load on the device, the BMP servers send route-refresh requests to individual BMP clients at a time - in the order in which connections are established in the queue. After a BMP client that is already connected is in the reporting state, it sends a “peer-up” message to the BMP server. After the client receives a route-refresh request, route monitoring begins for that neighbor. After the route-refresh request ends, the next neighbor in the queue is processed. This cycle continues until all BGP neighbors in the reporting state are reported and all routes sent by these “reporting” BGP neighbors are monitored. If a neighbor is established after BMP monitoring begins, it does not require a route-refresh request. All the received routes from that client is sent to the BMP servers.

It is advantageous to batch up refresh requests from BMP clients if several BMP servers are activated in quick succession. Use the bmp initial-refresh delay command to configure a delay in triggering the refresh mechanism when the first BMP server comes up. If other BMP servers come online within this timeframe, only one set of refresh requests is sent to the BMP clients. You can also configure the bmp initial-refresh skip command to skip all the refresh requests from the BMP servers and just monitor all incoming messages from the peers.

In a client-server configuration, we recommend that the resource load of the devices be kept minimal and adding excessive network traffic be avoided. In the BMP configuration, you can configure various delay timers on the BMP server to avoid flapping during the connection between a server and a client. To avoid excessive message throughput or high usage of system resources, you can configure the maximum buffer limit for the BMP session.

From Cisco IOS XE Bengaluru 17.6.1, system time is used as a timestamp, and it is included in all the BMP messages with a per-peer header. When a BMP server or peer flaps, check the timestamp in the BMP message and use this information to troubleshoot the issue. The following BMP messages contain a timestamp:

  • Route Monitoring

  • Peer Up Notification

  • Peer Down Notification

  • State Reporting

These BMP messages contain timestamps by default. To verify if timestamps are included, use the show ip bgp bmp server summary command and verify that the output includes the following message - BGP Message Timestamp will be sent to BMP Servers. For more information, see Examples for Configuring, Verifying, and Monitoring BGP Monitoring Protocol section.

How to Configure BGP Monitoring Protocol

The following sections provide information about the various tasks that comprise the BMP configuration process.

Configuring a BGP Monitoring Protocol Session

Perform this task to configure the BMP session parameters for the BMP servers to establish connectivity with BMP clients.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. router bgp as-number
  4. bmp {buffer-size buffer-bytes | initial-refresh {delay refresh-delay | skip} | server server-number-n
  5. end

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

router bgp as-number

Example:


Device(config)# router bgp 65000

Enters router configuration mode and creates a BGP routing process.

Step 4

bmp {buffer-size buffer-bytes | initial-refresh {delay refresh-delay | skip} | server server-number-n

Example:


Device(config-router)# bmp initial-refresh delay 30

Configures BMP parameters for BGP neighbors, and enters BMP server configuration mode to configure BMP servers.

Step 5

end

Example:


Device(config-router)# end

Returns to privileged EXEC mode.

Configuring BGP Monitoring Protocol on BGP Neighbors

Perform this task to activate BMP on BGP neighbors (also called BMP clients) so that client activity is monitored by the BMP server configured on the neighbor.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. router bgp as-number
  4. neighbor {ipv4-addr | neighbor-tag | ipv6-addr} bmp-activate {all | server server-number-1 [server server-number-2 . . . [server server-number-n]]}
    • Repeat Step 1 to Step 4 to configure the other BMP clients in the session.
  5. end

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

router bgp as-number

Example:


Device(config)# router bgp 65000

Enters router configuration mode and creates a BGP routing process.

Step 4

neighbor {ipv4-addr | neighbor-tag | ipv6-addr} bmp-activate {all | server server-number-1 [server server-number-2 . . . [server server-number-n]]}

  • Repeat Step 1 to Step 4 to configure the other BMP clients in the session.

Example:


Device(config-router)# neighbor 30.1.1.1 bmp-activate server 1 server 2

Activates BMP monitoring on a BGP neighbor.

Step 5

end

Example:


Device(config-router)# end

Returns to privileged EXEC mode.

Configuring a BGP Monitoring Protocol Server

Perform this task to configure a BMP server and its parameters in BMP server configuration mode.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. router bgp as-number
  4. bmp {buffer-size buffer-bytes | initial-refresh {delay refresh-delay | skip} | server server-number-n
  5. activate
  6. address {ipv4-addr | ipv6-addr} port-number port-number
  7. description LINE server-description
  8. failure-retry-delay failure-retry-delay
  9. flapping-delay flap-delay
  10. initial-delay initial-delay-time
  11. set ip dscp dscp-value
  12. stats-reporting-period report-period
  13. update-source interface-type interface-number
  14. exit-bmp-server-mode
  15. end

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

router bgp as-number

Example:


Device(config)# router bgp 65000

Enters router configuration mode and creates a BGP routing process.

Step 4

bmp {buffer-size buffer-bytes | initial-refresh {delay refresh-delay | skip} | server server-number-n

Example:


Device(config-router)# bmp server 1

Enters BMP server configuration mode to configure the BMP server.

Step 5

activate

Example:


Device(config-router-bmpsrvr)# activate

Initiates a connection between the BMP server and BGP neighbors.

Step 6

address {ipv4-addr | ipv6-addr} port-number port-number

Example:


Device(config-router-bmpsrvr)# address 10.1.1.1 port-number 8000

Configures the IP address and port number to the BMP server.

Step 7

description LINE server-description

Example:


Device(config-router-bmpsrvr)# description LINE SERVER1

Configures a textual description of the BMP server.

Step 8

failure-retry-delay failure-retry-delay

Example:


Device(config-router-bmpsrvr)# failure-retry-delay 40

Configures delay in the retry requests during failures when sending BMP server updates.

Step 9

flapping-delay flap-delay

Example:


Device(config-router-bmpsrvr)# flapping-delay 120

Configures delays in flapping when sending BMP server updates.

Step 10

initial-delay initial-delay-time

Example:


Device(config-router-bmpsrvr)# initial-delay 20

Configures delays in sending initial requests for updates from the BMP server.

Step 11

set ip dscp dscp-value

Example:


Device(config-router-bmpsrvr)# set ip dscp 5

Configures the IP Differentiated Services Code Point (DSCP) values for the BMP server.

Step 12

stats-reporting-period report-period

Example:


Device(config-router-bmpsrvr)# stats-reporting-period 30

Configures the time interval in which the BMP server receives the statistics report from BGP neighbors.

Step 13

update-source interface-type interface-number

Example:


Device(config-router-bmpsrvr)# update-source ethernet 0/0

Configures the interface source for routing updates on the BMP servers.

Step 14

exit-bmp-server-mode

Example:


Device(config-router-bmpsrvr)# exit-bmp-server-mode

Exits from BMP server configuration mode and returns to router configuration mode.

Repeat Step 1 to Step 14 to configure the other BMP servers in the session.

Step 15

end

Example:


Device(config-router)# end

Returns to privileged EXEC mode.

Verifying BGP Monitoring Protocol

Perform the following steps to verify the configuration for the BMP servers and BMP clients:

SUMMARY STEPS

  1. enable
  2. show ip bgp bmp
  3. show running-config

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

show ip bgp bmp

Example:


Device# show ip bgp bmp neighbors

Displays information about BMP servers and neighbors.

Step 3

show running-config

Example:


Device# show running-config | section bmp

Displays information about BMP servers and neighbors.

Monitoring BGP Monitoring Protocol

Perform the following steps to enable debugging and monitor the BMP servers.

SUMMARY STEPS

  1. enable
  2. debug ip bgp bmp
  3. show debugging

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:


Device> enable

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

debug ip bgp bmp

Example:


Device# debug ip bgp bmp server

Enables debugging of the BMP attributes.

Step 3

show debugging

Example:


Device# show debugging

Displays information about the types of debugging that are enabled on a device.

Configuration Examples for BGP Monitoring Protocol

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

Additional References for BGP Monitoring Protocol

Related Documents

Related Topic Document Title

Cisco IOS commands

Cisco IOS Master Command List, All Releases

BGP commands

Cisco IOS IP Routing: BGP Command Reference

Technical Assistance

Description Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

http://www.cisco.com/support

Feature Information for BGP Monitoring Protocol

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1. Feature Information for BGP Monitoring Protocol

Feature Name

Releases

Feature Description

BGP Monitoring Protocol

The BGP Monitoring Protocol feature supports the following functionality to enable monitoring of the Border Gateway Protocol (BGP) neighbors, that become BMP clients:

  • Configure devices to function as BMP servers, and set up parameters that are required for monitoring the BGP neighbors, on the servers.

  • Establish connectivity of the BMP servers with BGP neighbors for monitoring.

  • Generate statistics report based on the task of monitoring the BGP neighbors.

  • Perform appropriate error handling on the BGP neighbors.

  • Perform graceful scale up and degradation to the point of closing connectivity between the BMP servers and BGP neighbors.

The following commands were introduced or modified:

bmp

debug ip bgp bmp

neighbor bmp-activate

show ip bgp bmp

The following commands were introduced in BMP server configuration mode to configure specific BMP servers:

activate

address

default

description

exit-bmp-server-mode

failure-retry-delay

flapping-delay

initial-delay

set ip dscp

stats-reporting-period

update-source

BMP Per-Peer Header Timestamp

Cisco IOS XE Release 17.6.1

By default, the BMP messages with a per-peer header contain timestamps. The system time is used as a timestamp in these messages.