The trap-threshold bad-bytes command configures an alarm threshold for the number of bytes in corrupted packets that an interface receives and an interval for the system to monitor corrupted packets.
The undo trap-threshold bad-bytes command restores the default configurations.
By default, the alarm threshold is 1000 bytes, and the detection interval is 10s.
Usage Scenario
When an interface receives a large number of corrupted packets frequently, the link quality is poor and cannot ensure reliable transmission for normal services. To monitor the link quality, run the snmp-agent trap enable port bad-bytes command to enable the alarm function for byte threshold crossing in corrupted packets, and then run the trap-threshold bad-bytes command to set an alarm threshold and detection interval. After this configuration is performed, the device monitors the number of bytes in corrupted packets on the interface at the specified detection interval. When the number of bytes in corrupted packets received by the interface reaches the specified threshold for three consecutive detection intervals, the link quality is poor. Only in this case, the device generates an alarm and sends it to an NMS so that the administrator can be instructed to maintain the interface and troubleshoot the fault. The device sends a clear alarm to the NMS to inform the administrator that the fault is rectified only when the number of bytes in corrupted packets received by the interface falls below the specified threshold for three consecutive detection intervals.
Prerequisites
The alarm function has been enabled using the snmp-agent trap enable port bad-bytes command in case that the number of bytes in corrupted packets reaches an alarm threshold.
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1 [~HUAWEI-GigabitEthernet0/1/1] undo trap-threshold bad-bytes
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1 [~HUAWEI-GigabitEthernet0/1/1] trap-threshold bad-bytes 900 interval-second 9