|
楼主 |
发表于 2007-12-30 07:14:50
|
显示全部楼层
三、DDN与VPN切换的配置
北京切换配置:
ip sla monitor 1 /建立监视组1探测深圳端的IP
type echo protocol ipIcmpEcho 192.168.100.2 /发送ICMP探测深圳端IP
timeout 999 /超时时间999MS
frequency 1 /发送一个包
ip sla monitor schedule 1 life forever start-time now /定义监视组的SCHEDULE、LIFE、FOREVER的开始时间
track 1 rtr 1 reachability /定义TRACK组
ip route 192.168.10.0 255.255.255.0 192.168.100.2 60 track 1
ip route 0.0.0.0 0.0.0.0 192.168.8.254 60 track 1
ip route 0.0.0.0 0.0.0.0 Dialer1 70
ip route 192.168.7.0 255.255.255.0 192.168.8.254 70
ip route 192.168.9.0 255.255.255.0 192.168.8.254 70
ip route 192.168.11.0 255.255.255.0 192.168.8.254 70
此处几条路由也就是整个线路切换与恢复的关健所在,依次描述。
①
当DDN正常时默认所有到达深圳端的流量都走S0/2/0端口,并由TRACK1检测是否把此条路由放入路由表中。
②
当DDN正常时,所有深圳端过来的流量全部转发到SV2000的LAN口,实现深圳出公网的认证以及深圳端与北京端路由,并由TRACK1检测是否把此条路由放入路由表中。
③
当DDN当掉后,通过TRACK1检测路由会默认关闭S0/2/0,此路由会被放到路由表中,而建立两端的VPN而实现DDN业务的接替,当TRACK1检测到DDN恢复后,此表路由会被删除。
④
其余几条基本同上一条功能一样,只是更详细的匹配了VPN建立后流量的转发,而实现深圳端与北京端内网的路由。
实现的效果:
走专线时:
pekru020#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.8.254 to network 0.0.0.0
222.128.50.0/32 is subnetted, 2 subnets
C
222.128.50.112 is directly connected, Dialer1
C
222.128.50.65 is directly connected, Dialer1
C
192.168.8.0/24 is directly connected, FastEthernet0/0
S
192.168.9.0/24 [70/0] via 192.168.8.254
S
192.168.10.0/24 [60/0] via 192.168.100.2
S
192.168.11.0/24 [70/0] via 192.168.8.254
S
192.168.7.0/24 [70/0] via 192.168.8.254
C
192.168.100.0/24 is directly connected, Serial0/2/0
S*
0.0.0.0/0 [60/0] via 192.168.8.254
走VPN时:
pekru020#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
222.128.50.0/32 is subnetted, 2 subnets
C
222.128.50.112 is directly connected, Dialer1
C
222.128.50.65 is directly connected, Dialer1
C
192.168.8.0/24 is directly connected, FastEthernet0/0
S
192.168.9.0/24 [70/0] via 192.168.8.254
S
192.168.11.0/24 [70/0] via 192.168.8.254
S
192.168.7.0/24 [70/0] via 192.168.8.254
S*
0.0.0.0/0 is directly connected, Dialer1
完全实现了线路的自动切换与恢复。
深圳端切换配置:
ip sla monitor 1
type echo protocol ipIcmpEcho 192.168.100.1
timeout 999
frequency 1
ip sla monitor schedule 1 life forever start-time now
track 1 rtr 1 reachability
ip route 0.0.0.0 0.0.0.0 192.168.100.1 60 track 1
ip route 0.0.0.0 0.0.0.0 Dialer1 70
深圳端相对简单,配置原理与北京端相同,在此也不再阐述相关配置了。
在此需要特别注意的地方是,像电信所提供的数字线路,一定需要配合使用监视组来查看业务是否中断,因为当一端DOWN后,而另一端的链路由于连接的是运营商端,只要客户端与运营商端线路正常,那么另一端协议以及端口都会处于UP状态,那么也不能使管理距离为60的路由在路由表里及时删除也会造成管理距离为70的路由被放到路由表。 |
|