On the Layer 2 access device or the first DHCP relay device, configure DHCP snooping to prevent the device from obtaining an IP address from a pseudo DHCP server.

-
For a Layer 2 access device, steps 1-3 are mandatory. Configure this function in sequence.
-
For a DHCP relay device, only steps 1 and 2 are mandatory.
-
Enable DHCP snooping globally.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable
-
Enable DHCP snooping on the interface connected to the DHCP client (configuring all interfaces connected to the DHCP client and using GE1/0/1 as an example).
[HUAWEI] interface gigabitethernet 1/0/1 [HUAWEI-GigabitEthernet1/0/1] dhcp snooping enable [HUAWEI-GigabitEthernet1/0/1] quit
-
Configure the interface connected to the DHCP server as a trusted interface.
[HUAWEI] interface gigabitethernet 1/0/2 [HUAWEI-GigabitEthernet1/0/2] dhcp snooping trusted [HUAWEI-GigabitEthernet1/0/2] quit
More Information: S Series Switches Common Operation Guide