cls
@echo off
color 0B
echo **************************************
echo *IP 地址切换
echo **************************************
set IP=136.172.202.XXX
set MASK=255.255.255.0
set GATEWAY=136.172.202.254
set DNS=178.182.171.60
set INTERFACE=本地连接
set IPO=137.168.99.XX
set MASKO=255.255.255.0
set GATEWAYO=137.168.99.253
set DNSO=137.168.99.253
set INTERFACEO=本地连接
set IP1=137.168.98.XXX
set MASK1=255.255.255.0
set GATEWAY1=137.168.98.254
set DNS1=
set INTERFACE1=无线网络连接
:MENU
echo.
echo 静态IP(内网136.172网段)设置请按 1
echo 动态IP 设置请按 2
echo 静态IP(外网137.168网段)设置请按 3
echo 静态IP(外网137.168无线网段)设置请按 4
echo.
echo 退出请按任意键
echo.
set /p KEY= [请输入您的选择:]
if %KEY% == 1 (goto INNER)
if %KEY% == 2 (goto DHCP)
if %KEY% == 3 (goto OUTTER)
if %KEY% == 4 (goto WLAN)
else goto END
@echo on
:DHCP
echo.
echo 快速设置IP地址和DNS为“自动获得”
echo.
netsh interface ip set address "本地连接" dhcp
netsh interface ip set dns "本地连接" dhcp
echo 动态IP设置成功!
goto END
:INNER
echo.
echo 您选择了办公内网设置。
echo.
echo 正在更改IP......
netsh interface ip set address name="%INTERFACE%" source=static addr=%IP% mask=%MASK%
echo 正在更改网关......
netsh interface ip set address name="%INTERFACE%" gateway=%GATEWAY% gwmetric=1
echo 正在更改DNS......
netsh interface ip set dns name="%INTERFACE%" source=static addr=%DNS%
echo 固定IP配置%IP%成功!
goto END
:OUTTER
echo.
echo 您选择了Internet内网设置。
echo.
echo 正在更改IP......
netsh interface ip set address name="%INTERFACEO%" source=static addr=%IPO% mask=%MASKO%
echo 正在更改网关......
netsh interface ip set address name="%INTERFACEO%" gateway=%GATEWAYO% gwmetric=1
echo 正在更改DNS......
netsh interface ip set dns name="%INTERFACEO%" source=static addr=%DNSO%
echo 固定IP配置%IPO%成功!
goto END
:WLAN
echo.
echo 您选择了Internet无线内网设置。
echo.
echo 正在更改IP......
netsh interface ip set address name="%INTERFACE1%" source=static addr=%IP1% mask=%MASK1%
echo 正在更改网关......
netsh interface ip set address name="%INTERFACE1%" gateway=%GATEWAY1% gwmetric=1
echo 正在更改DNS......
netsh interface ip set dns name="%INTERFACE1%" source=static addr=%DNS1%
echo 固定IP配置%IP1%成功!
goto END
:END
echo.
pause
Rekomendasi Game Android Bahasa Indonesia
3 years ago
0 comments:
Post a Comment