< Home

snmp-agent trap enable feature-name lldptrap

Function

The snmp-agent trap enable feature-name lldptrap command enables the LLDP trap function on the device.

The undo snmp-agent trap enable feature-name lldptrap command disables the LLDP trap function on the device.

By default, the LLDP trap function is enabled.

Format

snmp-agent trap enable feature-name lldptrap [ trap-name { hwlldpdisabled | hwlldpenabled | hwlldplocmanipaddrchange | hwlldprateexcessive | lldpremtableschange } ]

undo snmp-agent trap enable feature-name lldptrap [ trap-name { hwlldpdisabled | hwlldpenabled | hwlldplocmanipaddrchange | hwlldprateexcessive | lldpremtableschange } ]

Parameters

Parameter

Description

Value

trap-name

Enables or disables the trap function for the specified event.

-

hwlldpdisabled

Sends a Huawei proprietary trap when the LLDP function is disabled globally.

-

hwlldpenabled

Sends a Huawei proprietary trap when the LLDP function is enabled globally.

-

hwlldplocmanipaddrchange

Sends a Huawei proprietary trap when the LLDP management address of the device changes.

-

hwlldprateexcessive

Sends a Huawei proprietary trap when the rate of LLDPDUs received by an interface exceeds the alarm threshold.

The alarm threshold is 5. That is, a trap is sent if more than 5 LLDPDUs are received by an interface within one second.

-

lldpremtableschange

Sends a trap when LLDP neighbor information changes.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

To enable the device to send traps when the LLDP status changes, run the snmp-agent trap enable feature-name lldptrap command.

Prerequisites

A reachable route exists between the device and the NMS, and the SNMP parameters are set.

Configuration Impact

After the LLDP trap function is enabled, the device sends traps to the NMS in one of the following cases:
  • The LLDP function is enabled or disabled globally.
  • The local management address changes.
  • The rate of LLDPDUs received by an interface exceeds the alarm threshold.
  • A neighbor is added, deleted, discarded, or aged out.

Precautions

The LLDP trap function applies to all interfaces.

If the network topology is unstable, disable the LLDP trap function to prevent frequent trap sending.

To set the interval between sending neighbor change traps to the NMS, run the lldp trap-interval command. If neighbor information changes frequently, extend the interval to reduce the number of traps.

Example

# Enable the LLDP trap function on the device.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name lldptrap
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic