log-peer-change
Use log-peer-change to enable logging for BGP session state changes globally.
Use undo log-peer-change to disable logging for BGP session state changes globally.
Syntax
log-peer-change
undo log-peer-change
Default
Logging for BGP session state changes is enabled globally.
Views
BGP instance view
Predefined user roles
network-admin
Usage guidelines
After you execute both the log-peer-change and peer log-change commands, BGP logs session establishment and disconnection events for the peer or peer group. To display 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 of the device. 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.
If you disable logging for BGP session state changes globally or disable logging for a peer or peer group, BGP does not generate logs for session establishments and disconnections.
Examples
# Enable logging for session state changes globally.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] log-peer-change
Related commands
display bgp peer
peer log-change