使用命令: netsh interface ip set address "本地连接" dhcp netsh interface ip set dns "本地连接" dhcp
代码如下: netsh interface ip set address "本地连接" dhcp 确定。
netsh interface ip set dns "本地连接" dhcp 确定。
相当于操作:
将ip和dns设置为固定的值
使用命令: netsh interface ip set address "本地连接" static [ip地址] [子网掩码] [网关] [网关跳远点数:一般填1] netsh interface ip set dns "本地连接" static [dns地址] 代码如下: netsh interface ip set address "本地连接" static 192.168.1.111 255.255.255.0 192 .168.1.1 1 确定。
netsh interface ip set dns "本地连接" static 8.8.8.8 确定。