- @echo off
- for /f "tokens=2 delims=:" %%a in ('ipconfig ^| find/i "ip address"')do for /f "tokens=4 delims=." %%b in ("%%a") do echo %%b >"%temp%\ip.txt"
- set/p net=<%temp%\ip.txt
- route delete 0.0.0.0 mask 0.0.0.0 10.0.0.%net%
- Route add 10.0.0.0 mask 255.255.255.0 10.0.0.%net%
- Route add 10.0.0.0 mask 255.255.255.0 10.0.0.%net%
复制代码 这个能不能帮忙修改成上面取宽带连接的外网IP,然后删除路由表0.0.0.0 ,新增路由表route add 0.0.0.0 mask 0.0.0.0 得到的外网IP route add 10.0.0.0 mask 255.255.255.0 10.0.0.100
谢谢 |