OSPF路由协议——OSPF多区域原理和配置

121 阅读2分钟

开启掘金成长之旅!这是我参与「掘金日新计划 · 12 月更文挑战」的第14天,点击查看活动详情

一 OSPF多区域的原因 1.改善网络的可扩展性 2.快速收敛

二 OSPF的区域类型

1.骨干区域Area 0 2.非骨干区域-根据能够学习的路由种类来区分 标准区域 末梢区域 (stub) 完全末梢 (Totally stubby)区域 非纯末梢区域 (NSSA)

三 OSPF多区域常用配置命令 OSPF 多区域配置常用命令 show ip route ospf 只查看 ospf 学习到的路由 show ip prtocol 查看 ospf 配置信息 show ip ospf database 查看所有的 链路状态数据信息 LSA show ip ospf neighbor detail 查看邻居的详细信息 show ip ospf packet 查看 ospf 数据包的信息 ospf 版本 router-id area-id clear ip route 清空路由表

四 OSPF的三种通信量 1.域内通信量 (lntra-Area Traffic) 单个区域内的路由器之间交换数据包构成的通信量 2.域间通信量 (Inter-Area Traffic) 不同区域的路由器之间交换数据包构成的通信量 3.外部通信量 (External Traffic) OSPF域内的路由器与OSPF区域外或另一个自治系统内 的路由器之间交换机数据包构成的通信量

五配置实验 360截图20221210215028049.jpg

配置命令 R2 en conf t int f0/0 ip add 10.0.0.1 255.255.255.252 no sh int f0/1 ip add 172.16.0.1 255.255.255.0 no sh exit router ospf 1 router-id 1.1.1.1 network 10.0.0.0 0.0.0.3 area 2 network 172.16.0.0 0.0.0.255 area 2 R4 en conf t int f0/0 ip add 10.0.0.2 255.255.255.252 no sh int f0/1 ip add 10.0.0.5 255.255.255.0 no sh int f1/0 ip add 10.0.0.9 255.255.255.252 no sh exit router ospf 1 router-id 2.2.2.2 network 10.0.0.4 0.0.0.3 area 0 network 10.0.0.8 0.0.0.3 area 0 network 10.0.0.0 0.0.0.3 area 2 R9 en conf t int f0/0 ip add 10.0.0.6 255.255.255.252 no sh int f1/0 ip add 10.0.0.17 255.255.255.252 no sh int f0/1 ip add 10.0.0.13 255.255.255.252 no sh exit router ospf 1 router-id 3.3.3.3 network 10.0.0.16 0.0.0.3 area 10 network 10.0.0.12 0.0.0.3 area 0 network 10.0.0.4 0.0.0.3 area 0 R11 en conf t int f0/0 ip add 10.0.0.10 255.255.255.252 no sh int f0/1 ip add 10.0.0.14 255.255.255.252 no ah int f1/0 ip add 192.168.100.1 255.255.255.0 no sh exit router ospf 1 router-id 4.4.4.4 network 192.168.100.0 0.0.0.255 area 0 network 10.0.0.12 0.0.0.3 area 0 nerwork 10.0.0.8 0.0.0.3 area 0 R10 en conf t int f0/0 ip add 10.0.0.18 255.255.255.252 no sh int f0/1 ip add 172.16.1.1 255.255.255.0 no sh exit router ospf 1 router-id 5.5.5.5 network 172.16.1.0 0.0.0.255 area 10 network 10.0.0.16 0.0.0.3 area 10 查看路由表命令 show ip router 末梢配置 R9 conf t router ospf 1 area 10 stub R10 conf t router ospf 1 area 10 stub