The trap-threshold command sets the inbound and outbound bandwidth usage thresholds for generating a trap.
The undo trap-threshold command restores the default inbound and outbound bandwidth usage thresholds for generating a trap.
The default inbound or outbound bandwidth usage threshold for generating a trap is 80.
trap-threshold { input-rate | output-rate } bandwidth-in-use [ resume-rate resume-threshold ]
undo trap-threshold { input-rate | output-rate }
Parameter | Description | Value |
---|---|---|
input-rate |
Indicates inbound bandwidth. |
- |
output-rate |
Indicates outbound bandwidth. |
- |
bandwidth-in-use |
Specifies the bandwidth usage threshold for generating a trap. |
The value is an integer that ranges from 1 to 100. |
resume-rate resume-threshold |
Specifies the bandwidth usage threshold for clearing a trap. |
The value is an integer that ranges from 1 to bandwidth-in-use. The default value is bandwidth-in-use. |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE interface view
Usage Scenario
Monitoring bandwidth usage helps you know current load on a device. If the bandwidth usage exceeds a threshold, bandwidth resources are insufficient and the device capacity needs to be expanded. For example, if the bandwidth usage exceeds 95%, an alarm is generated, indicating that bandwidth resources are almost exhausted. As a result, some services may be interrupted before device capacity expansion.
You can configure two thresholds: low threshold (log threshold) and high threshold (alarm threshold). The system generates a log when the bandwidth usage exceeds the low threshold and generates an alarm when the bandwidth usage exceeds the high threshold. This configuration ensures that you can expand the device capacity in advance to avoid service interruptions caused by bandwidth exhaustion.
Outbound bandwidth usage = (Outbound interface rate/Outbound physical interface bandwidth) x 100
Inbound bandwidth usage = (Inbound interface rate/Inbound physical interface bandwidth) x 100
The interface rate and bandwidth are expressed in bits per second.
To set a lower threshold, run the log-threshold command.
If the offset between the value of bandwidth-in-use and the value of resume-threshold is too small, trap information may be frequently displayed.
The log threshold must be lower than the trap threshold, providing efficient protection for services. For example, when the inbound bandwidth usage reaches 80%, a log is generated. If the inbound bandwidth usage continues to increase and reaches 95%, a trap is generated. This ensures that a log is generated for inbound bandwidth usage of 80%, and a trap is generated for inbound bandwidth usage of 95%. Either the log or the trap prompts for a bandwidth increase, preventing service interruption.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] trap-threshold output-rate 60
# Configure GE0/0/1 to generate a trap when the outbound bandwidth usage exceeds 80% and clear the trap when the outbound bandwidth usage falls below 60%.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] trap-threshold output-rate 80 resume-rate 60