windows使用netsh设置静态&动态ip的脚本
使用netsh设置静态ip地址:
@echo off
netsh interface ip set address "本地连接" static 172.24.83.239 255.255.255.0 172.24.83.247
netsh interface ip set dns "本地连接" 172.24.102.110
netsh interface ip add dns "本地连接" 172.24.102.110 index=2
pause
使用netsh设置动态ip地址:
@echo off
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
pause
复制代码
代码如下:@echo off
netsh interface ip set address "本地连接" static 172.24.83.239 255.255.255.0 172.24.83.247
netsh interface ip set dns "本地连接" 172.24.102.110
netsh interface ip add dns "本地连接" 172.24.102.110 index=2
pause
使用netsh设置动态ip地址:
复制代码
代码如下:@echo off
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
pause
相关推荐
spartmap 2020-06-10
libowenhit 2020-06-10
atb 2020-05-27
comeonxueRong 2020-05-15
河的第三条岸 2020-05-08
大老张学编程 2020-04-10
80304053 2020-03-28
LUOPING0 2020-03-28
NeverAgain 2020-03-27
zmjzhangmj 2020-02-18
84931231 2020-02-17
shenghua 2013-03-27
LychieFan 2013-07-17
cavenick 2014-12-26
onlykg 2019-12-26
IsanaYashiro 2019-12-15
tycoon 2019-11-27
RayDon 2013-08-11