The dhcp snooping check dhcp-request enable enables the device to check DHCP messages against the DHCP snooping binding table.
The undo dhcp snooping check dhcp-request enable disables the device from checking DHCP messages against the DHCP snooping binding table.
By default, the device does not check DHCP messages against the DHCP snooping binding table.
In the system view:
dhcp snooping check dhcp-request enable vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
undo dhcp snooping check dhcp-request enable vlan { vlan-id1 [ to vlan-id2 ] } &<1-10>
In the VLAN view and interface view:
dhcp snooping check dhcp-request enable
undo dhcp snooping check dhcp-request enable
Parameter | Description | Value |
---|---|---|
vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> |
Enables the device to check DHCP messages from a specified VLAN against the DHCP snooping binding table. |
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 a DHCP snooping binding table is generated, the device checks DHCP Request and Release messages against the binding table. The device forwards only DHCP messages that match binding entries. This prevents unauthorized users from sending bogus DHCP Request or Release messages to extend or release IP addresses.
The matching rules are as follows:
Prerequisites
DHCP snooping has been enabled on the device using the dhcp snooping enable command.
Precautions
If you run the dhcp snooping check dhcp-request enable command in the VLAN view, the command takes effect for all the DHCP messages received from the specified VLAN. If you run the dhcp snooping check dhcp-request enable command in the interface view, the command takes effect for all the DHCP messages received on the specified interface.