< Home

trap-threshold threshold

Function

The trap-threshold threshold command sets the alarm threshold for the number of discarded packets on an interface due to a congestion.

The undo trap-threshold threshold command restores the default alarm threshold for the number of discarded on an interface due to a congestion.

By default, the alarm threshold for the number of discarded packets on an interface due to a congestion is 3000.

Format

trap-threshold { input-discard | output-discard } threshold threshold-value

undo trap-threshold { input-discard | output-discard } threshold

Parameters

Parameter Description Value

input-discard

Enables the function of reporting an alarm if incoming packets are discarded on an interface due to a congestion.

-

output-discard

Enables the function of reporting an alarm if outgoing packets are discarded on an interface due to a congestion.

-

threshold-value

Specifies the alarm threshold for the number of discarded packets on an interface due to a congestion.

The value is an integer that ranges from 100 to 4294967295.

Views

Ethernet interface view, GE interface view, XGE interface view, MultiGE interface view, 25GE interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

Network congestion during service transmission may cause packet loss. If a lot of packets are discarded, services are affected. To improve transmission quality of service flows, you need to enable the device to report alarms to notify users of the current network status if the number of packets discarded due to a congestion in a period of time reaches the specified limit. In this case, you can run the trap-threshold threshold command to flexibly adjust the alarm threshold for the number of discarded packets on an interface due to a congestion based on actual service situations. Such alarms help you know the congestion on the interface. You can determine whether to increase the bandwidth or cancel the bandwidth limit on the interface based on the logs. In this way, the congestion problem can be solved.

Precautions

After this command is run, only the interval for reporting an alarm if packets are discarded on an interface due to a congestion is set. The corresponding alarm is triggered only after the function of reporting an alarm if packets are discarded on an interface due to a congestion is enabled using the trap-threshold enable command and the number of discarded packets on the interface within a specified period of time reaches the alarm threshold.

If this command is executed multiple times, only the latest configuration takes effect.

Example

# Set the alarm threshold for the number of discarded incoming packets on XGE0/0/1 due to a congestion to 200.

<HUAWEI> system-view
[HUAWEI] interface XGigabitEthernet 0/0/1
[HUAWEI-XGigabitEthernet0/0/1] trap-threshold input-discard threshold 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >