OFPS_多区域讲解;末梢区域配置实验

一.生成多区域的原因

1.改善网络的可扩展性
2.快速收敛

二.OSPF的三种通信量

1.三种通信量
1.1域内通信量:单个区域内的路由器之间交换数据包构成的通信量
1.2域间通信量:不同区域的路由器之间交换数据包构成的通信量
1.3外部通信量:OSPF域内的路由器与OSPF区域外或另一个自治系统内的路由器之间交换数据包构成的通信量

三.OSPF的区域类型

骨干区域:Area0
非骨干区域:根据能够学习的路由种类来区分
标准区域
末梢区域
完全末梢区域
非纯末梢区域

四.链路状态数据库的组成

1.每个路由器都创建了由每个接口,对应的相邻节点和接口速度组成的数据库
2.链路状态数据库中每个条目称为LSA(链路状态通告)常见的六种LSA类型:
type1:
路由器LAS----由区域内的路由器发出的,描述了路由器链路状态和花费传递到整个区域内
type2:
网络LSA-----区域内DR发出,描述了区域内变更信息,传递到整个区域内
type3:
网络汇总LAS------ABR发出的,其他区域的汇总链路通告,描述了其他区域内某一网段的路由,区域间传递
type4:
ASBR汇总的LSA-------ABR发出,用于通告ASBR信息,确定ASBR的位置,不会出现在ASBR所属区域内
type5:
AS外部LSA------ASBR发出的,用于通告外部路由,告诉相同As的路由器通往外部AS的路径,在整个AS中进行泛洪
type7:
NSSA外部LSA-------NSSA区域内的ASBR发出,用于通告本区域连接的外部路由,与type 5 类似,仅在非纯末梢区域内进行泛洪,传递时会被ABR转换LSA5.

五.末梢区域和完全末梢区域

路由器对路由条目选择:
把最优的路由条目添加路由表
末梢区域和完全末梢区域:
满足以下条件的区域:
只有一个默认路由作为其区域的出口
区域不能作为虚链路的穿越区域
stub区域里无自治系统边界路由器
不是骨干区域Area0
末梢区域:没有LSA4 .5 .7 通告
完全末梢区域:除一条LSA3的默认路由器通告外,没有LSA 3. 4 .5 .7 通告
末梢区域和完全末梢区域的作用,主要目的是减少区域内的LSA条目以及路由条目,减少对设备cpu和内存的占用
末梢区域和完全末梢区域中ABR会自动生成一条默认路由发布到末梢区域或完全末梢区域中

六.末梢区域配置实验

1.末梢网络配置命令
[R1-ospf-1]ospf 1
[R1-ospf-1]area 2
[R1-ospf-1-area-0.0.0.2]stub
[R1-ospf-1-area-0.0.0.2]dis ip routing-table

在这里插入图片描述
R1:
[Huawei]sys
[Huawei]sysname R1
[R1]user-int
[R1]user-interface co
[R1]user-interface console 0
[R1-ui-console0]idle-timeout 0 0
[R1-ui-console0]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
[R1-GigabitEthernet0/0/0]int loop 0
[R1-LoopBack0]ip add 1.1.1.1 32
[R1-LoopBack0]ospf 1
R1-ospf-1]area 2
[R1-ospf-1-area-0.0.0.2]network 12.0.0.0 0.0.0.255
[R1-ospf-1-area-0.0.0.2]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.2]stub
[R1-ospf-1-area-0.0.0.2]dis ip routing-table
在这里插入图片描述

R2:
[Huawei]sys
[Huawei]sysname R2
[R2]us
[R2]user-int
[R2]user-interface co
[R2]user-interface console 0
[R2-ui-console0]id
[R2-ui-console0]idle-timeout 0 0
[R2-ui-console0]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 23.0.0.2 24
[R2-GigabitEthernet0/0/1]int loop 0
[R2-LoopBack0]ip add 2.2.2.2 32
[R2-LoopBack0]area
[R2-LoopBack0]ospf
[R2-LoopBack0]ospf 1
[R2-ospf-1]are
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]area 2
[R2-ospf-1-area-0.0.0.2]network 12.0.0.0 0.0.0.255
[R2-ospf-1-area-0.0.0.2]area
[R2-ospf-1-area-0.0.0.2]stub
在这里插入图片描述

R3:
[Huawei]sys
[Huawei]sysname R3
[R3]us
[R3]user-int
[R3]user-interface co
[R3]user-interface console 0
[R3-ui-console0]id
[R3-ui-console0]idle-timeout 0 0
[R3-ui-console0]q
[R3]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 23.0.0.3 24
[R3-GigabitEthernet0/0/1]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 34.0.0.3 24
[R3-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R3-GigabitEthernet0/0/0]int loop 0
[R3-LoopBack0]ip add 3.3.3.3 32
[R3-LoopBack0]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 23.0.0.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

在这里插入图片描述
R4:
[R4]us
[R4]user-int
[R4]user-interface co
[R4]user-interface console 0
[R4-ui-console0]id
[R4-ui-console0]idle-timeout 0 0
[R4-ui-console0]q
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 34.0.0.4 24
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 45.0.0.4 24
[R4-GigabitEthernet0/0/1]int loop 0
[R4-LoopBack0]ip add 4.4.4.4 32
[R4-LoopBack0]ospf 1
[R4-ospf-1]area 1
[R4-ospf-1-area-0.0.0.1]network 45.0.0.0 0.0.0.255
[R4-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.1]area 0
[R4-ospf-1-area-0.0.0.0]network 34.0.0.0 0.0.0.255
在这里插入图片描述

R5:
[R5]us
[R5]user-int
[R5]user-interface co
[R5]user-interface console 0
[R5-ui-console0]id
[R5-ui-console0]idle-timeout 0 0
[R5-ui-console0]q
[R5]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 45.0.0.5 24
[R5-GigabitEthernet0/0/1]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 56.0.0.5 24
[R5-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R5-GigabitEthernet0/0/0]int loop 0
[R5-LoopBack0]ip add 5.5.5.5 32
[R5-LoopBack0]ospf 1
[R5-ospf-1]area 1
[R5-ospf-1-area-0.0.0.1]network 45.0.0.0 0.0.0.255
[R5-ospf-1-area-0.0.0.1]network 56.0.0.0 0.0.0.255
[R5-ospf-1-area-0.0.0.1]network 5.5.5.5 0.0.0.0
在这里插入图片描述

R6:
[R6]us
[R6]user-int
[R6]user-interface co
[R6]user-interface console 0
[R6-ui-console0]id
[R6-ui-console0]idle-timeout 0 0
[R6-ui-console0]q
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 56.0.0.6 24
[R6-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R6-GigabitEthernet0/0/0]int loop 0
[R6-LoopBack0]ip add 6.6.6.6 32
[R6-LoopBack0]ospf 1
[R6-ospf-1]area 1
[R6-ospf-1-area-0.0.0.1]network 56.0.0.0 0.0.0.255
[R6-ospf-1-area-0.0.0.1]network 6.6.6.6 0.0.0.0
在这里插入图片描述设置完,查表:dis ip routing-table:
在这里插入图片描述
再进R1,ping -a 1.1.1.1 6.6.6.6
在这里插入图片描述
末梢区域配置命令:
[R1-ospf-1-area-0.0.0.2]network 12.0.0.0 0.0.0.255
[R1-ospf-1-area-0.0.0.2]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.2]stub
[R1-ospf-1-area-0.0.0.2]dis ip rou
[R1-ospf-1-area-0.0.0.2]dis ip routing-table
在这里插入图片描述
再进R1,查看状态,dis ip routing-table :
在这里插入图片描述此时,自动生成一条默认路由。

猜你喜欢

转载自blog.csdn.net/Wsxyi/article/details/112328598