ospf中如果有重复的router-id是否能建立邻居

简介:

试验目的:讨论ospf中如果有重复的router-id是否能建立邻居。

试验拓扑:

clip_image002

R2#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 not set

33.0.0.0/32 is subnetted, 1 subnets

O 33.33.33.33 [110/65] via 10.1.2.2, 00:00:09, Serial1/1

22.0.0.0/24 is subnetted, 1 subnets

C 22.22.22.0 is directly connected, Loopback0

10.0.0.0/24 is subnetted, 2 subnets

C 10.1.2.0 is directly connected, Serial1/1

C 10.1.1.0 is directly connected, Serial1/0

R2#show ip os nei

Neighbor ID Pri State Dead Time Address Interface

1.1.1.1 0 FULL/ - 00:00:35 10.1.2.2 Serial1/1

1.1.1.1 0 FULL/ - 00:00:38 10.1.1.1 Serial1/0

从R2的路由表中可以看出R1,R3的router-id都为1.1.1.1的情况下,邻居都是能建立的,他只能学到一边的路由,在R1和R3上也只能学到R2的路由,都学不到router-id相同的路由。然而重启ospf的进程后,R2的路由表变成了:

R2#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 not set

22.0.0.0/24 is subnetted, 1 subnets

C 22.22.22.0 is directly connected, Loopback0

10.0.0.0/24 is subnetted, 2 subnets

C 10.1.2.0 is directly connected, Serial1/1

C 10.1.1.0 is directly connected, Serial1/0

11.0.0.0/32 is subnetted, 1 subnets

O 11.11.11.11 [110/65] via 10.1.1.1, 00:00:01, Serial1/0

由此说明:他装入路由表的时候具有随机性,也就是说在同一时间下,那边的邻居先起来就把那边的邻居路由装入路由表。

R1#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 not set

22.0.0.0/32 is subnetted, 1 subnets

O 22.22.22.22 [110/65] via 10.1.1.2, 00:02:29, Serial1/1

10.0.0.0/24 is subnetted, 2 subnets

O 10.1.2.0 [110/128] via 10.1.1.2, 00:02:29, Serial1/1

C 10.1.1.0 is directly connected, Serial1/1

11.0.0.0/24 is subnetted, 1 subnets

C 11.11.11.0 is directly connected, Loopback1

R3#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 not set

33.0.0.0/24 is subnetted, 1 subnets

C 33.33.33.0 is directly connected, Loopback0

22.0.0.0/32 is subnetted, 1 subnets

O 22.22.22.22 [110/65] via 10.1.2.1, 00:02:48, Serial1/0

10.0.0.0/24 is subnetted, 2 subnets

C 10.1.2.0 is directly connected, Serial1/0

O 10.1.1.0 [110/128] via 10.1.2.1, 00:02:48, Serial1/0

试验拓扑二:

clip_image004

R2#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 not set

33.0.0.0/32 is subnetted, 1 subnets

O 33.33.33.33 [110/65] via 10.1.2.2, 00:00:58, Serial1/1

22.0.0.0/24 is subnetted, 1 subnets

C 22.22.22.0 is directly connected, Loopback0

10.0.0.0/24 is subnetted, 2 subnets

C 10.1.2.0 is directly connected, Serial1/1

C 10.1.1.0 is directly connected, Serial1/0

11.0.0.0/32 is subnetted, 1 subnets

O 11.11.11.11 [110/65] via 10.1.1.1, 00:01:36, Serial1/0

R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface

1.1.1.1 0 FULL/ - 00:00:31 10.1.1.1 Serial1/0

1.1.1.1 0 FULL/ - 00:00:30 10.1.2.2 Serial1/1

R3#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 not set

33.0.0.0/24 is subnetted, 1 subnets

C 33.33.33.0 is directly connected, Loopback0

22.0.0.0/32 is subnetted, 1 subnets

O IA 22.22.22.22 [110/65] via 10.1.2.1, 00:01:08, Serial1/0

10.0.0.0/24 is subnetted, 2 subnets

C 10.1.2.0 is directly connected, Serial1/0

O IA 10.1.1.0 [110/128] via 10.1.2.1, 00:01:08, Serial1/0

11.0.0.0/32 is subnetted, 1 subnets

O IA 11.11.11.11 [110/129] via 10.1.2.1, 00:01:08, Serial1/0

R1#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 not set

33.0.0.0/32 is subnetted, 1 subnets

O IA 33.33.33.33 [110/129] via 10.1.1.2, 00:01:10, Serial1/1

22.0.0.0/32 is subnetted, 1 subnets

O 22.22.22.22 [110/65] via 10.1.1.2, 00:01:47, Serial1/1

10.0.0.0/24 is subnetted, 2 subnets

O IA 10.1.2.0 [110/128] via 10.1.1.2, 00:01:47, Serial1/1

C 10.1.1.0 is directly connected, Serial1/1

11.0.0.0/24 is subnetted, 1 subnets

C 11.11.11.0 is directly connected, Loopback1

从这里可以看出,三台路由器的路由表达到了同步,说明router-id是一个区域的概念,他同时也是一个路由器的标示。只要在不同区域,router-id相同是没有关系的,但是在同一个区域的情况下就会出现路由只能学到一边的情况。



本文转自 gehailong 51CTO博客,原文链接:http://blog.51cto.com/gehailong/297380,如需转载请自行联系原作者

相关文章
|
14天前
|
网络协议 数据库 网络架构
OSPF 路由器 ID 的用途
【8月更文挑战第24天】
19 0
|
14天前
|
监控 网络协议 数据安全/隐私保护
确定 OSPF 邻居关系问题原因的方法
【8月更文挑战第24天】
33 0
|
14天前
|
网络协议 网络架构
|
23天前
|
网络协议
OSPF直连邻居状态Full,且有路由,不通!怎么回事?
OSPF直连邻居状态Full,且有路由,不通!怎么回事?
|
4月前
|
监控 网络协议 网络架构
|
网络协议 数据库 数据安全/隐私保护
OSPF基础(二):OSPF区域、router-ID、度量值、修改度量值的方法、OSPF协议报文类型、OSPF邻接关系建立过程
OSPF基础术语讲解、OSPF区域、router-ID、度量值,OSPF度量值的计算方式、修改方式。 OSPF协议报文类型,OSPF三大表项-邻居表,常用的ospf查看方式,邻接关系的建立过程。
OSPF基础(二):OSPF区域、router-ID、度量值、修改度量值的方法、OSPF协议报文类型、OSPF邻接关系建立过程
|
网络协议 算法 Java
动态路由RID ospf
AS 由单一的机构或者组织管理的一系列IP网络设备所构成的集合 为了进行网络的分块化,便于管理
60 0
动态路由RID ospf
|
网络协议 数据安全/隐私保护
ip-prefix在OSPF和BGP中路由过滤的应用举例。
ip-prefix,路由过路在ospf和bgp中的应用。
6487 0
|
网络协议 数据库 网络架构