🐣不熟悉和理解OSPF动态协议的小可爱可以回顾一下OSPF路由原理详解与关键点
🐤这篇在这个专栏 华为_可惜已不在的博客-CSDN博客
🐥有用的话就留下一个三连吧😼
目录
一.
实验拓扑
二.
实验配置 (命令可以直接复制粘贴到CLI中)
R1:
un ter mo
sys
sysname R1
interface GigabitEthernet0/0/0
ip address 192.168.12.1 24
interface GigabitEthernet0/0/1
ip address 192.168.13.1 24
interface GigabitEthernet0/0/2
ip address 192.168.14.1 24
ospf router-id 1.1.1.1
area 0
net 192.168.12.0 0.0.0.255
quit
area 1
net 192.168.13.0 0.0.0.255
quit
area 2
net 192.168.14.0 0.0.0.255
quit
R2:
un ter mo
sys
sys R2
interface GigabitEthernet0/0/0
ip address 192.168.12.2 24
interface LoopBack0
ip address 2.2.2.2 32
q
ospf router-id 2.2.2.2
area 0
net 192.168.12.0 0.0.0.255
net 2.2.2.2 0.0.0.0
quit
R3:
un ter mo
sys
sys R3
interface GigabitEthernet0/0/1
ip address 192.168.13.3 24
interface LoopBack0
ip address 3.3.3.3 32
quit
ospf router-id 3.3.3.3
area 1
net 192.168.13.0 0.0.0.255
net 3.3.3.3 0.0.0.0
quit
R4:
un ter mo
sys
sys R4
interface GigabitEthernet0/0/2
ip address 192.168.14.4 24
interface LoopBack0
ip address 4.4.4.4 32
quit
ospf router-id 4.4.4.4
area 2
net 192.168.14.0 0.0.0.255
net 4.4.4.4 0.0.0.0
quit
三.
实验验证
在R1上查看邻居表建立的情况
Area Id 则为不同的区域,区域0转换就是 0.0.0.0,范围为0-4294967295
在R1上查看路由表
非骨干区域必须要和骨干区域连接
骨干区域即为区域0
R2 ping R3,R4