Incorrect IP address allocation on S series switch

A DHCP client sends request messages (DHCP Discover) in broadcast mode. If there is more than one DHCP server (private DHCP server) on the same network segment, the clients may obtain IP addresses from unauthorized servers.
In this case, you can configure the DHCP snooping function, so that clients receive DHCP messages and obtain IP addresses only from authorized DHCP servers. Configure the DHCP snooping function as follows:
1. Enable DHCP snooping globally.
[HUAWEI] dhcp enable
[HUAWEI] dhcp snooping enable
2. Configure the interfaces connected to DHCP clients. Perform the configuration on all interfaces connected to DHCP clients. Configuration of interface GE1/0/1 is used as an example.
[HUAWEI] interface gigabitethernet 1/0/1
[HUAWEI-GigabitEthernet1/0/1] dhcp snooping enable
[HUAWEI-GigabitEthernet1/0/1] quit
3. Configure the interface connected to the DHCP server.
[HUAWEI] interface gigabitethernet 1/0/2
[HUAWEI-GigabitEthernet1/0/2] dhcp snooping trusted
[HUAWEI-GigabitEthernet1/0/2] quit
Note:
- For a Layer 2 access switch, steps 1, 2, and 3 are mandatory and need to be performed in sequence.
- For a DHCP relay agent, only steps 1 and 2 are required.

Scroll to top