Osk
2018-08-14 19:25:43 +08:00
试试:
管理员身份打开 powershell 或者 cmd
netsh interface show interface
Admin State State Type Interface Name
-------------------------------------------------------------------------
Enabled Connected Dedicated Wi-Fi
Enabled Disconnected Dedicated Ethernet <- 记住需要修改的接口的名称
设置静态 IP 地址:
netsh interface ip set address name=Ethernet source=static address=192.168.1.2 mask=255.255.255.0 gateway=192.168.1.1
netsh interface ip set dns name=Ethernet source=static address=8.8.8.8 register=primary validate=no
netsh interface ip add dns name=Ethernet address=8.8.4.4 validate=no
设置 DHCP 地址:
netsh interface ip set address name=Ethernet source=dhcp
netsh interface ip set dns name=Ethernet source=dhcp
将 name=XXX 改成你计算机的接口名称即可。