ospf动态路由实验

在这里插入图片描述

动态路由协议
ospf:开放式最短路径优先(Open Shortest Path First)协议是IETF定义的一种基于链路状态的内部网关路由协议
作用:主要用于大型网络,运营商,政府机构。这种环境有多个节点需要互联互通,此时建议使用动态路由协议ospf
相比静态路由优点:支持更多网络节点,配置更简单,网络更加稳定,可靠性更高,容易扩展,更加灵活,自动识别最优的下一跳

ospf两层结构(层次化结构)
骨干区域(核心区域)
常规区域

配置直连路由以及各PC的网络配置

PC1:
ip: 1.1.1.2
netmask: 255.255.255.0
gateway: 1.1.1.1

PC2:
ip: 3.3.3.2
netmask: 255.255.255.0
gateway: 3.3.3.1

PC3:
ip: 2.2.2.2
netmask: 255.255.255.0
gateway: 2.2.2.1

R1配置命令:
system-view
sysname R1
interface e0/0/0
ip address 12.1.1.1 24
interface e0/0/1
ip address 1.1.1.1 24

R2配置命令:
system-view
sysname R2
interface e0/0/0
ip address 12.1.1.2 24
interface e0/0/1
ip address 23.1.1.2 24
interface g0/0/0
ip address 2.2.2.1 24

R3配置命令:
system-view
sysname R3
interface e0/0/0
ip address 23.1.1.1 24
interface e0/0/1
ip address 3.3.3.1 24

配置ospf路由
PS: 使用正掩码和反掩码都可

R1:
ospf
area 0
network 1.1.1.0 255.255.255.0
network 12.1.1.0 0.0.0.255
display this

R2:
ospf
area 0
network 12.1.1.0 0.0.0.255
network 23.1.1.0 0.0.0.255
network 2.2.2.0 0.0.0.255
display this

R1:
ospf
area 0
network 23.1.1.0 255.255.255.0
network 3.3.3.0 0.0.0.255
display this

查看各个的路由表
R1:
在这里插入图片描述
R2:
在这里插入图片描述
R3:
在这里插入图片描述

验证结果
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

发布了100 篇原创文章 · 获赞 29 · 访问量 8140

猜你喜欢

转载自blog.csdn.net/mochu7777777/article/details/105642571