博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

DOS 命令切换IP

Posted on 2009-12-28 09:48  逸群  阅读(414)  评论(0)    收藏  举报

@echo off
echo **************************************************
echo            IP切换
echo 切换到外网按0,切换到外网按1
echo **************************************************
echo.

set /p Net=选择网络(0/1):
if "%Net%"=="0" goto IntNet
if "%Net%"=="1" goto YbNet

:IntNet
netsh interface ip set address "本地连接" static 197.168.201.222 255.255.255.0 201.101.102.3 1

:YbNet
netsh interface ip set address "本地连接" static 193.168.100.222 255.255.255.0 193.168.100.1 1

pause