6-46Enabling TrapAfter Trap is enabled for BGP, BGP generates Level-4 traps to report important events of it. Thegenerated traps are sent to the Information Center of the device. The output rules of the traps, namely,whether to output the traps and the output direction, are determined according to the InformationCenter configuration. (For Information Center configuration, see Information Center Configuration inthe Network Management and Monitoring Configuration Guide.)Follow these steps to enable Trap:To do… Use the command… RemarksEnter system view system-view —Enable Trap for BGP snmp-agent trap enable bgpOptionalEnabled by defaultEnabling Logging of Peer State ChangesFollow these steps to enable the logging of peer state changes:To do… Use the command… RemarksEnter system view system-view —Enter BGP view bgp as-number —globally log-peer-changeOptionalEnabled by defaultEnable thelogging of peerstate changes for a peer orpeer grouppeer { group-name | ip-address }log-changeOptionalEnabled by defaultConfiguring BFD for BGPBGP maintains neighbor relationships based on the keepalive timer and holdtime timer, which are setin seconds. BGP defines that the holdtime interval must be at least three times the keepalive interval.This mechanism makes the detection of a link failure rather slow and thus causes a large quantity ofpackets to be dropped especially when the failed link is a high-speed link. You can enable BFD todetect the link to a peer. BFD can quickly detect any link failure and thus reduce network convergencetime.Follow these steps to enable BFD for a BGP peer:To do… Use the command… RemarksEnter system view system-view —