最近和广州做的VPN,,,网关只有改成254才能上,面我们平时用的都是1的网关,非常不方便,
所以还有一个办法,,就是让网关自动切换!
查看:
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 13 8f 5d dc 73 ...... NVIDIA nForce Networking Controller - 数据包计划
程序微型端口
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.14 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.100.0 255.255.255.0 192.168.100.14 192.168.100.14 20
192.168.100.14 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.255 255.255.255.255 192.168.100.14 192.168.100.14 20
224.0.0.0 240.0.0.0 192.168.100.14 192.168.100.14 20
255.255.255.255 255.255.255.255 192.168.100.14 192.168.100.14 1
Default Gateway: 192.168.100.1
===========================================================================
Persistent Routes:
None
和和,反正看着有些晕,,意思就是0.0.0.0/0.0.0.0 从192.168.100.1网关走
我们再加上
C:\>route -p add 192.168.3.0 mask 255.255.255.0 192.168.100.254
好了,就加上这几个,意思就是192.168.1.0/24 这5段的IP都从24的网关走,这样就不用老把网关换来换去了
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 13 8f 5d dc 73 ...... NVIDIA nForce Networking Controller - 数据包计
程序微型端口
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.14 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.3.0 255.255.255.0 192.168.100.254 192.168.100.14 1
192.168.100.0 255.255.255.0 192.168.100.14 192.168.100.14 20
192.168.100.14 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.255 255.255.255.255 192.168.100.14 192.168.100.14 20
224.0.0.0 240.0.0.0 192.168.100.14 192.168.100.14 20
255.255.255.255 255.255.255.255 192.168.100.14 192.168.100.14 1
Default Gateway: 192.168.100.1
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
192.168.3.0 255.255.255.0 192.168.100.254 1
这样就成了,VPN上网两不误了
阅读(1437) | 评论(0) | 转发(0) |