分类: 系统运维
2011-10-20 10:50:49
要分析故障原因,当然首先要了解原来的静态路由配置。R1路由器上原来的配置如下:
hostname R1
!
ip subnet-zero
no ip domain-lookup
!
controller E1 2/0
!
controller E1 2/1
!
interface Serial3/0
description ISP Link
ip address 192.168.10.1 255.255.255.252
clockrate 64000
!
interface Serial3/1
no ip address
shutdown
!
interface Serial3/2
description Primary Link to R2
ip address 10.10.10.1 255.255.255.252
!
interface Serial3/3
description Backup Link to R2
ip address 192.168.20.1 255.255.255.252
clockrate 64000
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial3/0 !---这是到ISP路由器的默认路由
ip route 172.31.10.0 255.255.255.0 10.10.10.2 !---这是到内部网络的主静态路由。
ip route 172.31.10.0 255.255.255.0 192.168.20.2 250 !---这是到内部网络的浮动静态路由。
这时在R1路由器上执行“show ip route”特权模式命令,查看路由器上的路由表,结果显示如下:
R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
10.0.0.0/30 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Serial3/2
192.168.10.0/30 is subnetted, 1 subnets
C 192.168.10.0 is directly connected, Serial3/0
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directly connected, Serial3/3
172.31.0.0/24 is subnetted, 1 subnets
S 172.31.10.0 [1/0] via 10.10.10.2 !--- 这是通过T1线路到达内部网络的主静态路由。
S* 0.0.0.0/0 is directly connected, Serial3/0 !--- 这是到达ISP路由器的默认静态路由。
从以上可以看出,这时在R1路由器的路由表中是看不到所配置的浮动静态路由的,因为当前主静态路由仍有效。
R2路由器上原来的配置如下:
hostname R2
!
enable password ww
!
!
!
!
!
ip subnet-zero
no ip finger
no ip domain-lookup
!
!
!
interface Ethernet0
description Local LAN
ip address 172.31.10.2 255.255.255.0
!
interface Serial0
description Primary Link to R1
ip address 10.10.10.2 255.255.255.252
clockrate 56000
!
interface Serial1
description Backup Link to R1
ip address 192.168.20.2 255.255.255.252
!
interface TokenRing0
no ip address
shutdown
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.10.10.1 !--- 这是主默认路由。
ip route 0.0.0.0 0.0.0.0 192.168.20.1 250 !--- 这是为T1线路失效时所配置的浮动默认路由。
no ip http server
!
!
line con 0
exec-timeout 0 0
transport input none
line aux 0
line vty 0 4
password ww
login
!
end
这时在R2路由器上执行“show ip route”特权模式命令,查看路由器上的路由表,结果显示如下:
R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 10.10.10.1 to network 0.0.0.0
172.31.0.0/24 is subnetted, 1 subnets
C 172.31.10.0 is directly connected, Ethernet0
192.168.20.0/30 is subnetted, 1 subnets
C 192.168.20.0 is directly connected, Serial1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/30 is directly connected, Serial0
S* 0.0.0.0/0 [1/0] via 10.10.10.1 !--- 这是主默认路由。