trap-threshold bad-bytes

Function

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.

Format

trap-threshold bad-bytes trap-threshold interval-second interval

undo trap-threshold bad-bytes

Parameters

Parameter Description Value
trap-threshold

Specifies an alarm threshold.

The value is an integer ranging from 1 to 65535. The default value is 1000.

interval-second interval

Specifies an interval for the system to detect error packets.

The value is an integer that ranges from 1 to 65535.

Views

100GE interface view, 10G LAN interface view, 10G WAN interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE interface view, FlexE interface view, GE optical interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
interface-mgr write

Usage Guidelines

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.

Example

# Restore the default alarm threshold (1,000 bytes) and alarm detection interval (10s) for the inbound bandwidth usage on the interface.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[~HUAWEI-GigabitEthernet0/1/1] undo trap-threshold bad-bytes
# Set the alarm threshold to 900 bytes and the detection interval to 9s on GE 0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[~HUAWEI-GigabitEthernet0/1/1] trap-threshold bad-bytes 900 interval-second 9
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >