HCIE学习之路5:OSPF的组网实验

OSPF(Open Shortest Path First)是一种开放式的链路状态路由协议,用于在IP网络中进行路由选择。它可以通过计算最短路径来确定数据包的传输路径,具有快速收敛、可靠性高、支持VLSM等优点,被广泛应用于企业级网络、互联网服务提供商等场景。

下面直接看拓扑,具体接口和链路信息已经列出

R1路由器配置信息:

system
sysname r1
interface GigabitEthernet0/0/0
ip address 172.16.10.1 255.255.255.0
interface GigabitEthernet0/0/1
ip address 172.16.20.1 255.255.255.0
interface GigabitEthernet2/0/0
ip address 172.16.1.254 255.255.255.0
ospf 1
area 0.0.0.0
network 172.16.1.0 0.0.0.255
network 172.16.10.0 0.0.0.255
network 172.16.20.0 0.0.0.255

R2路由器配置信息:

system
sysname r2
interface GigabitEthernet0/0/0
ip address 172.16.10.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 172.16.30.2 255.255.255.0
interface GigabitEthernet2/0/0
ip address 172.16.2.254 255.255.255.0
ospf 1
area 0.0.0.0
network 172.16.2.0 0.0.0.255
network 172.16.10.0 0.0.0.255
network 172.16.30.0 0.0.0.255

R3路由器配置信息:

system
sysname r3
interface GigabitEthernet0/0/0
ip address 172.16.10.2 255.255.255.0
interface GigabitEthernet0/0/1
ip address 172.16.20.2 255.255.255.0
interface GigabitEthernet2/0/0
ip address 172.16.3.254 255.255.255.0
ospf 1
area 0.0.0.0
network 172.16.3.0 0.0.0.255
network 172.16.10.0 0.0.0.255
network 172.16.20.0 0.0.0.255

PC1的静态ip地址配置信息如下,同理PC2和PC3按照PC1进行对应配置:

测试一下网络连通性,发现到2.1和3.1都是通的,网络没问题:

通过OSPF就实现了3个路由器3个不同网段3个PC机的互相访问。

发表评论

zh_CNChinese