脚本修改ip地址,dns
原创
©著作权归作者所有:来自51CTO博客作者程序猿的杂货店的原创作品,请联系作者获取转载授权,否则将追究法律责任
@echo off
cls
color 0a
@echo ********************************************************
@echo ******* 修改网络配置 *******
@
echo ********************************************************
@echo 正在更改本机IP地址...
netsh interface ipv4 set address name="本地连接" source=static addr=172.17.235.25 mask=255.255.255.192 gateway=172.17.235.1
@echo 正在添加本机首选DNS服务器...
netsh interface ip set dns "本地连接" source=static addr=202.120.190.208
@echo 正在添加备用DNS服务器...
netsh interface ipv4 add dns name="本地连接" addr=172.17.249.42
@echo 检查当前本机配置...
ipconfig /all
pause