欢迎来到福编程网,本站提供各种互联网专业知识!

Windows设置静态&动态ip的脚本

发布时间:2013-05-09 作者:佚名 来源:互联网
使用netsh设置静态ip地址:@echooffnetshinterfaceipsetaddress"本地连接"static172.24.83.239255.255.255.0172.24.83.247netshinterfaceipsetdns"本地连接"172.24.102.110netshinterfaceipadddns"本地连接"172.24.102.110index=2pause使用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

相关推荐