注意:以下命令要以管理员身份运行 cmd
修改自动获取 IP 和 DNS:
netsh interface ip set address name="以太网" source=dhcp
netsh interface ip set dns name="以太网" source=dhcp
“以太网”
是网卡适配器的名字,譬如我电脑上有名为 WLAN
和 以太网
的两个网络适配器,我这里选择修改 以太网
这个网卡的 IP。
手动指定 IP 和 DNS:
netsh interface ip set address name="以太网" static 192.168.100.100 255.255.255.0 192.168.100.1
netsh interface ip set dns name="以太网" static 111.111.111.1
标签:set,netsh,更改,IP,interface,ip,win10,以太网 From: https://www.cnblogs.com/wztshine/p/17441559.html第一条命令有三个地址,分别代表:IP 地址、子网掩码、默认网关
第二条命令的地址,代表:DNS 服务器地址