批处理更改 ip地址

来源:互联网 发布:使用bat运行java程序 编辑:程序博客网 时间:2024/04/30 00:21

http://zhidao.baidu.com/question/55642136.html&__bd_tkn__=62a84d23312d9f305623ae7ca5a233fd8f028de78078338d51fed8133ea5c69d362ad36bb4bcda3b39bb3949f6bbe47087ac3af56e60b1f4e7eb60157d59fb369f66aafe40491fc7006f310da437b07f4e0293700d58b9ffd63e4574072d4621c8600e4740c7d9ad9f07eabbc9da890bc93724f04f


效果图片:



代码:

echo start---netsh interface ip set address name="本地连接"   source = static addr = 172.16.58.102  mask=255.255.255.0     netsh interface ip set address  name="本地连接" gateway = 172.16.58.253 gwmetric =0netsh interface ip set dns name="本地连接" source = static  addr = 192.168.2.17 register=PRIMARYnetsh interface ip add dns name="本地连接" addr = 192.168.0.3 index=2echo end---pause



保存其内容为.bat格式即可。