< Home

snmp-agent trap enable

Function

The snmp-agent trap enable command enables the switch to send traps.

The undo snmp-agent trap enable command restores the default setting.

The default configuration of the snmp-agent trap enable command can be checked by the display snmp-agent trap all command.

Format

snmp-agent trap enable

undo snmp-agent trap enable

Parameters

None.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

  • To enable the trap function for all modules, run the snmp-agent trap enable command.
  • To disable the trap function for all modules, run the snmp-agent trap disable command.
  • To enable the trap function for a specified module, run the snmp-agent trap enable feature-name feature-name command.
  • To disable the trap function for a specified module, run the undo snmp-agent trap enable feature-name feature-name command.
  • To enable a specified trap for a specified module, run the snmp-agent trap enable feature-name feature-name trap-name trap-name command.
  • To disable a specified trap for a specified module, run the undo snmp-agent trap enable feature-name feature-name trap-name trap-name command.
  • To restore the default trap status of all modules, run the undo snmp-agent trap disable or undo snmp-agent trap enable command.

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 traps, you need to 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 traps.

Example

# Enable the switch to send traps.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable
Warning: All switches of SNMP trap/notification will be open. Continue? [Y/N]:y
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >