The dhcp snooping check enable command enables DHCP check.
The undo dhcp snooping check enable command disables DHCP check.
The dhcp snooping alarm threshold command configures an alarm threshold for the number of dropped ARP packets, IP packets, DHCP reply packets (received on the untrusted interface), and DHCP request packets in a VLAN. In addition, you can configure the percentage threshold for the maximum number of DHCP snooping users.
The undo dhcp snooping alarm threshold command restores the default setting.
The dhcp check chaddr enable command enables CHADDR field check for the VLAN.
The undo dhcp check chaddr enable command disables CHADDR field check for the VLAN.
By default:
dhcp { { snooping check { dhcp-request | arp | ip } } enable | snooping alarm { { dhcp-chaddr | dhcp-request | dhcp-reply | arp | ip } { enable | threshold threshold-value } | user-limit { enable | threshold threshold-value } } }
dhcp check chaddr enable
undo dhcp { { snooping check { dhcp-request | arp | ip } } enable | snooping alarm { dhcp-chaddr | dhcp-request | dhcp-reply | arp | ip | user-limit } { enable | threshold } }
undo dhcp check chaddr enable
Parameter | Description | Value |
---|---|---|
dhcp-request |
dhcp-request following snooping alarm specifies the alarm threshold for the number of discarded DHCP Request messages for extending IP address leases that do not match the DHCP snooping binding table. |
- |
arp |
arp following snooping alarm specifies the alarm threshold for the number of discarded ARP packets that do not match the binding table. |
- |
ip |
Specifies the alarm threshold for the IP packets that do not match the binding table. |
- |
dhcp-chaddr |
Indicates the alarm threshold for the number of dropped DHCP packets with the client hardware address (CHADDR) field value mismatching the source MAC address in the Ethernet frame header. |
- |
dhcp-reply |
Indicates the alarm threshold for discarded DHCP reply packets received on untrusted interfaces. |
- |
threshold threshold-value |
Specifies the alarm threshold. |
The alarm threshold for the number of dropped packets on a Layer 3 interface ranges from 1 to 1000. The default value is 100. The percentage threshold for the maximum number of DHCP snooping users ranges from 1 to 100. The default value is 100. |
user-limit |
Indicates the alarm threshold for the maximum DHCP snooping users. |
- |
chaddr |
Indicates the source MAC address of DHCP packets. Checks whether the CHADDR field value in a DHCP packet matches the MAC address in the packet header. |
- |
Usage Scenario
You can configure the following check functions in DHCP snooping applications:
Prerequisites
Precautions
If the maximum number of DHCP snooping users is set to n and the percentage threshold for the maximum number of DHCP snooping users is set to m, when the number of users in the VLAN reaches n×m, an alarm is generated. When the number of users in the VLAN reaches n×m+1, however, no more alarm is generated. Only when the user lease expires or users proactively release IP addresses, the number of users in the VLAN falls below nxm. When the number of users reaches nxm again, an alarm is generated.
You can change the current percentage threshold by configuring a new value. Only the current setting takes effect.<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] interface GigabitEthernet 0/1/24 [*HUAWEI-GigabitEthernet0/1/24] dhcp snooping enable [*HUAWEI-GigabitEthernet0/1/24] dhcp check chaddr enable
<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] interface GigabitEthernet 0/1/25 [*HUAWEI-GigabitEthernet0/1/25] dhcp snooping enable [*HUAWEI-GigabitEthernet0/1/25] dhcp snooping max-user-number 3000 [*HUAWEI-GigabitEthernet0/1/25] dhcp snooping alarm user-limit enable [*HUAWEI-GigabitEthernet0/1/25] dhcp snooping alarm user-limit threshold 50