DHCP保留地址批量导入导出

使用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地址、保留名

 

 
posted @ 2019-09-28 15:09  风过留峰  阅读(2543)  评论(0编辑  收藏  举报