上面一个实验,两个区域,不同区域之间有相同的router-id 暂时没有出现问题,现在这个实验不同区域间有相同的router-id就出问题了。拓扑如下:
其中R3是ASBR,RIP与OSPF之间互相进行了重分布,正常情况上,如果router-id没有相同的话,R1应该可以学到R4的路由。但情况是R1的路由如下:
R1#sh 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 not set
10.0.0.0/30 is subnetted, 2 subnets
C 10.10.12.0 is directly connected, Serial1/1
O IA 10.10.23.0 [110/128] via 10.10.12.2, 00:57:28, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
R1#
再看R2路由,R2的路由多看几次就会发现不同。
R2#sh 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 not set
10.0.0.0/30 is subnetted, 3 subnets
C 10.10.12.0 is directly connected, Serial1/0
C 10.10.23.0 is directly connected, Serial1/1
O E2 10.10.34.0 [110/20] via 10.10.23.2, 00:00:05, Serial1/1
192.168.1.0/32 is subnetted, 1 subnets
O 192.168.1.1 [110/65] via 10.10.12.1, 00:09:50, Serial1/0
O E2 192.168.2.0/24 [110/20] via 10.10.23.2, 00:00:05, Serial1/1
R2#sh 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 not set
10.0.0.0/30 is subnetted, 2 subnets
C 10.10.12.0 is directly connected, Serial1/0
C 10.10.23.0 is directly connected, Serial1/1
192.168.1.0/32 is subnetted, 1 subnets
O 192.168.1.1 [110/65] via 10.10.12.1, 00:09:51, Serial1/0
两个E2路由时有时无,但R1始终没有E2的路由。
再看一个R2的database
R2#sh ip ospf database
OSPF Router with ID (2.2.2.2) (Process ID 100)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 827 0x80000012 0x006068 3
2.2.2.2 2.2.2.2 820 0x8000000F 0x008CB5 2
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.10.23.0 2.2.2.2 815 0x80000001 0x00C408
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 512 0x80000001 0x00935C
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 518 0x80000003 0x008DAD 2
2.2.2.2 2.2.2.2 800 0x80000002 0x00102A 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.10.12.0 2.2.2.2 821 0x80000001 0x003E99
192.168.1.1 2.2.2.2 821 0x80000001 0x001375
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.10.34.0 1.1.1.1 3600 0x80000066 0x00B166 0
192.168.2.0 1.1.1.1 3600 0x80000066 0x006E71 0
_____________________________________________________
好,现在修改R3的router-id 为3.3.3.3看效果:
R3(config)#router ospf 100
R3(config-router)#router
R3(config-router)#router-id 3.3.3.3
Reload or use "clear ip ospf process" command, for this to take effect
R3(config-router)#
R3(config-router)#
R3(config-router)#
R3(config-router)#do clear ip ospf pr
% Ambiguous command: "do clear ip ospf pr"
R3(config-router)#do clear ip ospf pr
Reset ALL OSPF processes? [no]: y
再来看R1的路由,正常了。
R1#sh 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 not set
10.0.0.0/30 is subnetted, 3 subnets
C 10.10.12.0 is directly connected, Serial1/1
O IA 10.10.23.0 [110/128] via 10.10.12.2, 01:01:03, Serial1/1
O E2 10.10.34.0 [110/20] via 10.10.12.2, 00:00:00, Serial1/1
C 192.168.1.0/24 is directly connected, Loopback0
O E2 192.168.2.0/24 [110/20] via 10.10.12.2, 00:00:00, Serial1/1
至于为什么出现这个现象,我的理解是,因为外部路由重发布到OSPF中,在ABR传播中, ABR不能修改其router-id ,所以当ASBR的route-id 与区域中的某一台路由器router-id相同时就会出问题。