CMD命令下修改和查看IP地址,DNS,网关

设置IP,DNS,以及网关

>netsh interface ip set address name="本地连接" source=static addr=192.168.132.5 mask=255.255.255.0
>netsh interface ip set address name="本地连接" gateway=192.168.132.1 gwmetric=0
>netsh interface ip set dns name="本地连接" source=static addr=192.168.132.1 register=PRIMARY
>netsh interface ip set wins name="本地连接" source=static addr=none

查看IP,DNS,以及网关

 

>netsh interface ip show address

CMD命令下修改和查看IP地址,DNS,网关_第1张图片 

单独查看IP:

cmd中:ipconfig

 

CMD命令下修改和查看IP地址,DNS,网关_第2张图片

你可能感兴趣的:(记录)