boxmoe_header_banner_img

⋅無⋅限⋅進⋅步⋅

加载中

文章导读

13.8OSPF单区域实验


avatar
yuhui 2025年10月22日 39

13.8 OSPF单区域实验

项目拓扑:

1741673390454-8ee6ad71-f790-4589-a553-2d565506f9c5.png

项目地址规划:

1741673390455-4cdcf368-f697-490a-845f-30637337d60a.png

项目实施:

配置:

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路由表:

1741673390453-4c49b377-ba3f-4815-b034-00737ebcd862.png

R1配置(show running):

1741673390476-ab01597a-55e9-460f-a26c-2538aef52c56.png

1741673390609-7ae980c0-5f0a-4a21-b762-8a3c4bfd4380.png

R2路由表:

1741673390942-e04051ed-c4f9-4ab0-80d6-b7fc498f7266.png

R2配置(show running):

1741673390913-7e51b480-b474-42b8-a7c0-59e102f6731d.png

1741673390870-9a04c5df-47f3-41ec-8d61-f780c5482767.png

R3路由表:

1741673390995-01d60a0a-4d5a-4b02-bfbb-26a639ab5a75.png

R3配置(show running):

1741673391037-9a85e121-686e-43db-adb3-a54eea5b2d90.png

1741673391152-45940783-8dc7-4bd7-bb7d-4e001ef314fb.png

R4路由表:

1741673391252-bca9720b-901c-4c89-8e4a-6d9f2105a448.png

R4配置(show running):

1741673391469-d20be4a5-9fa8-467f-b63e-dc6f612fc83e.png

1741673391495-8a96787b-08c2-4ddf-8b09-a533b0ef4058.png

R5路由表:

1741673391526-d5b5cf93-d7c0-4e69-ae9d-369d36cede05.png

R5配置(show running):

1741673391731-8b42e504-9bda-4861-9bcb-d12203282db0.png

1741673391519-bc803bd9-d58f-4f4d-8ef3-c1ce434c1d27.png

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



评论(0)

查看评论列表

暂无评论


发表评论

表情 颜文字

插入代码