操作系统 
首页 > 操作系统 > 浏览文章

windows使用netsh设置静态&动态ip的脚本

(编辑:jimmy 日期: 2024/9/30 浏览:3 次 )
使用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
上一篇:Win8系统中没有声音问题的排查方法
下一篇:windows7为移动设备设置wifi热点(笔记本需开启无线发射接收)