13.8 OSPF单区域实验
项目拓扑:

项目地址规划:

项目实施:
配置:
R1:
en
conf t
hostname R1
int s0/3/0
ip add 10.0.15.1 255.255.255.0
no sh
ip ospf cost 5
exi
int g0/2
ip add 10.1.1.1 255.255.255.0
no sh
ip ospf cost 2
exi
int g0/1
no sh
ip add 10.0.14.1 255.255.255.0
ip ospf cost 20
exi
int g0/0
no sh
ip add 10.0.12.1 255.255.255.0
ip ospf cost 20
exi
route ospf 1
network 10.0.12.0 0.0.0.255 a 0
network 10.0.14.0 0.0.0.255 a 0
network 10.1.1.0 0.0.0.255 a 0
network 10.0.15.0 0.0.0.255 a 0
R2:
en
conf t
hostname R2
int g0/2
ip add 10.2.1.1 255.255.255.0
ip ospf cost 2
no sh
exi
int g0/1
no sh
ip add 10.0.23.2 255.255.255.0
ip ospf cost 10
exi
int g0/0
no sh
ip add 10.0.12.2 255.255.255.0
ip ospf cost 20
exi
route ospf 1
network 10.0.12.0 0.0.0.255 a 0
network 10.0.23.0 0.0.0.255 a 0
network 10.2.1.0 0.0.0.255 a 0
R3:
en
conf t
hostname R3
int g0/2
ip add 10.3.1.1 255.255.255.0
ip ospf cost 2
no sh
exi
int g0/1
no sh
ip add 10.0.23.1 255.255.255.0
ip ospf cost 10
exi
int g0/0
no sh
ip add 10.0.34.1 255.255.255.0
ip ospf cost 10
exi
route ospf 1
network 10.0.34.0 0.0.0.255 a 0
network 10.0.23.0 0.0.0.255 a 0
network 10.3.1.0 0.0.0.255 a 0
R4:
en
conf t
hostname R4
int g0/2
ip add 10.4.1.1 255.255.255.0
ip ospf cost 2
no sh
exi
int s0/3/1
no sh
ip add 10.0.45.1 255.255.255.0
ip ospf cost 10
exi
int g0/1
no sh
ip add 10.0.14.2 255.255.255.0
ip ospf cost 20
exi
int g0/0
no sh
ip add 10.0.34.2 255.255.255.0
ip ospf cost 10
exi
route ospf 1
network 10.0.34.0 0.0.0.255 a 0
network 10.0.14.0 0.0.0.255 a 0
network 10.4.1.0 0.0.0.255 a 0
network 10.0.45.0 0.0.0.255 a 0
R5:
en
conf t
hostname R5
int g0/2
ip add 10.5.1.1 255.255.255.0
ip ospf cost 2
no sh
exi
int s0/3/1
no sh
ip add 10.0.45.2 255.255.255.0
ip ospf cost 10
exi
int s0/3/0
no sh
ip add 10.0.15.2 255.255.255.0
ip ospf cost 5
exi
route ospf 1
network 10.0.45.0 0.0.0.255 a 0
network 10.0.15.0 0.0.0.255 a 0
network 10.5.1.0 0.0.0.255 a 0
S1:
en
conf t
hostname S1
int vlan 1
ip add 10.1.1.2 255.255.255.0
no sh
exi
ip default 10.1.1.1
S2:
en
conf t
hostname S2
int vlan 1
ip add 10.2.1.2 255.255.255.0
no sh
exi
ip default 10.2.1.1
S3:
en
conf t
hostname S3
int vlan 1
ip add 10.3.1.2 255.255.255.0
no sh
exi
ip default 10.3.1.1
S4:
en
conf t
hostname S4
int vlan 1
ip add 10.4.1.2 255.255.255.0
no sh
exi
ip default 10.4.1.1
S5:
en
conf t
hostname S5
int vlan 1
ip add 10.5.1.2 255.255.255.0
no sh
exi
ip default 10.5.1.1
截图:
R1路由表:

R1配置(show running):


R2路由表:

R2配置(show running):


R3路由表:

R3配置(show running):


R4路由表:

R4配置(show running):


R5路由表:

R5配置(show running):


更新: 2025-03-11 14:09:55
原文: https://www.yuque.com/yuhui.net/network/btsl17fiw240gocs

评论(0)
暂无评论