目录
前言
此篇文章为 OSPF多区域试验,建议先食用OSPF单区域实验,理解实验原理 学习基本配置,再来使用此篇,效果更佳!(当然如果你已经了解原理与基本配置,当我没说!)OSPF 单区域实验原理详解https://blog.csdn.net/qq_47704742/article/details/144020254?sharetype=blogdetail&sharerId=144020254&sharerefer=PC&sharesource=qq_47704742&spm=1011.2480.3001.8118
趁热打铁,在掌握了基本原理与配置之后。做一个简单的OSPF多区域实验巩固一下!
实验拓扑
实验需求
1.按照图示搭建拓扑,并且配置IP地址
2.使用环回口作为路由器的Router-ID
3.将地址宣告到各个区域中,其中RTA和RTC的环回口宣告到骨干区域
4.测试效果:用RTDpingRTE,检查他们的互通性,并在各台路由器上查看路由表以及邻居表
实验解析
路由器配置
配置接口IP地址及环回地址
RTA:
[RRA]interface LoopBack 0
[RRA-LoopBack0]ip address 1.1.1.1 32
[RRA-LoopBack0]interface G 0/0
[RRA-GigabitEthernet0/0]ip address 172.16.1.1 24
[RRA-LoopBack0]interface G 0/1
[RRA-GigabitEthernet0/1]ip address 172.16.4.1 24
RTB:
[RTB]interface GigabitEthernet 0/0
[RTB-GigabitEthernet0/0]ip address 172.16.1.2 24
[RTB-GigabitEthernet0/0]interface GigabitEthernet 0/1
[RTB-GigabitEthernet0/1]ip address 172.16.2.2 24
[RTB-GigabitEthernet0/1]interface Loopback 0
[RTB-LoopBack0]ip address 2.2.2.2 32
RTC:
[RTC]interface GigabitEthernet 0/1
[RTC-GigabitEthernet0/1]ip address 172.16.2.1 24
[RTC]interface GigabitEthernet 0/1
[RRC-GigabitEthernet0/1]ip address 172.16.3.1 24
[RTC-GigabitEthernet0/1]interface Loopback 0
[RTC-LoopBack0]ip address 3.3.3.3 32
RTD:
[RTC]interface GigabitEthernet 0/1
[RTD-GigabitEthernet0/1]ip address 172.16.4.2 24
[RTD-GigabitEthernet0/1]interface Loopback 0
[RTD-LoopBack0]ip address 4.4.4.4 32
RTE:
[RTE]interface GigabitEthernet 0/0
[RTE-GigabitEthernet0/0]ip address 172.16.3.2 24
[RTE-GigabitEthernet0/0]interface Loopback 0
[RTE-LoopBack0]ip address 5.5.5.5 32
使用环回口作为路由器的 Router-ID
[RRA]ospf router-id 1.1.1.1
[RRB]ospf router-id 2.2.2.2
[RRC]ospf router-id 3.3.3.3
[RRD]ospf router-id 4.4.4.4
[RRE]ospf router-id 5.5.5.5
将路由器接口地址宣告到骨干区域里
RTA:
[RRA-ospf-1]area 0
[RRA-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[RRA-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.255
[RRA-ospf-1]area 1
[RRA-ospf-1-area-0.0.0.1]network 172.16.4.1 0.0.0.255
RTB:
[RTB-ospf-1]area 0
[RTB-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[RTB-ospf-1-area-0.0.0.0]network 172.16.1.2 0.0.0.255
[RTB-ospf-1-area-0.0.0.0]network 172.16.2.2 0.0.0.255
RTC:
[RTC-ospf-1]area 0
[RTC-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[RTC-ospf-1-area-0.0.0.0]network 172.16.2.1 0.0.0.255
[RTC-ospf-1]area 2
[RTC-ospf-1-area-0.0.0.2]network 172.16.3.1 0.0.0.255
RTD:
[RTD-ospf-1]area 1
[RTD-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.0
[RTD-ospf-1-area-0.0.0.1]network 172.16.4.2 0.0.0.255
RTE:
[RTE-ospf-1]area 2
[RTE-ospf-1-area-0.0.0.2]network 5.5.5.5 0.0.0.0
[RTE-ospf-1-area-0.0.0.2]network 172.16.3.1 0.0.0.255
测试
使用 RTD ping RTE
查看路由表
查看 RTA 邻居路由表