- @echo off
- :loop
- cls
- echo ---------------------------------------
- echo 信阳市人民医院双网卡设置,请选择操作
- echo 1.显示IP配置
- echo 2.执行双网卡配置向导
- echo 3.同时执行以上命令
- echo ---------------------------------------
- set /p %CHO%=请选择:
- if %CHO% == 1 (
- ipconfig
- echo 按任意键返回...
- pause>nul
- goto :loop
- ) else if %CHO% == 2 (
- goto :A
- ) else if %CHO% == 3 (
- goto :B
- ) else (
- echo 输入有误,请按任意键返回...
- pause>nul
- goto :loop
- )
- :A
- set /p ip1=请输入广域网网关地址(IPV4):
- set /p ip2=请输入局域网网关地址(IPV4):
- route delete 0.0.0.0
- route delete 10.0.0.0
- route add 0.0.0.0 mask 0.0.0.0 %ip1% -p
- route add 10.0.0.0 mask 255.0.0.0 %ip2% -p
- route print
- echo 操作成功,请检查效果
- pause
- goto :end
- :B
- ipconfig
- set /p ip1=请输入广域网网关地址(IPV4):
- set /p ip2=请输入局域网网关地址(IPV4):
- route delete 0.0.0.0
- route delete 10.0.0.0
- route add 0.0.0.0 mask 0.0.0.0 %ip1% -p
- route add 10.0.0.0 mask 255.0.0.0 %ip2% -p
- route print
- echo 操作成功,请检查效果
- pause
- goto :end
- :end
复制代码
|