ospf多区域配置(思科和中兴)

*中兴
一、实验目的
掌握了OPSF动态路由协议的工作原理,以及OSPF区域划分的作用和原理,了解路由器中OSPF动态路由多区域划分的基本配置方法和结果验证。
二、实验内容
完成中兴路由器OSPF动态路由多区域划分的基本配置和结果验证
三、实验流程
(一)配置任务说明
如图1-1所示,在路由器R1和路由器R2上运行OPSF,并将网络划分为三个区域,请完成OSPF 多区域的基本配置,实现是三个区域之间的互联互通。
在这里插入图片描述
图1-1
(二)实验配置过程
1、路由器R1的基本配置
R1#configure terminal
R1(config)#ip routing
R1(config)#interface loopback1
R1(config-if-loopback1)#ip address 1.1.1.1 255.255.255.255
R1(config-if-loopback)#exit
R1(config-if)#interface gei-2/1
R1(config-if-gei-2/1)#ip address 171.37.1.254 255.255.255.0
R1(config-if-gei-2/1)#no shutdown
R1(config-if-gei-2/1)#exit
R1(config-if)#interface gei-2/2
R1(config-if-gei-2/2)#ip address 171.37.3.1 255.255.255.0
R1(config-if-gei-2/2)#no shutdown
R1(config-if-gei-2/2)#exit
R1(config)#router ospf 1
R1(config-ospf-1)#router-id 1.1.1.1
R1(config-ospf-1)# area 23
R1(config-ospf-1-area-23)#network 171.37.1.0 0.0.0.255
R1(config-ospf-1)#area 0
R1(config-ospf-1-area-0)#network 171.37.3.0 0.0.0.255
R1(config-ospf-1-area-0)#network 1.1.1.1 0.0.0.0
2、路由器R2的基本配置
R2#configure terminal
R2(config)#ip routing
R2(config)#interface loopback1
R2(config-if)#ip address 1.1.1.2 255.255.255.255
R2(config-if)#exit
R2(config)#interface gei-2/1
R2(config-if-gei-2/1)#ip address 171.37.2.254 255.255.255.0
R2(config-if-gei-2/1)#no shutdown
R2(config-if-gei-2/1)#exit
R2(config-if)#interface gei-2/2
R2(config-if-gei-2/2)#ip address 171.37.3.2 255.255.255.0
R2(config-if-gei-2/2)#no shutdown
R2(config-if-gei-2/2)#exit
R2(config)#router ospf 1
R2(config-ospf-1)#router-id 1.1.1.2
R2(config-ospf-l)#area 24
R2(config-ospf-l-area-24)#network 171.37.2.0 0.0.0.255
R2(config-ospf-l)#area 0
R2(config-ospf-l-area-0)#network 171.37.3.0 0.0.0.255
R2(config-ospf-l-area-0)#network 1.1.1.2 0.0.0.0
四、查看和验证
(一)实验结果查看
R1:
show ip forwwording route
在这里插入图片描述
在这里插入图片描述
show ip ospf:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
R2:
show ip ospf neighbor
在这里插入图片描述
show ip forwording route
在这里插入图片描述

show ip opsf :
在这里插入图片描述
在这里插入图片描述

(二)实验结果验证
在这里插入图片描述
在这里插入图片描述
思科
一、实验目的
掌握了OPSF动态路由协议的工作原理,以及OSPF区域划分的作用和原理,了解路由器中OSPF动态路由多区域划分的基本配置方法和结果验证。
二、实验内容
完成路由器OSPF动态路由多区域划分的基本配置和结果验证
三、实验流程
(一)配置任务说明
如图1-1,所示,在路由器R1和路由器R2上运行OPSF,并将网络划分为三个区域,请完成OSPF 多区域的基本配置,实现是三个区域之间的互联互通
在这里插入图片描述
图1-1
(二)实验配置过程
1、路由器R1的基本配置
R1#configure terminal
R1(config)#ip routing
R1(config)#interface loopback1
R1(config-if)#ip address 1.1.1.1 255.255.255.255
R1(config-if)#exit
R1(config)#interface f0/0
R1(config-if)#ip address 171.11.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface f1/0
R1(config-if)#ip address 171.11.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#router ospf 10
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 171.11.1.0 0.0.0.255 area 1
R1(config-router)#network 171.11.2.0 0.0.0.255 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
2、路由器R2的基本配置
R2#configure terminal
R2(config)#ip routing
R2(config)#interface loopback1
R2(config-if)#ip address 1.1.1.2 255.255.255.255
R2(config-if)#exit
R2(config)#interface f0/0
R2(config-if)#ip address 171.11.3.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface f1/0
R2(config-if)#ip address 171.11.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#router ospf 10
R2(config-router)#router-id 1.1.1.2
R2(config-router)#network 171.11.3.0 0.0.0.255 area 2
R2(config-router)#network 171.11.2.0 0.0.0.255 area 0
R2(config-router)#network 1.1.1.2 0.0.0.0 area 0
四、查看和验证
(一)实验结果查看
R1:
在这里插入图片描述
在这里插入图片描述

R2:
在这里插入图片描述
在这里插入图片描述
(二)实验结果验证
在这里插入图片描述