删除原路由

route delete 0.0.0.0

为外网添加静态路由

查看外网网关:假设为192.168.70.0

route add -p 0.0.0.0 mask 0.0.0.0 192.168.70.0

为内网添加静态路由

查看内网网关:假设为10.121.132.126

route add -p 10.0.0.0 mask 255.0.0.0 10.121.132.126

假如访问的网段是10.121.0.0 那么route add -p 10.121.0.0 mask 255.255.0.0 10.121.132.126

假如访问的网段是10.121.132.0 那么route add -p 10.121.132.0 mask 255.255.255.0 10.121.132.126

外网添加时子网掩码(mask后面的ip)一定要对应

10.0.0.0 -> 255.0.0.0

10.121.0.0 -> 255.255.0.0

10.121.132.0 -> 255.255.255.0

posted on 2018-01-31 11:50  Robbery  阅读(6170)  评论(0编辑  收藏  举报