snmp-agent trap enable

Syntax

snmp-agent trap enable [ configuration | flash | standard [ authentication | coldstart | linkdown | linkup | warmstart ]* | stp [ tc ] | system ]

undo snmp-agent trap enable [ configuration | flash | standard [ authentication | coldstart | linkdown | linkup | warmstart ]* | stp [ tc ] | system ]

View

System view

Default level

3: Manage level

Parameters

configuration: Enables the sending of configuration traps.

flash: Enables the sending of Flash-related traps.

standard: Standard traps.

stp [ tc ]: Enables the device to generate logs and report PVST topology changes to SNMP when the device detects topology changes or receives a TCN BPDU. For the event 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.

system: Sends HH3C-SYS-MAN-MIB (a private MIB) traps.

Description

Use the snmp-agent trap enable command to enable the trap function globally.

Use the undo snmp-agent trap enable command to disable the trap function globally.

By default, the trap function is enabled.


[NOTE: ]

NOTE:

  • To make each module generate corresponding traps, enable the trap function with the snmp-agent trap enable command. The generation of traps by a module may also depend on the configuration of the module. For more information, see related descriptions of the modules.

  • To enable an interface to generate Linkup/Linkdown traps when its state changes, enable the linkUp/linkDown trap function on the interface and globally. To enable this function on an interface, use the enable snmp trap updown command. To enable this function globally, use the snmp-agent trap enable [ standard [ linkdown | linkup ] * ] command.


  • Related commands: snmp-agent target-host, enable snmp trap updown.

    Examples

    # Enable the device to send SNMP authentication failure packets to 10.1.1.1, using the community name public.

    <Sysname> system-view
    [Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
    [Sysname] snmp-agent trap enable standard authentication