拓撲圖如下:為了熟悉命令,兩端設計成單臂路由形式,
二層交換機:可自行配置
OSPF:開放最短路徑優先,屬于:IGP-內部網關協議,鏈路狀態協議,收斂快,(RIP:距離矢量協議)
左側路由:
en
conf t
in f 1/0
no sh
in f 1/0.1
en d 10
ip ad 192.168.10.1 255.255.255.0
in f 1/0.2
en d 20
ip ad 192.168.11.1 255.255.255.0
in f 0/0
no sh
ip ad 1.1.1.1 255.255.255.252
ro ospf 1 //進入OSPF協議配置模式
net 192.168.10.0 0.0.0.255 area 0 //發布192.168.10.0網段,骨干區域0
net 192.168.11.0 0.0.0.255 a 0 //0.0.0.255是通配符(主機掩碼),表
//示: 192.168.10.0網段里的所有主機發的數
//據包都可以通過
net 1.1.1.0 0.0.0.3 a 0
右側路由:
en
conf t
in f 1/0
no sh
in f 1/0.1
en d 10
ip ad 192.168.12.1 255.255.255.0
in f 1/0.2
en d 20
ip ad 192.168.13.1 255.255.255.0
in s2/0
no sh
ip ad 1.1.2.2 255.255.255.252
ro ospf 1 //進入OSPF協議配置模式
net 192.168.12.0 0.0.0.255 area 0 //發布192.168.10.0網段,骨干區域0
net 192.168.13.0 0.0.0.255 a 0
net 1.1.2.0 0.0.0.3 a 0
中間路由:
en
conf t
in f 1/0
no sh
ip ad 192.168.14.1 255.255.255.0
in f 0/0
no sh
ip ad 1.1.1.2 255.255.255.252
in s2/0
no sh
ip ad 1.1.2.1 255.255.255.252
ro ospf 1 //進入OSPF協議配置模式
net 192.168.14.0 0.0.0.255 area 0 //發布192.168.10.0網段,骨干區域0
net 1.1.1.0 0.0.0.3 a 0
net 1.1.2.0 0.0.0.3 a 0
可自行測驗,
涉及的英文基本單詞
destination:目的 host:主機 unreachable:不可到達
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/340648.html
標籤:其他
