导航首页 » 技术教程 » windows使用netsh设置静态&动态ip的脚本
全站头部文字 我要出现在这里
windows使用netsh设置静态&动态ip的脚本 15 2025-08-19   

使用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

ip

!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103