Configuring BMP
Context
The BGP Monitoring Protocol (BMP) monitors BGP running status, such as BGP peer relationship establishment and termination and route updates. Without BMP, manual query is required if you want to know about BGP running status. To improve the network monitoring efficiency, you can configure BMP on a router to use a monitoring server on the network to monitor BGP running status.
Procedure
- Run system-view
The system view is displayed.
- Run bmp
BMP is started and the BMP view is displayed.
- (Optional) Run statistics-timer time
An interval is set, at which the router sends BGP running statistics to a monitoring server.
Configure the interval based on the network stability requirements. If BGP requires high stability, configure a small interval. However, if the router sends BGP running statistics frequently, a large amount of bandwidth resources will be consumed.
The default interval is 3600s. Retaining the default value is recommended.
- (Optional) Set the type of route whose statistics are to be sent to the monitoring server.
To configure a global type, run route-mode { pre-policy | post-policy }
Whether statistics about all received routes or only accepted routes are sent to the monitoring server is set.
By default, statistics about only the accepted routes (routes that match the import policy) are sent to the monitoring server.
To configure a route type for the public-network or VPN peers, run peer { ipv4-address | ipv6-address } [ vpn-instance vpn-instance-name ] route-mode { pre-policy | post-policy }
The BMP is set to send statistics about the specified type of route received from public-network or VPN BGP peers to the monitoring server.
By default, the type of route whose statistics are to be sent by BMP to the monitoring server is the one configured using the route-mode command.
To configure a type of route whose statistics are to be sent by BMP to the monitoring server, run the peer route-mode command. To configure BMP to send statistics about all the routes received from a specified peer to the monitoring server, specify pre-policy in the command. To configure BMP to send statistics about only the accepted routes (the ones that match the import policy) received from a specified peer to the monitoring server, specify post-policy in the command. The route type configured using the route-mode command applies to all BGP peers. That is, pre-policy or post-policy applies to the routes received from all BGP peers. The route type configured using the peer route-mode command applies only to the specified type of BGP peer. That is, pre-policy can be configured for some BGP peers, and post-policy is configured for other BGP peers.
If you specify pre-policy in the command, run the keep-all-routes command in the BGP view to save the routes carried in the BGP Update messages that are advertised by all BGP peers or peer groups after BGP connections are established, or run the peer keep-all-routes command to save the routes carried in the BGP Update messages that are advertised by a specified BGP peer or peer group after the BGP connection is established.
- Run session { ipv4-address | ipv6-address } [ alias alias-name ]
An IPv4 address of the monitoring server is specified for TCP connections to be set up between the router and the monitoring server.
- Run tcp connect port port-number [ password md5 cipher-password | keychain keychain-name ]
Parameters are configured for TCP connections to be set up between the router and the monitoring server.
- (Optional) Run connect-interface { interface-type interface-number | ipv4-soure-address | interface-type interface-number ipv4-soure-address }
The source interface for sending BMP messages is specified.
- (Optional) Run monitor address-family all disable
Monitoring of all BGP peers is disabled.
By default, all BGP peers are monitored in BMP scenarios. To allow each server to monitor BGP peers in a unique address family so that different BGP services can be controlled, run the monitor peer command. Before you run the monitor peer command, you need to run the monitor address-family all disable command to disable monitoring of all BGP peers.
- (Optional) Run monitor ipv4-family { unicast | vpn-instance vpn-instance-name | vpnv4 } peer ipv4-address or monitor ipv6-family { unicast peer { ipv4-address | ipv6-address } | vpn-instance vpn-instance-name peer { ipv4-address | ipv6-address } | vpnv6 peer ipv4-address }
Monitoring of BGP peers in a specified address family is enabled.
By default, all BGP peers are monitored in BMP scenarios. To allow each server to monitor BGP peers in a unique address family so that different BGP services can be controlled, run the monitor peer command.
- Run commit
The configuration is committed.
After configuring BMP session parameters, run the reset bmp session command in the user view to reset the BMP session for the new BMP session parameters to take effect.