The dhcp snooping max-user-number command configures the maximum number of DHCP snooping users in a specified VLAN or on an interface in a VLAN.
The undo dhcp snooping max-user-number command cancels the configuration.
By default, a maximum of 4096 DHCP clients are permitted to access in a VLAN or on an interface in a VLAN.
Parameter | Description | Value |
---|---|---|
max-user-number |
Indicates the maximum number of users. |
The value is a decimal integer ranging from 1 to 4096. |
interface interface-type interface-number |
Specifies the type and number of an interface. The supported interface types are Ethernet, GE, and Eth-Trunk. |
- |
Usage Scenario
When entries in the DHCP snooping binding table that is dynamically generated reach the maximum limit, no user can obtain an IP address.
To prevent malicious IP address application, you can configure the maximum number of users either in a VLAN or on the specified interface of a VLAN. The user can change the maximum number of DHCP snooping users. Only the current setting takes effect.Prerequisites
Before running this command, run the dhcp snooping enable command in the system view to enable DHCP snooping globally.
<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] vlan 100 [*HUAWEI-vlan100] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] portswitch [*HUAWEI-GigabitEthernet0/1/0] port default vlan 100 [*HUAWEI-GigabitEthernet0/1/0] quit [*HUAWEI] vlan 100 [*HUAWEI-vlan100] dhcp snooping enable [*HUAWEI-vlan100] dhcp snooping max-user-number 200 interface GigabitEthernet 0/1/0