< Home

snmp-agent trap type

Function

The snmp-agent trap type command configures the device to send ENTITYTRAP traps or BASETRAP traps.

The undo snmp-agent trap type command restores the default configuration.

By default, the device sends BASETRAP traps.

Format

snmp-agent trap type { base-trap | entity-trap }

undo snmp-agent trap type

Parameters

Parameter Description Settings
base-trap Configures the device to send BASETRAP traps. -
entity-trap Configures the device to send ENTITYTRAP traps. -

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

There are two types of traps for the hardware of the switch: BASETRAP and ENTITYTRAP.
  • The BASETRAP traps are sent when faults occur, so they are classified based on fault types. For example, the same BASETRAP trap is sent when a Power Module or a fan is removed.
  • The ENTITYTRAP traps are classified based on hardware types. For example, different ENTITYTRAP traps are sent when a Power Module is removed and when a fan is removed.
The functions of the two types of traps are similar. Select one type of traps based on your requirements.

Precautions

The following conditions must be met; otherwise, the device does not send BASETRAP traps to the NMS:
  • The trap type is set to base-trap using the snmp-agent trap type command.
  • The BASETRAP trap function is enabled.
The following conditions must be met; otherwise, the device does not send ENTITYTRAP traps to the NMS:
  • The trap type is set to entity-trap using the snmp-agent trap type command.
  • The ENTITYTRAP trap function is enabled.

Example

# Configure the device to send BASETRAP traps.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap type base-trap
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >