< Home

dhcp snooping alarm dhcp-rate enable

Function

The dhcp snooping alarm dhcp-rate enable command enables the device to generate an alarm when the number of discarded DHCP messages reaches the threshold.

The undo dhcp snooping alarm dhcp-rate enable command disables the device from generating an alarm when the number of discarded DHCP messages reaches the threshold.

By default, the device is disabled from generating an alarm when the number of discarded DHCP messages reaches the threshold.

Format

dhcp snooping alarm dhcp-rate enable [ threshold threshold ]

undo dhcp snooping alarm dhcp-rate enable [ threshold ]

Parameters

Parameter

Description

Value

threshold threshold

Specifies the alarm threshold. If the number of discarded DHCP messages reaches the threshold, an alarm is generated. For details, see the dhcp snooping alarm dhcp-rate threshold.

The value is an integer that ranges from 1 to 1000. The default value is 100.

Views

System view, Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, 100GE interface view, Eth-Trunk interface view, port group view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After DHCP snooping is enabled, the device sends all the received DHCP Request messages and Reply messages to the processing unit. If the rate of sending DHCP messages is high, processing efficiency of the processing unit is affected. After the dhcp snooping check dhcp-rate enable command is run, the device checks the rate of sending DHCP messages. DHCP messages that are sent in a specified rate are sent to the processing unit and those that exceed the rate are discarded.

If the number of discarded DHCP messages reaches the threshold, an alarm is generated. To set the alarm threshold, run the dhcp snooping alarm dhcp-rate threshold command.

If you run the dhcp snooping alarm dhcp-rate enable command in the system view, the command takes effect on all the interfaces of the device. If you run the dhcp snooping alarm dhcp-rate enable command in the interface view, the command only takes effect on the specified interface.

Prerequisites

DHCP snooping has been enabled on the device using the dhcp snooping enable command.

Precautions

To ensure that alarms can be properly reported, you need to run the snmp-agent trap enable feature-name dhcp command to enable the DHCP module to report the corresponding alarm. You can check whether the DHCP module is enabled to report the corresponding alarm using the display snmp-agent trap feature-name dhcp all command.

Example

# In the system view, enable the device to generate an alarm when the number of discarded DHCP messages reaches the threshold.
<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] dhcp snooping enable
[HUAWEI] dhcp snooping check dhcp-rate enable
[HUAWEI] dhcp snooping alarm dhcp-rate enable

# Enable the device to generate an alarm when the number of discarded DHCP messages reaches the threshold on GE0/0/1.

<HUAWEI> system-view
[HUAWEI] dhcp enable
[HUAWEI] dhcp snooping enable
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] dhcp snooping check dhcp-rate enable
[HUAWEI-GigabitEthernet0/0/1] dhcp snooping alarm dhcp-rate enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >