[Huawei]dhcp enable 开启DHCP服务
[Huawei]dhcp snooping enable 开启dhcp snooping服务
[Huawei]port-group group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/2 将G0/0/1~G0/0/24端口加入端口组
[Huawei-port-group]dhcp snooping enable 批量开启端口snooping
[Huawei-port-group]quit 退出端口组
[Huawei]interface GigabitEthernet 0/0/1 进入G0/0/1端口(上行端口)
[Huawei-GigabitEthernet0/0/1]undo dhcp snooping enable 删除端口snooping服务
[Huawei-GigabitEthernet0/0/1]dhcp snooping trusted 开启端口信任,只有这个端口分配的IP地址才会接受
查看端口DHCP信息:display dhcp snooping configuration