原文連接地址:https://blog.csdn.net/qq_38054198/article/details/77990914spa
靜態設置IP.net
\>netsh interface ip set address name="本地鏈接" source=static addr=192.168.0.106 mask=255.255.255.0xml
\>netsh interface ip set address name="本地鏈接" gateway=192.168.0.1 gwmetric=0blog
\>netsh interface ip set dns name="本地鏈接" source=static addr=202.96.128.66 register=PRIMARY dns
\>netsh -c interface ip dump >c:interface.txtip
\>netsh -f c:interface.txt配置
固然,name=、source=、addr=、mask=、gateway=、gwmetric= 能夠省略,寫成以下形式(必須按照順序)qq
netsh interface ip>set address "本地鏈接" static 211.67.17.120 255.255.255.0 211配置文件
動態設置IPstatic
\>netsh interface ip>set address name="本地鏈接" source=dhcp
刪除IP配置信息(delete address)
\>netsh interface ip>delete address name="本地鏈接" addr=192.168.0.111