要求:机器正常网关走192.168.199.1,如果到教育网(现在说的是59.64.0.0)则走另外一个网关:
命令:
route -p add 59.64.0.0 255.255.0.0 59.64.x.1
-p参数保证机器restart后路由仍然生效。
[quote]
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 11 09 ed df fc ...... VIA Compatable Fast Ethernet Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.199.1 59.64.x.y 20
59.64.0.0 255.255.0.0 59.64.176.1 59.64.x.y 1
59.64.176.0 255.255.255.192 59.64.x.y 59.64.x.y 20
59.64.x.y 255.255.255.255 127.0.0.1 127.0.0.1 20
59.255.255.255 255.255.255.255 59.64.x.y 59.64.x.y 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.199.0 255.255.255.0 192.168.199.103 59.64.x.y 20
192.168.199.103 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.199.255 255.255.255.255 192.168.199.103 59.64.x.y 20
210.5.152.74 255.255.255.255 192.168.199.1 59.64.x.y 20
224.0.0.0 240.0.0.0 59.64.x.y 59.64.x.y 20
255.255.255.255 255.255.255.255 59.64.x.y 59.64.x.y 1
Default Gateway: 192.168.199.1
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
59.64.0.0 255.255.0.0 59.64.x.1 1[/quote]
命令:
route -p add 59.64.0.0 255.255.0.0 59.64.x.1
-p参数保证机器restart后路由仍然生效。
[quote]
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 11 09 ed df fc ...... VIA Compatable Fast Ethernet Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.199.1 59.64.x.y 20
59.64.0.0 255.255.0.0 59.64.176.1 59.64.x.y 1
59.64.176.0 255.255.255.192 59.64.x.y 59.64.x.y 20
59.64.x.y 255.255.255.255 127.0.0.1 127.0.0.1 20
59.255.255.255 255.255.255.255 59.64.x.y 59.64.x.y 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.199.0 255.255.255.0 192.168.199.103 59.64.x.y 20
192.168.199.103 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.199.255 255.255.255.255 192.168.199.103 59.64.x.y 20
210.5.152.74 255.255.255.255 192.168.199.1 59.64.x.y 20
224.0.0.0 240.0.0.0 59.64.x.y 59.64.x.y 20
255.255.255.255 255.255.255.255 59.64.x.y 59.64.x.y 1
Default Gateway: 192.168.199.1
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
59.64.0.0 255.255.0.0 59.64.x.1 1[/quote]