0
点赞
收藏
分享

微信扫一扫

Cisco:OSPF路由协议,不同area区域实现通信

40dba2f2a596 2022-04-29 阅读 85
网络协议

Cisco:OSPF多area的配置


目录


实验背景拓扑


一:首先配置每个接口对应的ip地址

1、SH1的接口ip配置以及loopback配置

SH1>
SH1>enable
SH1#config terminal 
SH1#config)#interface s0/1/0
SH1(config-if)#ip address 192.168.1.1 255.255.255.0
SH1(config-if)#no shutdown
SH1#config)#interface loopback 0 //配置环回接口ip地址
SH1(config-if)# ip address 192.168.64.1 255.255.255.0
SH1(config-if)#no shutdown

2、BJ1的接口ip配置以及loopback配置

BJ1>
BJ1>enable
BJ1#config terminal 
BJ1#config)#interface s0/1/0
BJ1(config-if)#ip address 192.168.1.3 255.255.255.0
BJ1(config-if)#no shutdown
BJ1#config)#interface s0/1/1
BJ1(config-if)#ip address 192.168.224.1 255.255.255.0
BJ1(config-if)#no shutdown
BJ1#config)#interface loopback 0 //配置环回接口ip地址
BJ1(config-if)#ip address 192.168.3.1 255.255.255.0
BJ1(config-if)#no shutdown

3、GZ1的接口ip配置

GZ1>
GZ1>enable
GZ1#config terminal 
GZ1#config)#interface s0/1/0
GZ1(config-if)#ip address 192.168.224.2 255.255.255.0
GZ1(config-if)#no shutdown

二:配置ospf划分不同区域

//上海路由器配置
SH1#config)router ospf 1 //启动ospf
SH1(config-router)#network 192.168.64.0 0.0.0.255 area 1 //宣告直连网段,再划分区域为area 1
     // 配置ospf手工路由汇总	 网段         反掩码     区域号
SH1(config-router)#network 192.168.3.0 0.0.0.255 area 0
SH1(config-router)#redistribute rip 
SH1#(config)#router rip    
SH1(config-router)#network 10.0.0.0 

//北京路由器配置
BJ1(config)#router ospf 1
BJ1(config-router)#network 192.168.1.0 0.0.0.255 area 0
BJ1(config-router)#network 192.168.3.0 0.0.0.255 area 0
BJ1(config-router)#network 192.168.224.0 0.0.0.255 area 51
BJ1(config-router)#area 51 stub no-summary //使北京路由器成为一个完全末梢区域area 51

//广州路由器配置
BJ1(config)#router ospf 1
BJ1(config-router)#network 192.168.224.0 0.0.0.255 area 51
BJ1(config-router)#area 51 stub //配置表明此区域属于末梢区域

三:查看路由信息,以及ospf

# show ip route  //查看路由表信息
# show ip route ospf  //查看路由表信息中的OSPF,且只查看的是ospf学习到的路由
# show running-config   //查看配置配置信息以及端口协议信息
# show ip ospf // 查看在路由器上的ospf是如何配置的
# show ip ospf database //查看在LSDB内的所有LSA的数据信息
# show ip ospf nerghbor //查看ospf邻居和邻接关系(full表示邻居状态正常)
# show ip protocol // 查看ospf协议配置信息
# show ip interface //查看接口上的ospf(其实可以查看全部)
# clear ip route //清空路由表

四:测试连通性

1:SH1上海ping BJ1北京
在这里插入图片描述2:SH1上海ping GZ1广州
在这里插入图片描述3:SHpingBJ的loopback
在这里插入图片描述4:SHping 上海的loopback
在这里插入图片描述

举报

相关推荐

0 条评论