[HUAWEI] dhcp enable			//启动DHCP服务
[HUAWEI] ip pool pool1		//创建DHCP服务池pool1
[HUAWEI-ip-pool-pool1] network 192.168.1.0 mask 24	//地址池空间为192.168.1.0/24
[HUAWEI-ip-pool-pool1] gateway-list 192.168.1.1			//为DHCP客户端分配网关192.168.1.1
[HUAWEI-ip-pool-pool1] dns-list 192.168.1.1					//这DHCP客户端分配DNS192.168.1.1
[HUAWEI-ip-pool-pool1] excluded-ip-address 192.168.1.10 192.168.1.100		//排除192.168.1.10到192.168.1.100的IP
[HUAWEI-ip-pool-pool1] lease day 30			//IP释放为30天
[HUAWEI] int vlanif 10			//DHCP服务对应的接口为g0/0/0
[HUAWEI-Vlanif10] dhcp select interface			//DHCP选择为接口

为客户端分配固定的IP地址,通过mac绑定
[HUAWEI] interface vlanif 100			//进入地址池pool1
[HUAWEI-Vlanif100] dhcp server static-bind ip-address 192.168.1.100 mac-address dcd2-fc96-e4c0		//为macdcd2-fc96-e4c0分配IP(192.168.1.100)
[HUAWEI-Vlanif100] undo dhcp server static-bind ip-address 192.168.1.100		//撤消192.168.1.100的IP绑定