The dhcp snooping check dhcp-rate enable command enables the device to check the rate of sending DHCP messages to the processing unit.
The undo dhcp snooping check dhcp-rate enable command disables the device from checking the rate of sending DHCP messages to the processing unit.
By default, the device does not check the rate of sending DHCP messages to the processing unit.
In the system view:
dhcp snooping check dhcp-rate enable [ rate ] [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]
undo dhcp snooping check dhcp-rate enable [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]
In the VLAN view and interface view:
dhcp snooping check dhcp-rate enable [ rate ]
undo dhcp snooping check dhcp-rate enable
Parameter | Description | Value |
---|---|---|
rate |
Specifies the maximum rate of sending DHCP messages to the processing unit. For the function of rate, see the command dhcp snooping check dhcp-rate. |
The value ranges from 1 to 100, in pps. The default value is 100. |
vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> |
Enables the device to check the rate of sending DHCP messages from a specified VLAN to the processing unit.
If this parameter is not specified, the command takes effect on all the DHCP messages. |
The value is an integer that ranges from 1 to 4094. |
System view, VLAN 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
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 device is enabled to check the rate of sending DHCP messages to the processing unit, DHCP messages that exceed the specified rate are discarded.
The default maximum rate of sending DHCP messages is 100 pps. To set the maximum rate, run the dhcp snooping check dhcp-rate command.
Prerequisites
DHCP snooping has been enabled on the device using the dhcp snooping enable command.
# In the system view, enable the device to check the rate of sending DHCP messages to the processing unit.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable [HUAWEI] dhcp snooping check dhcp-rate enable
# In VLAN 10, enable the device to check the rate of sending DHCP messages to the processing unit.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable [HUAWEI] vlan 10 [HUAWEI-vlan10] dhcp snooping enable [HUAWEI-vlan10] dhcp snooping check dhcp-rate enable