发新话题
打印

[网络转载] 同一台路由器运行多个OSPF现象浅析(同区域隔离)

同一台路由器运行多个OSPF现象浅析(同区域隔离)

小弟初次发帖,诸多缺陷,水平不高,望请指教!-------------------------------------------------------------------------------------------------------------
同一台路由器运行多个OSPF现象浅析(同区域隔离)


拓扑图:(均为 AREA 0 )






















实验目的:
<1> 验证 在同一区域可以采用在同一路由运行不同OSPF进程进行隔离,也就是说:
虽然R1R2R3都在区域0内,但由于R2上运行不同的OSPF进程,有着不同的Database,所以R1R2无法通信(收不到对方路由);
<2> 附属验证 R2上不同OSPF进程进行会自动选择不同的Router-ID

实验配置:(基本配置省略,只留下OSPF相关配置)
R1
router ospf 100

log-adjacency-changes


network 1.1.1.1 0.0.0.0 area 0


network 10.0.0.0 0.0.0.255 area 0

R2(关键)
router ospf 100

log-adjacency-changes


network 10.0.0.0 0.0.0.255 area 0

!
router ospf 101

log-adjacency-changes


network 2.2.2.2 0.0.0.0 area 0


network 20.0.0.0 0.0.0.255 area 0

R3
router ospf 100

log-adjacency-changes


network 3.3.3.3 0.0.0.0 area 0


network 20.0.0.0 0.0.0.255 area 0


实验结果验证:
<1> 验证 在同一区域可以采用在同一路由运行不同OSPF进程进行隔离
R1#sh ip rou
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


1.0.0.0/24 is subnetted, 1 subnets

C
1.1.1.0 is directly connected, Loopback0


10.0.0.0/24 is subnetted, 1 subnets

C
10.0.0.0 is directly connected, Serial1/0

(收不到R3的路由信息)
但是数据库中仍然可以看到本区域的主机:
R1#sh ip os da



OSPF Router with ID (1.1.1.1) (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
1003
0x80000008 0x00E570 3

3.3.3.3
3.3.3.3
3212
0x8000000B 0x007BA8 3

20.0.0.2
20.0.0.2
667
0x80000005 0x00CF8A 2






下面是R2的路由表(全路由)
R2#sh ip rou
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


1.0.0.0/24 is subnetted, 1 subnets

O
1.1.1.0 [110/65] via 10.0.0.1, 00:02:23, Serial1/0


2.0.0.0/24 is subnetted, 1 subnets

C
2.2.2.0 is directly connected, Loopback0


3.0.0.0/32 is subnetted, 1 subnets

O
3.3.3.3 [110/65] via 20.0.0.3, 00:01:51, Serial1/1


20.0.0.0/24 is subnetted, 1 subnets

C
20.0.0.0 is directly connected, Serial1/1


10.0.0.0/24 is subnetted, 1 subnets

C
10.0.0.0 is directly connected, Serial1/0!

R2的数据库中可以很明白看出来结构:
R2#sh ip os da


OSPF Router with ID (2.2.2.2) (Process ID 101)



Router Link States (Area 0)


Link ID
ADV Router
Age
Seq#
Checksum Link count

2.2.2.2
2.2.2.2
328
0x80000003 0x00D470 3

3.3.3.3
3.3.3.3
333
0x80000017 0x005EC7 3

20.0.0.2
20.0.0.2
3297
0x8000000E 0x00F36F 5



OSPF Router with ID (20.0.0.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
1095
0x80000008 0x00E570 3

3.3.3.3
3.3.3.3
3303
0x8000000B 0x007BA8 3

20.0.0.2
20.0.0.2
757
0x80000005 0x00CF8A 2



R3#sh ip rou
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


2.0.0.0/24 is subnetted, 1 subnets

O
2.2.2.0 [110/65] via 20.0.0.2, 00:02:21, Serial1/0


3.0.0.0/24 is subnetted, 1 subnets

C
3.3.3.0 is directly connected, Loopback0


20.0.0.0/24 is subnetted, 1 subnets

C
20.0.0.0 is directly connected, Serial1/0

R3的数据库:
R3#sh ip os da


OSPF Router with ID (3.3.3.3) (Process ID 100)



Router Link States (Area 0)


Link ID
ADV Router
Age
Seq#
Checksum Link count

2.2.2.2
2.2.2.2
471
0x80000003 0x00D470 3

3.3.3.3
3.3.3.3
474
0x80000017 0x005EC7 3

20.0.0.2
20.0.0.2
3438
0x8000000E 0x00F36F 5



验证2 附属验证 R2上不同OSPF进程进行会自动选择不同的Router-ID
(在R2上)
R2#sh ip os

Routing Process "ospf 101" with ID 2.2.2.2


Supports only single TOS(TOS0) routes


Supports opaque LSA


Supports Link-local Signaling (LLS)


Initial SPF schedule delay 5000 msecs

(中间省略)

Routing Process "ospf 100" with ID 20.0.0.2


Supports only single TOS(TOS0) routes


Supports opaque LSA


Supports Link-local Signaling (LLS)


Initial SPF schedule delay 5000 msecs


Minimum hold time between two consecutive SPFs 10000 msecs


Maximum wait time between two consecutive SPFs 10000 msecs

(后面省略)
红色标记的地方说明:环回口优先级最高,决定Router-ID,但当运行多个OSPF进程的时候,路由会选择其他接口作为不同的Router-ID,以在不同的网络区域里区分路由

TOP

小弟水平已经不错了,你发的我都看不懂呢

TOP

发新话题