Windows CMD命令行批处理修改DNS地址

原文:http://www.5x54.com/article/html/201010/28100225.html

假设要修改网卡“本地连接”的DNS地址,方法如下: 

修改主DNS地址为“192.168.1.1”: 

netsh interface ip set dns name="本地连接" source=static addr=192.168.1.1

修改备用DNS地址为“202.96.209.133”: 

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

 如果要重置DNS,将IP改为空即可,例如:

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

猜你喜欢

转载自aigo.iteye.com/blog/2279331