win10下自动切换ip脚本

由于需要经常切换ip地址,每次都手动去切换很麻烦,于是写了个自动切换ip的bat,分享出来,大家可以根据自己的实际情况来对脚本进行修改来方便自己使用:



@echo off
:start
echo 1、在网管中心装逼
echo 2、在5楼装逼
echo 3、在所有地方自由的装逼
set /P var="请输入你装逼的地点:"
if %var%==1 goto ip1
if %var%==2 goto ip2
if %var%==3 goto ip3
:ip1
cls
netsh interface ip set address name="以太网" source=static 
10.147.82.96 255.255.255.192 10.147.82.65
netsh interface ip set dns "以太网" static 10.147.13.99
echo **在网管中心装逼成功**
echo ------------------------------------------
pause
exit
goto start
:ip2
cls
netsh interface ip set address name="以太网" static 10.147.83.100 255.255.255.192 10.147.83.65
netsh interface ip set dns "以太网" source=static 10.147.13.99
echo **在5楼装逼成功**
echo ------------------------------------------
pause
exit
goto start
:ip3
cls
netsh interface ip set address name="以太网" dhcp
netsh interface ip delete dns "以太网" all
ipconfig /flushdns
echo **任意地点装逼成功**
echo ------------------------------------------
pause
exit


你可能感兴趣的:(win10下自动切换ip脚本)