The dhcp snooping enable command enables DHCP snooping.
The undo dhcp snooping enable command disables DHCP snooping.
The dhcp snooping trusted interface command configures an interface in a VLAN as a trusted interface.
The undo dhcp snooping trusted interface command restores the default configuration.
By default:
Usage Scenario
To enable DHCP snooping, run the dhcp snooping enable command. Enable DHCP snooping in the following order: globally, for a VLAN, for a BD, and for an interface. You can configure DHCP snooping functions only after DHCP snooping is enabled globally.
Bogus DHCP servers may send incorrect IP addresses to DHCP clients. As a result, DHCP clients cannot obtain services. To resolve this problem, enable DHCP snooping and configure interfaces connected to legitimate DHCP servers trusted. The other interfaces are untrusted by default. The device discards the DHCP reply packets received from untrusted interfaces to prevent bogus DHCP server attacks. If no interface is specified, all VLAN interfaces are trusted. As a result, dynamic binding tables cannot be generated on these interfaces.Prerequisites
DHCP snooping has been enabled globally by running the dhcp snooping enable command.
The interface is added to the specified VLAN.Configuration Impact
The undo dhcp enable command disables DHCP snooping. However, related configurations are not deleted.
When DHCP snooping is enabled, all interfaces are in untrusted mode by default. To configure an interface as a trusted interface, perform one of the following operations:Precautions
<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] vlan 100 [*HUAWEI-vlan100] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*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 trusted interface GigabitEthernet 0/1/0