方法一:适合大中型客户端
建立三个批处理文件Autoip.bat,Staticip.bat,Broadbandip.bat!
1\>IP地址固定
2\>IP地址自动获得
3\>宽带IP地址
1\> Staticip.bat
@echo off
@netsh -c interface ip set address name="本地连接" source=static addr=10.10.10.2 mask=255.255.255.0
@netsh -c interface ip set address name="本地连接" gateway=10.10.10.1 gwmetric=0
@netsh -c interface ip set dns name="本地连接" source=static addr=10.10.10.3 register=PRIMARY
@netsh -c interface ip set wins name="本地连接" source=static addr=10.10.10.4
ipconfig /all
2\> Autoip.bat
@echo off
@netsh -c interface ip set address name="本地连接" source=dhcp
@netsh -c interface ip set dns name="本地连接" source=dhcp register=PRIMARY
@netsh -c interface ip set wins name="本地连接" source=dhcp
3\> Broadbandip.bat
@echo off
@netsh -c interface ip set address name="本地连接" source=static addr=192.168.0.1 mask=255.255.255.0
@netsh -c interface ip set address name="本地连接" gateway=none
@netsh -c interface ip set dns name="本地连接" source=none
@netsh -c interface ip set wins name="本地连接" source=none
ipconfig /all
方法二:适合小型客户端
建立三个批处理文件Autoip.bat,Staticip.bat,Broadbandip.bat!
1\>IP地址固定
2\>IP地址自动获得
3\>宽带IP地址
1\> Staticip.bat
@echo off
@netsh interface ip set address "本地连接" source = static addr = 10.10.10.2 mask=255.255.255.0
@netsh interface ip set address "本地连接" gateway = 10.10.10.1 gwmetric =1
@netsh interface ip set dns "本地连接" source = static addr = 10.10.10.3
@netsh interface ip add dns "本地连接" addr=10.10.10.4
ipconfig /all
2\> Autoip.bat
@echo off
@netsh interface ip set address name = "本地连接" source = dhcp
@netsh interface ip set dns "本地连接" source = dhcp
3\> Broadbandip.bat
@echo off
@netsh
-c interface ip set address name="本地连接" source=static addr=192.168.0.1
mask=255.255.255.0
@netsh -c interface ip set address name="本地连接"
gateway=none
@netsh -c interface ip set dns name="本地连接"
source=none
@netsh -c interface ip set wins name="本地连接"
source=none
ipconfig /all
方法三:适合通用客户端
1\> CMD命令行:
netsh dump > company_ip.txt
2\>
CMD命令行:
netsh exec company_ip.txt
Netsh是
Windows
2000/XP/2003操作系统自身提供的命令行脚本实用工具,它允许用户在本地或远程显示或修改当前正在运行的计算机的网络配置。具体的使用可以参考
帮助文档。
阅读(6139) | 评论(0) | 转发(1) |