栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

配置OSPF多区域

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

配置OSPF多区域

目录

一、相关知识

1、基本配置命令

2、OSPF为什么是无自环的?

3、何时需要运行OSPF协议

二、拓扑图

三、配置命令

1、ZY-R-A路由配置命令

2、ZY-R-B路由配置命令

3、ZY-R-C路由配置命令

四、验证过程


一、相关知识

1、基本配置命令

配置路由器的Router ID:[Quidway]router id A.B.C.D

启动OSPF协议:[Quidway] ospf [ process-id ]

配置OSPF区域:[Quidway-ospf-1]area  area-id

在指定网段使用ospf:[Quidway-ospf-1-area-0.0.0.0] network ip-address wildcard-mask

2、OSPF为什么是无自环的?

        每一条LSA(链路状态广播)都标记了生成者(用生成该LSA的路由器的Router ID标记),其它路由器只负责传输。这样不会在传输的过程中发生对该信息的改变或错误理解

        路由计算的算法是SPF算法。计算的结果是一棵树,路由是树上的叶子节点。从根节点到叶子节点是单向不可回复的路径

3、何时需要运行OSPF协议

网络的规模:网络中的路由器在10台以上;中等或大规模的网络。

网络的拓扑结构:网络的拓扑结构为网状,并且任意两台路由器之间都互通的需求。

其它特殊的需求:要求路由变化时能够快速收敛,要求路由协议自身的网络开销尽量降低。

对路由器自身的要求:运行OSPF协议时对路由器的CPU的处理能力及内存的大小都有一定的要求,性能很低的路由器不推荐使用OSPF协议。

二、拓扑图

三、配置命令

1、ZY-R-A路由配置命令
Router>enable 
Router#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname ZY-R-A
ZY-R-A(config)#interface loopback 0
ZY-R-A(config-if)#ip address 172.16.10.1 255.255.255.0
ZY-R-A(config-if)#no shutdown 
ZY-R-A(config-if)#exit
ZY-R-A(config)#interface fastEthernet 0/0
ZY-R-A(config-if)#ip address 192.168.20.1 255.255.255.0
ZY-R-A(config-if)#no shutdown
ZY-R-A(config-if)#exit 
ZY-R-A(config)#router ospf 100
ZY-R-A(config-router)#router-id 1.1.1.1
ZY-R-A(config-router)#network 172.16.10.0 0.0.0.255 area 1
ZY-R-A(config-router)#network 192.168.20.0 0.0.0.255 area 0

2、ZY-R-B路由配置命令
Router>enable 
Router#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname ZY-R-B
ZY-R-B(config)#interface fastEthernet 0/0
ZY-R-B(config-if)#ip address 192.168.20.2 255.255.255.0
ZY-R-B(config-if)#no shutdown 
ZY-R-B(config-if)#exit
ZY-R-B(config)#interface fastEthernet 0/1
ZY-R-B(config-if)#ip address 192.168.30.1 255.255.255.0 
ZY-R-B(config-if)#no shutdown
ZY-R-B(config-if)#exit
ZY-R-B(config)#router ospf 100
ZY-R-B(config-router)#router-id 2.2.2.2 
ZY-R-B(config-router)#network 192.168.20.0 0.0.0.255 area 0
ZY-R-B(config-router)#network 192.168.30.0 0.0.0.255 area 0

3、ZY-R-C路由配置命令
Router>enable 
Router#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname ZY-R-C
ZY-R-C(config)#interface loopback 0
ZY-R-C(config-if)#ip address 10.10.10.1 255.255.255.0
ZY-R-C(config-if)#no shutdown 
ZY-R-C(config-if)#exit
ZY-R-C(config)#interface fastEthernet 0/1
ZY-R-C(config-if)#ip address 192.168.30.2 255.255.255.0
ZY-R-C(config-if)#no shutdown
ZY-R-C(config-if)#exit
ZY-R-C(config)#router ospf 100
ZY-R-C(config-router)#router-id 3.3.3.3
ZY-R-C(config-router)#network 192.168.30.0 0.0.0.255 area 0
ZY-R-C(config-router)#network 10.10.10.0 0.0.0.255 area 2

四、验证过程

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/859916.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号