使用CMD命令设置IP

 

使用CMD命令设置IP,将下面文本保存为bat文件后执行

 

netsh interface ip set address name="本地连接" source=static addr=192.168.1.40 mask=255.255.255.0 gateway=192.168.1.2

netsh interface ip set dns name="本地连接" source=static addr=218.85.157.99 register=PRIMARY

netsh interface ip add dns name="本地连接" addr=218.85.152.99 index=2

@ECHO OFF


pause
EXIT

 

posted @ 2015-08-04 19:10  zzljh  阅读(930)  评论(0编辑  收藏  举报