The snmp-agent trap disable command disables the trap function for all features.
The undo snmp-agent trap disable command restores the trap function for all features to the default status.
The snmp-agent trap enable command enables the device to send trap messages.
The undo snmp-agent trap enable command restores the default trap function.
By default, the display snmp-agent trap all command can be used to view the status of the trap function for all features.
Usage Scenario
The snmp-agent trap enable command must be used together with the snmp-agent target-host inform command or snmp-agent target-host trap command.
To enable a device to send trap messages, run at least the snmp-agent target-host inform command or snmp-agent target-host trap command on the device to specify the destination address of the trap messages.
To enable the trap function for all features, run the snmp-agent trap enable command. To enable the trap function for a specified feature, run the snmp-agent trap enable feature-name command.
To disable the trap function for a specified feature, run the undo snmp-agent trap enable feature-name command.
Precautions
The snmp-agent trap enable command and the related commands are used in the following scenarios: