The dhcp snooping check enable command enables DHCP check for a VLAN.
The undo dhcp snooping check enable command disables DHCP check for a VLAN.
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, the function of DHCP check is disabled, after DHCP snooping is enabled, all interfaces are untrusted interfaces.
Parameter | Description | Value |
---|---|---|
dhcp-request |
Indicates that DHCP request packets are matched against the binding table. |
- |
ip |
Indicates that IP packets are matched against the binding table. |
- |
arp |
Indicates that ARP packets are matched against the binding table. |
- |
chaddr |
Indicates that the client hardware address (CHADDR) field value is matched against the MAC address in the Ethernet frame header. |
- |
Usage Scenario
You can configure the following check functions in DHCP snooping applications:
Prerequisites
DHCP snooping has been enabled globally by running the dhcp snooping enable command.
Precautions
After DHCP snooping is enabled, all interfaces are untrusted by default.
When DHCP snooping is disabled, all interfaces are trusted by default. If an interface is changed from untrusted to trusted, the dynamic DHCP snooping binding table is deleted from the interface.<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] vlan 10 [*HUAWEI-vlan10] dhcp snooping enable [*HUAWEI-vlan10] dhcp snooping check arp enable
<HUAWEI> system-view [~HUAWEI] dhcp snooping enable [*HUAWEI] vlan 100 [*HUAWEI-vlan100] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] portswitch [*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