要將指定適配器的靜態(tài)地址切換為 DHCP 地址翎蹈,請鍵入以下命令:?
netsh interface ip set address "本地連接" dhcp
注意:鍵入此命令會將名為"本地連接"的接口更改為 DHCP淮菠。?
要顯示計算機(jī)中的所有適配器及其當(dāng)前 IP 地址,以確定正確的適配器名稱荤堪,請鍵入以下命令:?
Netsh interface ip show config
要更改為靜態(tài)地址合陵,請鍵入以下命令:?
netsh interface ip set address "本地連接" static IP 掩碼 網(wǎng)關(guān) 躍點(diǎn)數(shù)
如:
netsh interface ip set address "本地連接" static 192.168.0.10 255.255.255.0 192.168.0.1 1
更改DNS為192.168.0.1:
netsh interface ip set DNS??"本地連接" static 192.168.0.1
刪除網(wǎng)關(guān):
netsh interface ip delete address "本地連接" gateway=all
刪除DNS:
netsh interface ip delete dns "本地連接" all
如果執(zhí)行配置時提示"指定了無效的接口",則請您開啟系統(tǒng)的"Remote Registry Service"服務(wù)澄阳。
控制面板-->管理工具-->服務(wù)-->開啟Remote Registry Service