1 確認打開
service dhcp
2 有衝突地址不記錄
no ip dhcp conflict logging
3 設置排除 可定義2個排除
(cfg)#ip dhcp excluded-address 192.168.0.1 192.168.0.10
4 設置池
(cfg)#ip dhcp pool 名字
(dhcp-cfg)#network 192.168.0.0 /24
(dhcp-cfg)#default-router 192.168.0.1
(dhcp-cfg)#dns-server 192.168.0.1
(dhcp-cfg)#lease 0-23 //分配多少天
排錯
#show ip dhcp binding
//顯示已經分發的IP
#show ip dhcp pool
//顯示地址池
將廣播轉換爲單播
在客戶端的服務器接口寫入
ip help-address DHPC服務器IP