设置笔记本同时上内外网

在win7环境下首先要提升WINDOWS命令行处理程序的运行权限(右键点命令行运行程序,选择以管理员权限运行即可)。

点击运行以下脚本。

其中10.3.X.换成自己外网的网关,11.247.4.X更换成内网IP,11.247.8.x 更换成内网网关就可以了。

@echo Begin delete old routes!


route delete 0.0.0.0

route delete 11.0.0.0

route delete 12.0.0.0


echo ...

echo Begin add new routes !

route add  0.0.0.0 mask 0.0.0.0 10.3.X.X -p

route add 11.0.0.0 mask 255.0.0.0 11.247.4.x -p

route add 11.0.0.0 mask 255.0.0.0 11.247.8.x -p


@echo Routes OK!

@echo ------------------------------------------------

@echo off

pause

ping www.baidu.com -n 2

@echo ------------------------------------------------

ping 11.247.4.x -n 2

@echo ------------------------------------------------

@echo off

pause

exit


你可能感兴趣的:(net)