snmp-agent trap enable bgp

Use snmp-agent trap enable bgp to enable SNMP notifications for BGP.

Use undo snmp-agent trap enable bgp to disable SNMP notifications for BGP.

Syntax

snmp-agent trap enable bgp [ instance instance-name ]

undo snmp-agent trap enable bgp [ instance instance-name ]

Default

SNMP notifications for BGP are enabled.

Views

System view

Predefined user roles

network-admin

Parameters

instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command enables SNMP notifications for the default BGP instance.

Usage guidelines

After you enable SNMP notifications for BGP, the device generates a notification when a BGP neighbor state change occurs. The notification includes the neighbor address, the error code and subcode of the most recent error, and the current neighbor state.

For BGP notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see the network management and monitoring configuration guide for the device.

Examples

# Enable SNMP notifications for BGP.

<Sysname> system-view
[Sysname] snmp-agent trap enable bgp