Configuring BGP to Record Peer Status Changes and Event Information

After you configure BGP to record peer status changes and event information, BGP logs every peer status change or event.

Context

If an error occurs on a BGP peer, BGP generates an error code and a subcode. If the error occurs on the local device, the local device disconnects the BGP peer and sends a BGP Notification message to the BGP peer. After the BGP peer receives the Notification message, it records the error code and subcode carried in the message and changes its state machine.

By default, BGP records peer status changes and event information in the system log files. The record includes BGP error codes and subcodes, BGP state machine changes, and whether BGP Notification messages are sent. The system log files serve as a reference to locate network connectivity faults.

If you do not want BGP to record peer status changes or event information, run the undo peer log-change command. After you run the undo peer log-change command, BGP records only the last peer status change in the log file. To check this log, run the display bgp peer loginfo command.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run bgp as-number

    The BGP view is displayed.

  3. Run peer { ipv4-address | group-name } log-change

    BGP is configured to record peer status changes and event information.

  4. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >