Usage Scenario
In the VLAN view, this command is only used to configure the alarm threshold for the maximum number of dropped packets in a VLAN and the percentage threshold for the maximum number of DHCP snooping users.
The configuration of the alarm threshold for dropped packets in a VLAN can be one of the following situations:
- If no alarm threshold is configured for the VLAN, the globally configured default value is used as the alarm threshold of the VLAN. You can change the default value by configuring an alarm threshold globally.
- If an alarm threshold is configured for a VLAN, the configured threshold takes effect.
Before configuring the percentage threshold for the maximum number of DHCP snooping users in the VLAN view, run the following commands:
- Run the dhcp snooping enable command in the system view to enable DHCP snooping globally.
- Run the dhcp snooping max-user-number command in the VLAN view to configure the maximum number of DHCP snooping users.
- Run the dhcp snooping alarm enable command in the VLAN view to enable DHCP snooping alarm.
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.
Precautions
When an interface is added to a VLAN not using default, trunk, VLAN-stacking, or VLAN-mapping mode, delete the configured alarm threshold in the VLAN and interface views.