The dhcp snooping max-user-number command sets the maximum number of DHCP snooping binding entries to be learned on an interface.
The undo dhcp snooping max-user-number command restores the default maximum number of DHCP snooping binding entries to be learned on an interface.
By default, the maximum number of DHCP snooping binding entries that can be learned on an interface is 512 for S2720-EI, 2048 for S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5720I-SI, S5720S-SI, S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, and S6720S-SI, and 8192 for other models.
In the system view:
dhcp snooping max-user-number max-user-number [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]
undo dhcp snooping max-user-number [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ]
In the VLAN view and interface view:
dhcp snooping max-user-number max-user-number
undo dhcp snooping max-user-number
Parameter |
Description |
Value |
---|---|---|
max-user-number |
Specifies the maximum number of DHCP snooping binding entries that can be learned on an interface. |
The value is an integer that ranges from 1 to 512 for S2720-EI, from 1 to 2048 for S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5720I-SI, S5720S-SI, S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI and S6720S-SI, and from 1 to 8192 for other models. NOTE:
If the maximum number of DHCP snooping binding entries to be learned by interfaces is N in the system or VLAN view, for a stack, the value in system view and VLAN view ranges from 1 to N * Number of stacked devices. That is, by default, a maximum of N * Number of stacked devices DHCP users are allowed to access the entire device or VLAN. A stack consisting of S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, S5720I-SI, S5720S-SI, S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, S6720S-SI, S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731S-H, S5731-S, S5731S-S, S6720-EI, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6720-HI, and S6720S-EI can learn a maximum of 9216 DHCP snooping binding entries. For example, when two S5720-HI switches set up a stack, the stack can learn a maximum of 8192 DHCP snooping binding entries globally and in VLANs by default. When three S5720-HI switches set up a stack, the stack can learn a maximum of 9216 DHCP snooping binding entries globally and in VLANs by default. |
vlan { vlan-id1 [ to vlan-id2 ] } |
Specifies the maximum number of DHCP snooping binding entries can be learned in a VLAN.
|
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
The dhcp snooping max-user-number command sets the maximum number of DHCP snooping binding entries to be learned on an interface. If the number of DHCP snooping binding entries reaches the maximum value, subsequent users cannot access.
When the command is executed in the system view, the value specified in this command is the total number of DHCP snooping binding entries to be learned by all interfaces on the device. If you run the dhcp snooping max-user-number command in the VLAN view, the command takes effect on all the interfaces in the VLAN. If you run the dhcp snooping max-user-number command in the system view, VLAN view, and the interface view, the smallest value takes effect.
Prerequisites
DHCP snooping has been enabled on the device using the dhcp snooping enable command.
Precautions
# Set the maximum number of DHCP users to 100 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 enable [HUAWEI-GigabitEthernet0/0/1] dhcp snooping max-user-number 100
# Set the maximum number of DHCP users in VLAN 100 to 100.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable [HUAWEI] vlan 100 [HUAWEI-vlan100] dhcp snooping enable [HUAWEI-vlan100] dhcp snooping max-user-number 100