The dhcp snooping apply packet whitelist command applies a whitelist to DHCP packets for DHCP snooping.
The undo dhcp snooping apply packet whitelist command cancels a whitelist for DHCP packets.
By default, no whitelist is applied, and packets are not filtered based on whitelist rules.
Usage Scenario
DHCP snooping whitelist is used on the AC and network sides of the UPE to filter DHCP packets to be sent to the CPU. After a whitelist is created and whitelist rules are configured, run the dhcp snooping apply packet whitelist command to apply the whitelist to DHCP packets. Only DHCP packets listed in the whitelist are sent to the CPU, and the DHCP packets not listed in the whitelist are simply forwarded. This protects the device against attacks.
Prerequisites
The whitelist rules have been configured using the dhcp packet-rule command.
Precautions
Note the following when applying a whitelist:
<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] dhcp snooping packet whitelist whitelist1 [*HUAWEI-dhcpsnp-whitelist-whitelist1] dhcp packet-rule 1 source-ip 1.1.1.1 255.255.255.0 [*HUAWEI-dhcpsnp-whitelist-whitelist1] commit [~HUAWEI-dhcpsnp-whitelist-whitelist1] quit [~HUAWEI] dhcp snooping apply packet whitelist whitelist1