247
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enable SNMP
notifications for BGP.
snmp-agent trap enable bgp
By default, SNMP notifications for
BGP are enabled.
Enabling logging of session state changes
Perform this task to enable BGP to log BGP session establishment and disconnection events. To
view the log information, use the display bgp peer ipv4 unicast log-info command or the display
bgp peer ipv6 unicast log-info command. The logs are sent to the information center. The output
rules of the logs (whether to output the logs and where to output) are determined by the information
center configuration.
For more information about information center configuration, see Network Management and
Monitoring Configuration Guide.
To enable the logging of session state changes:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter BGP view.
bgp
as-number
N/A
3. Enable the logging of
session state changes
globally.
log-peer-change
By default, logging of session
state changes is enabled globally.
Enabling logging for BGP route flapping
IMPORTANT:
This feature is available in Release 1121 and later.
This feature enables BGP to generate logs for BGP route flappings that trigger log generation. The
generated logs are sent to the information center. For the logs to be output correctly, you must also
configure information center on the device. For more information about the information center, see
Network Management and Monitoring Configuration Guide.
To enable logging for BGP route flapping (IPv4 unicast):
Step Command Remarks
1. Enter system view.
system-view
N/A