windows中用命令行修改ip和dns的方法
修改IP的命令格式:
netsh interface ip set address "网络连接" static IP地址 子网掩码 默认网关 跳数
其中的 跳数 一般取1或auto
举例:
netsh interface ip set address "WAN" static 10.8.176.180 255.255.254.0 10.8.176.254 auto
修改DNS的命令格式:
netsh interface ip set dns "网络连接" static DNS地址
举例:
netsh interface ip set dns "WAN" static 8.8.8.8