使用netsh命令導出dhcp服務器已有的地址為文本文件
netsh dhcp server 192.168.0.130 scope 192.168.120.0 dump > c:\dhcpd.txt
這里的server 192.168.0.130表示dhcp服務器地址,scope表示作用域。
編輯dpcpd.txt文件添加對應的IP、MAC、保留名,然后再執行netsh -f c:\dhcpd.txt導入保留地址。
再或者直接使用命令來添加
netsh dhcp server 192.168.0.130 scope 192.168.120.0 add reservedip 192.168.120.111 000000000000 test
后面依次是ip地址、mac地址、保留名