[Lab 2] OSPF专题
[Lab 2] OSPF專題
OSPF(Open Shortest Path First,開放最短鏈路優先)路由協議是典型的鏈路狀態路
由協議。OSPF 由IETF 在20 世紀80 年代末期開發,OSPF 是SPF 類路由協議中的開放式版本。
最初的OSPF 規范體現在RFC1131 中,被稱為OSPF 版本1,但是版本1 很快被進行了重大改
進的版本所代替,這個新版本體現在RFC1247 文檔中。RFC1247 被稱為OSPF 版本2,是為了
明確指出其在穩定性和功能性方面的實質性改進。這個OSPF 版本有許多更新文檔,每一個
更新都是對開放標準的精心改進。接下來的一些規范出現在RFC1583 和2328 中。OSPF 版本
2 的最新版體現在RFC 2328?中。而OSPF 版本3 是關于IPv6 的。OSPF 的內容多而復雜,所
以本書分了多個章節來介紹。本章只討論單區域的OSPF。
OSPF 作為一種內部網關協議(Interior Gateway Protocol,IGP),用于在同一個自治
系統(AS)中的路由器之間交換路由信息。OSPF 的特性如下:
1. 可適應大規模網絡;
2. 收斂速度快;
3. 無路由環路;
4. 支持VLSM 和CIDR;
5. 支持等價路由;
6. 支持區域劃分, 構成結構化的網絡;
7. 提供路由分級管理;
8. 支持簡單口令和MD5 認證;
9. 以組播方式傳送協議報文;
10. OSPF 路由協議的管理距離是110;
11. OSPF 路由協議采用cost 作為度量標準;
12. OSPF 維護鄰居表、拓撲表和路由表。
另外,OSPF 將網絡劃分為四種類型:廣播多路訪問型(BMA)、非廣播多路訪問型(NBMA)、
點到點型(Point-to-Point)、點到多點型(Point-to-MultiPoint)。不同的二層鏈路的類
型需要OSPF 不同的網絡類型來適應。
下面的幾個術語是學習OSPF 要掌握的:
1. 鏈路:鏈路就是路由器用來連接網絡的接口;
2. 鏈路狀態:用來描述路由器接口及其與鄰居路由器的關系。所有鏈路狀態信息構成
鏈路狀態數據庫;
3. 區域:有相同的區域標志的一組路由器和網絡的集合。在同一個區域內的路由器有
相同的鏈路狀態數據庫;
4. 自治系統:采用同一種路由協議交換路由信息的路由器及其網絡構成一個自治系統;
5. 鏈路狀態通告(LSA):LSA 用來描述路由器的本地狀態,LSA 包括的信息有關于路由
器接口的狀態和所形成的鄰接狀態;
6. 最短路經優先(SPF)算法:是OSPF 路由協議的基礎。SPF 算法有時也被稱為Dijkstra
算法,這是因為最短路徑優先算法(SPF)是Dijkstra 發明的。OSPF 路由器利用 SPF,獨立
地計算出到達任意目的地的最佳路由。
1-單區域OSPF
1-1 點到點鏈路上的OSPF
(loopback 1.1.1.1)R1 (S1/0)---(S1/1)R2(S1/0)---(S1/1)R3(loopback 3.3.3.3)
每臺路由器運行ospf在R1上看路由表
1-1-1loopback interface in ospf
R1#sh ip route ospf
3.0.0.0/32?is subnetted, 1 subnets
O 3.3.3.3 [110/129] via 12.1.1.2, 00:01:38, Serial1/0
為什么這里是3.0.0.0/32 ?
環回接口OSPF 路由條目的掩碼長度都是32 位,這是環回接口的特性,盡管通告了
24 位,解決的辦法是在環回接口下修改網絡類型為“Point-to-Point”,操作如下:
R23(config)#interface loopback 0
R3(config-if)#ip ospf network point-to-point
這樣收到的路由條目的掩碼長度和通告的一致。
1-1-2-ospf metric
3.3.3.0/24 度量值 129是怎么得來的?
Metric = 100/8000 + 100/1.544 + 100/1.544 (單位兆bps)思科算法不會四舍五入.
1-1-3-show ip protocol
Routing Protocol is "ospf 110"
//當前路由器的進程號 110
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 1.1.1.1
//當前路由器ID
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
//本路由器參與的區域號,數量和類型
Maximum path: 4
//支持等價路徑最大數目
Routing for Networks:
0.0.0.0 255.255.255.255 area 0
//以上表明OSPF 通告的網絡以及這些網絡所在的區域
Reference bandwidth unit is 100 mbps
//參考帶寬為10^8
//修改命令:
R1(config-router)#auto-cost reference-bandwidth 1000
Routing Information Sources:
Gateway Distance Last Update
3.3.3.3 110 00:06:50
2.2.2.2 110 00:06:50
//路由信息源
Distance: (default is 110)
//ospf AD值
1-1-4-show ip ospf
該命令顯示OSPF 進程及區域的細節,如路由器運行SPF 算法的次數等。
R1#sh ip ospf 110
Routing Process "ospf 110" with ID 1.1.1.1
Start time: 00:02:07.160, Time elapsed: 00:19:14.876
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Area BACKBONE(0)
\\該區域為骨干區域
Number of interfaces in this area is 2 (1 loopback)
Area has no authentication
\\沒有認證
SPF algorithm last executed 00:13:30.488 ago
SPF algorithm executed 4 times
\\spf算法執行了幾次
Area ranges are
Number of LSA 3. Checksum Sum 0x011413
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
1-1-5-show ip ospf interface
R1#sh ip ospf interface s1/0
Serial1/0 is up, line protocol is up
Internet Address 12.1.1.1/24, Area 0
Process ID 110, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 64
//進程ID,路由器ID,網絡類型,接口Cost 值
Transmit Delay is 1 sec, State POINT_TO_POINT
//接口的延遲和狀態
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
//顯示幾個計時器的值
// wait timer 40s 當是two-way狀態下需要等待40s來選擇DR/BDR
oob-resync timeout 40
Hello due in 00:00:04
//距離下次發送Hello 包的時間
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
//以上兩行表示啟用了IETF 和Cisco 的NSF 功能
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
//鄰居的個數以及已建立鄰接關系的鄰居的個數
Adjacent with neighbor 2.2.2.2
//已經建立鄰接關系的鄰居路由器ID
Suppress hello for 0 neighbor(s)
//沒有hello抑制
1-1-6 sh ip ospf neighbor
R2#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1(R1 router id) 0 FULL/ - 00:00:37 12.1.1.1 Serial1/1
3.3.3.3(R3 router id) 0 FULL/ - 00:00:39 23.1.1.3 Serial1/0
\\PTOP 網絡不選擇 DR/BDR
① Pri:鄰居路由器接口的優先級;
② State:當前鄰居路由器接口的狀態;
③ Dead Time:清除鄰居關系前等待的最長時間;
④ Address:鄰居接口的地址;
⑤ Interface:自己和鄰居路由器相連接口;
⑥ “-”: 表示點到點的鏈路上OSPF 不進行DR 選舉。
1-1-7建立鄰居要素
OSPF 鄰居關系不能建立的常見原因:
① hello 間隔和dead 間隔不同;
② 區域號碼不一致;
③ 特殊區域(如stub,nssa等)區域類型不匹配;
④ 認證類型或密碼不一致;
⑤ 路由器ID 相同;
⑥ Hello 包被ACL deny;
⑦ 鏈路上的MTU 不匹配;
⑧ 接口下OSPF網絡類型不匹配。
Hello包發送時間表:
廣播多路訪問 10 40
非廣播多路訪問 30 120
點到點 10 40
點到多點 30 120
可以用 ip ospf hello-interval”和“ip ospf dead-interval”命令調整
1-1-8 sh ip ospf database
R2#sh ip ospf database
OSPF Router with ID (2.2.2.2) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 263 0x80000003 0x0067F8 3
2.2.2.2 2.2.2.2 257 0x80000003 0x002869 4
3.3.3.3 3.3.3.3 1958 0x80000002 0x007FB4 3
① Link ID:是指Link State ID,代表整個路由器,而不是某個鏈路;
② ADV Router:是指通告鏈路狀態信息的路由器ID;
③ Age:老化時間;
④ Seq#:序列號;
⑤ Checksum:校驗和;
⑥ Link count:通告路由器在本區域內的鏈路數目。
1-2 廣播多路訪問鏈路上的OSPF
R1(f0/0)---switch
R2(f1/0)---switch
R3(f1/0)---switch
在廣播多路訪問的連路上是要選舉DR/BDR (非搶占式)
224.0.0.5 used for all routers
224.0.0.6 only used for DR & BDR
1-2-1 DR選舉原則
① 首要因素是時間,最先啟動的路由器被選舉成DR;
② 如果同時啟動,或者重新選舉,則看接口優先級(范圍為0-255),優先級最高的被選舉成DR,默認情況下,多路訪問網絡的接口優先級為1,點到點網絡接口優先級為0,修改接口優先級的命令是“ ip ospf priority”,如果接口的優先級被設置為0,那么該接口將不參與DR 選舉;
③ 如果前兩者相同,最后看路由器ID,路由器ID 最高的被選舉成DR;
在OSPF 鄰接關系建立的過程中,接口的狀態的變化包括DOWN、init、2Way、EXSTART、
EXCHANGE、Loading 和FULL。
Init狀態:是說明我收到了鄰居的hello包,且該hello包里沒有我的active neighbor
2way狀態:是說明我收到了鄰居的hello包,且該hello包里有我的active neighbor
2- OSPF 網絡類型 [OSPF Over Frame-Relay]
2-1 OSPF over NBMA
通過這個試驗必須掌握:
(1)幀中繼靜態映射及broadcast 參數的含義
(2)NBMA 模式下的DR 選舉
(3)手工配置OSPF 鄰居
(4)NBMA 模式下OSPF 的配置和調試
<R4>怎么配置,請參考lab3 frame-replay 專題
<R123配置如下:>
===============
R1 :
===============
R1#sh run int s0/0
interface Serial0/0
ip address 192.168.123.1 255.255.255.0
encapsulation frame-relay
ip ospf priority 10 //讓HUB成為DR
serial restart-delay 0
no dce-terminal-timing-enable
frame-relay map ip 192.168.123.2 102 broadcast
frame-relay map ip 192.168.123.3 103 broadcast
no frame-relay inverse-arp
frame-relay lmi-type cisco
end
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
neighbor 192.168.123.2 \\手動指鄰居一般來說雙方指,當然單方指也ok
neighbor 192.168.123.3
===============
R2:
===============
R2#sh run int s0/0
interface Serial0/0
ip address 192.168.123.2 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
serial restart-delay 0
no dce-terminal-timing-enable
frame-relay map ip 192.168.123.1 201 broadcast
frame-relay map ip 192.168.123.3 201 \\\\這條命令是為ping 通3.3.3.3 source int s0/0
[R2的路由表: O 3.3.3.3 [110/65] via 192.168.123.3, 00:12:02, Serial0/0]
no frame-relay inverse-arp
frame-relay lmi-type cisco
end
R2#sh run | se router ospf
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0 \\這里R2并沒有指鄰居.
===============
R3:
===============
R3#sh run int s0/0
interface Serial0/0
ip address 192.168.123.3 255.255.255.0
encapsulation frame-relay
ip ospf priority 0
serial restart-delay 0
no dce-terminal-timing-enable
frame-relay map ip 192.168.123.1 301 broadcast
frame-relay map ip 192.168.123.2 301 \\這條命令是為ping 通2.2.2.2 source int s0/0
no frame-relay inverse-arp
frame-relay lmi-type cisco
end
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
=======================華麗的分割線=============================
R1#sh ip ospf int s0/0
Serial0/0 is up, line protocol is up
Internet Address 192.168.123.1/24, Area 0
Process ID 110, Router ID 0.0.0.1, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State DR, Priority 10
Designated Router (ID) 0.0.0.1, Interface address 192.168.123.1
No backup designated router on this network
\\由于r2/r3放棄DR/BDR選舉
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
oob-resync timeout 120
Hello due in 00:00:14
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 4 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 0.0.0.2
Adjacent with neighbor 0.0.0.3
Suppress hello for 0 neighbor(s)
=============================華麗的分割線=============================
總結: 在NBMA網絡中 要選DR/BDR ,且要手工指鄰居, H/D timer : 30s /120s
在BMA中, 要選DR/BDR ,不需要 手工指鄰居, H/D timer : 10s /40s
2-2 OSPF over FR點到點
實驗目的
(1)幀中繼子接口下靜態映射
(2)點到點模式的特征
(2)點到點模式下OSPF 的配置和調試
===========R1============
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
no dce-terminal-timing-enable
no frame-relay inverse-arp
!
interface Serial0/0.12 point-to-point
ip address 192.168.12.1 255.255.255.0
ip ospf priority 10
frame-relay interface-dlci 102
!
interface Serial0/0.13 point-to-point
ip address 192.168.13.1 255.255.255.0
ip ospf priority 10
frame-relay interface-dlci 103
R1#sh run | se router osp
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 192.168.12.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 0
=====================R2===============
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
no dce-terminal-timing-enable
no frame-relay inverse-arp
!
interface Serial0/0.12 point-to-point
ip address 192.168.12.2 255.255.255.0
frame-relay interface-dlci 201
R2#sh run | se router osp
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 192.168.12.0 0.0.0.255 area 0
=================================R3==================================
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
no dce-terminal-timing-enable
no frame-relay inverse-arp
!
interface Serial0/0.13 point-to-point
ip address 192.168.13.3 255.255.255.0
frame-relay interface-dlci 301
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.168.13.0 0.0.0.255 area 0
=====================華麗的分割線==========================
R1#sh ip ospf int s0/0.12
Serial0/0.12 is up, line protocol is up
Internet Address 192.168.12.1/24, Area 0
Process ID 110, Router ID 0.0.0.1, Network Type?POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured,?Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:04
Supports Link-local Signaling (LLS)
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 4 msec, maximum is 4 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 0.0.0.2
Suppress hello for 0 neighbor(s)
=======================華麗的分割線======================
R1#sh ip ospf neighbor detail
Neighbor 0.0.0.3, interface address 192.168.13.3
In the area 0 via interface Serial0/0.13
Neighbor priority is 0, State is FULL, 6 state changes
DR is 0.0.0.0 BDR is 0.0.0.0 \\不選dr/bdr
Options is 0x52
LLS Options is 0x1 (LR)
Dead timer due in 00:00:39
Neighbor is up for 00:07:00
Index 2/2, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
===============================華麗的分割線=============
總結:Point to point 網絡中 不選擇DR/BDR ,不用手工指鄰居, H/D Timer: 10s / 40s
【技術要點】
① 點到點模式的DR 和 BDR 是“0.0.0.0”;
② 點到點模式下,每個子接口需要配置不同的網絡;
③ 點到點模式下,Hello 周期為10 秒。
2-3 OSPF over FR 點到多點
===================R1==================
interface Serial0/0
no ip address
encapsulation frame-relay
serial restart-delay 0
no dce-terminal-timing-enable
no frame-relay inverse-arp
!
interface Serial0/0.2 multipoint
ip address 192.168.123.1 255.255.255.0
ip ospf priority 10
frame-relay map ip 192.168.123.2 102 broadcast
frame-relay map ip 192.168.123.3 103 broadcast
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
neighbor 192.168.123.2
neighbor 192.168.123.3
==============================R2==========================
interface Serial0/0
ip ospf network point-to-multipoint
ip address 192.168.123.2 255.255.255.0
encapsulation frame-relay
ip ospf priority 5
serial restart-delay 0
no dce-terminal-timing-enable
frame-relay map ip 192.168.123.1 201 broadcast
no frame-relay inverse-arp
frame-relay lmi-type cisco
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
!======================R3=========================
interface Serial0/0
ip ospf network point-to-multipoint
ip address 192.168.123.3 255.255.255.0
encapsulation frame-relay
ip ospf priority 5
serial restart-delay 0
no dce-terminal-timing-enable
frame-relay map ip 192.168.123.1 301 broadcast
no frame-relay inverse-arp
frame-relay lmi-type cisco
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.168.123.0 0.0.0.255 area 0
?
以上輸出表明在點到多點模式中,在路由表中會產生該網段其他各個接口的主機路由,
因此在做幀中繼映射的時候,只做到中心點的就可以了。
===================華麗的分解線================
總結:在點到多點的網絡環境,不選DR/BDR ,不需要手工配置鄰居 H/D Timer : 30s /120s
【技術要點】
(1)點到多點廣播模式可以被看成多個點到點接口的集合,然而和點到點不同的是幀
中繼接口是在同一子網上;
(2)在點到多點模式中,不需要選舉DR/BDR;
(3)Hello 包每30 秒發送一次,無需手工配置鄰居。
3-OSPF認證
3-1基于區域的認證
拓撲圖:
(lo 0)R1(s0/0)---(s0/1)R2(lo 0)
基于 Simple password 的區域認證
Router(config-router)#area 0 authentication \\路由模式下
Router(config-if)#ip ospf authentication-key cisco
基于MD5的區域認證
Router(config-router)#area 0 authentication message-digest
Router(config-if)#ip ospf message-digest-key 1 md5 cisco1
3-2基于鏈路的認證
拓撲圖:
(lo 0)R1(s0/0)---(s0/1)R2(lo 0)
基于明文的ospf鏈路認證是基于接口模式下
R1(config-if)#ip ospf authentication
R1(config-if)#ip ospf authentication-key test
基于md5的ospf鏈路認證
R1(config-if)#ip ospf authentication message-digest
R1(config-if)#ip ospf message-digest-key 1 md5 cisco
4-多區域OSPF
在一個大型OSPF 網絡中,SPF 算法的反復計算,龐大的路由表和拓撲表的維護以及LSA
的泛洪等都會占用路由器的資源,因而會降低路由器的運行效率。OSPF 協議可以利用區域
的概念來減小這些不利的影響。因為在一個區域內的路由器將不需要了解它們所在區域外的
拓撲細節。OSPF 多區域的拓撲結構有如下的優勢:
1. 降低SPF 計算頻率
2. 減小路由表
3. 降低了通告LSA 的開銷
4. 將不穩定限制在特定的區域
Router分類:
內部路由器:OSPF 路由器上所有直連的鏈路都處于同一個區域;
主干路由器:具有連接區域0 接口的路由器;
區域邊界路由器(ABR):路由器與多個區域相連;
自治系統邊界路由器(ASBR):與AS 外部的路由器相連并互相交換路由信息;
4-1 OSPF LSA類型
配置時采用環回接口盡量靠近區域0 的原則
R1:
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 1
network 12.1.1.0 0.0.0.255 area 1
R2:
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
network 2.2.2.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 1
network 23.1.1.0 0.0.0.255 area 0
R3:
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 2
R4:
router ospf 110
router-id 0.0.0.4
log-adjacency-changes
redistribute connected subnets
network 34.1.1.0 0.0.0.255 area 2
=================查看R2的路由表-=============================
R2#sh ip route ospf
34.0.0.0/24 is subnetted, 1 subnets
O IA 34.1.1.0 [110/128] via 23.1.1.3, 00:11:46, Serial0/1
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 12.1.1.1, 00:11:56, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 23.1.1.3, 00:11:46, Serial0/1
4.0.0.0/24 is subnetted, 1 subnets
O E2 4.4.4.0 [110/20] via 23.1.1.3, 00:05:51, Serial0/1
OSPF 的外部路由分為:類型1(在路由表中用代碼“E1”表示)和類型2(在路由表中
用代碼“E2”表示)。它們計算外部路由度量值的方式不同:
① 類型1(E1):外部路徑成本+數據包在OSPF 網絡所經過各鏈路成本;
② 類型2(E2):外部路徑成本,即ASBR 上的缺省設置。
在重分布的時候可以通過“metric-type”參數設置是類型1 或2,也可以通過“metric”
參數設置外部路徑成本,默認為20。
如果敲入以下命令:
R4(config-router)#redistribute connected subnets metric-type 1
====R2 (4.4.4.0) 路由條目如下====
O E1 4.4.4.0 [110/148] via 23.1.1.3, 00:00:55, Serial0/1
該條目Cost計算方法:
148 = 100/1.544 + 100/1.544 + 20
R1#sh ip ospf database
OSPF Router with ID (0.0.0.1) (Process ID 110)
Router Link States (Area 1) \\區域1類型1的LSA
Link ID ADV Router (各個RID) Age Seq# Checksum Link count
0.0.0.1 0.0.0.1 1425 0x80000002 0x00422B 3
0.0.0.2 0.0.0.2 1425 0x80000002 0x00F886 2
Summary Net Link States (Area 1) \\區域1類型3的LSA
Link ID ADV Router (ABR通告) Age Seq# Checksum
2.2.2.2?0.0.0.2?1429 0x80000001 0x002B07
3.3.3.3?0.0.0.2?1410 0x80000001 0x007F6E
23.1.1.0?0.0.0.2?1429 0x80000001 0x00BC25
34.1.1.0?0.0.0.2?1410 0x80000001 0x00AFE6
\\在路由表中顯示的是O IA的路由信息 (只要不是R1通告)
Summary ASB Link States (Area 1) \\區域1類型4的LSA
Link ID ADV Router Age Seq# Checksum
0.0.0.4 0.0.0.2(ABR通告,ASBR是誰) 1060 0x80000001 0x004C69
Type-5 AS External Link States \\5類LSA
Link ID ADV Router Age Seq# Checksum Tag
4.4.4.0 0.0.0.4 (ASBA通告) 500 0x80000002 0x00B956 0
\\在路由表中顯示的是O E1 OR O E2的路由信息
R1# sh ip route ospf
34.0.0.0/24 is subnetted, 1 subnets
O IA 34.1.1.0 [110/192] via 12.1.1.2, 00:30:22, Serial0/0
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/65] via 12.1.1.2, 00:30:33, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/129] via 12.1.1.2, 00:30:22, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets
O E1 4.4.4.0 [110/212] via 12.1.1.2, 00:15:10, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.1.1.0 [110/128] via 12.1.1.2, 00:30:33, Serial0/0
=======================華麗分割線=================================
R2#sh ip ospf database
OSPF Router with ID (0.0.0.2) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
0.0.0.2 0.0.0.2 223 0x80000003 0x001934 3
0.0.0.3 0.0.0.3 214 0x80000003 0x008FB7 3
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 0.0.0.2 222 0x80000002 0x00D91B
12.1.1.0 0.0.0.2 223 0x80000002 0x004AA1
34.1.1.0 0.0.0.3 214 0x80000002 0x0025AF
\\這條會寫入OIA的路由表
Summary ASB Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
0.0.0.4 0.0.0.3 1884 0x80000001 0x00C331
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
0.0.0.1 0.0.0.1 235 0x80000003 0x00402C 3
0.0.0.2 0.0.0.2 224 0x80000003 0x00F687 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
2.2.2.2 0.0.0.2 224 0x80000002 0x002908
3.3.3.3 0.0.0.2 224 0x80000002 0x007D6F
23.1.1.0 0.0.0.2 224 0x80000002 0x00BA26
34.1.1.0 0.0.0.2 224 0x80000002 0x00ADE7
Summary ASB Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.4 0.0.0.2 1884 0x80000001 0x004C69
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
4.4.4.0 0.0.0.4 1325 0x80000002 0x00B956 0
R2#sh ip route os
34.0.0.0/24 is subnetted, 1 subnets
O IA 34.1.1.0 [110/128] via 23.1.1.3, 00:48:06, Serial0/1
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 12.1.1.1, 00:48:16, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 23.1.1.3, 00:48:06, Serial0/1
4.0.0.0/24 is subnetted, 1 subnets
O E1 4.4.4.0 [110/148] via 23.1.1.3, 00:32:54, Serial0/1
從上看到路由器R1 和R2 的區域1的鏈路狀態數據庫完全相同。
一般來說 相同區域內的路由器具有相同的鏈路狀態數據庫,只是在虛鏈路的時候略有不同;命令“show ip ospf database”所顯示的內容并不是數據庫中存儲的關于每條LSA的全部信息,而僅僅是LSA 的頭部信息。要看LSA 的全部信息,該命令后面還有跟詳細的參數,如“show ip ospf database router”
另外一條命令查看誰是ASBR
R4#sh ip ospf 110
Routing Process "ospf 110" with ID 0.0.0.4
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
It is an autonomous system boundary router \\顯示ASBR
LSA總結:
1 路由器LSA
(O)
所有的OSPF 路由器都會產生這種數據包,用于描述路由器上連接到
某一個區域的鏈路或是某一接口的狀態信息。該LSA 只會在某一個特
定的區域內擴散,而不會擴散至其它的區域。
2 網絡LSA
(O)
由DR 產生,只會在包含DR 所處的廣播網絡的區域中擴散,不會擴散
至其它的OSPF 區域。
3 網絡匯總LSA
(O IA)
由ABR 產生,描述ABR 和某個本地區域的內部路由器之間的鏈路信息。
這些條目通過主干區域被擴散到其它的ABR。
4 ASBR 匯總LSA
(O IA)
由ABR 產生,描述到ASBR 的可達性,由主干區域發送到其它ABR。
5 外部LSA
(O E1 或E2)
由ASBR 產生,含有關于自治系統外的鏈路信息。
7 NSSA 外部LSA
(O N1 或N2)
由ASBR 產生的關于NSSA 的信息,可以在NSSA 區域內擴散,ABR 可以
將類型7 的LSA 轉換為類型5 的LSA
4-2 OSPF(完全)末節區域
末節和完全末節區域需要滿足如下的條件:
(1)區域只有一個出口
(2)區域不需要作為虛鏈路的過渡區
(3)區域內沒有ASBR
(4)區域不是主干區域
“no-summary”阻止區域間的路由進入末節區域,所以叫完全末節區域。只需在ABR
上啟用本參數即可。
R1:
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
area 1 stub
network 1.1.1.0 0.0.0.255 area 1
network 12.1.1.0 0.0.0.255 area 1
R2:
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
area 1 stub
redistribute connected subnets
network 12.1.1.0 0.0.0.255 area 1
network 23.1.1.0 0.0.0.255 area 0
R3:
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
area 2 stub no-summary \\完全末節區域
network 3.3.3.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 2
R4:
router ospf 110
router-id 0.0.0.4
log-adjacency-changes
area 2 stub
network 4.4.4.0 0.0.0.255 area 2
network 34.1.1.0 0.0.0.255 area 2
R1#sh ip route osp
34.0.0.0/24 is subnetted, 1 subnets
O IA 34.1.1.0 [110/192] via 12.1.1.2, 00:18:54, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/129] via 12.1.1.2, 00:18:54, Serial0/0
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/193] via 12.1.1.2, 00:18:54, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.1.1.0 [110/128] via 12.1.1.2, 00:20:26, Serial0/0
O*IA 0.0.0.0/0 [110/65] via 12.1.1.2, 00:20:26, Serial0/0
以上的輸出表明R2 重分布進來的環回接口的路由并沒有在R1 的路由表中出現,說明末
節區域不接收類型5 的LSA,也就是外部路由;同時末節區域1的ABR R2 自動向該區域內
傳播0.0.0.0/0 的默認路由;末節區域可以接收區域間路由。
R4#sh ip route
Gateway of last resort is 34.1.1.3 to network 0.0.0.0
34.0.0.0/24 is subnetted, 1 subnets
C 34.1.1.0 is directly connected, Serial0/0
4.0.0.0/24 is subnetted, 1 subnets
C 4.4.4.0 is directly connected, Loopback0
O*IA 0.0.0.0/0 [110/65] via 34.1.1.3, 00:44:52, Serial0/0
以上輸出表明在完全末節區域2 中,R4 的路由表中除了直連和區域內路由,全部被默
認路由代替,證明完全末節區域不接收外部路由和區域間路由,只有區域內的路由和一條由
ABR 向該區域注入的默認路由。
4-3 OSPF NSSA 區域
R1:
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
area 1 nssa
redistribute connected subnets
network 12.1.1.0 0.0.0.255 area 1
R2:
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
area 1 nssa
network 2.2.2.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 1
network 23.1.1.0 0.0.0.255 area 0
R3:
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
redistribute rip subnets
network 3.3.3.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
router rip
version 2
redistribute ospf 110 metric 2
network 34.0.0.0
no auto-summary
R4:
router rip
version 2
network 4.0.0.0
network 34.0.0.0
no auto-summary
R1#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/65] via 12.1.1.2, 00:06:08, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/129] via 12.1.1.2, 00:06:08, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
O IA 23.1.1.0 [110/128] via 12.1.1.2, 00:06:08, Serial0/0
以上的輸出表明區域間的路由是可以進入到NSSA 區域的;但是在R1 的路由表中并沒有
出現在R3 上把RIP 重分布進來的路由,因此說明LSA 類型為5 的外部路由不能在NSSA 區域
中傳播,ABR 也沒有能力把類型5 的LSA 轉成類型7 的LSA。
如果不想在NSSA 區域中出現區域間的路由,則在ABR 的路由器上配置NSSA 區域時加上
“no-summary”參數即可。這時ABR 也會自動向NSSA 區域注入一條“O IA”的默認路由 (* O IA),配置如下:
R2(config-router)#area 1 nssa no-summary
為了讓R1 可以ping 通 R3重分布進來的路由,我們需要在R2 上做個配置:
R2(config-router)#area 1 nssa default-information-originate
那么在R1上會出現一條O*N2的路由
O*N2 0.0.0.0/0 [110/1] via 12.1.1.2, 00:00:12, Serial0/0
如果我們在R2上輸入:R2(config-router)#area 1 nssa default-information-originate no-summary
R1#sh ip route ospf
O*IA 0.0.0.0/0 [110/65] via 12.1.1.2, 00:00:04, Serial0/0
\\表明“O IA”的路由優于“O N2”的路由
在R2上看路由表:
R2#sh ip route ospf
34.0.0.0/24 is subnetted, 1 subnets
O E2 34.1.1.0 [110/20] via 23.1.1.3, 00:01:13, Serial0/1
1.0.0.0/24 is subnetted, 1 subnets
O N2 1.1.1.0 [110/20] via 12.1.1.1, 00:01:13, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 23.1.1.3, 00:01:13, Serial0/1
4.0.0.0/24 is subnetted, 1 subnets
O E2 4.4.4.0 [110/20] via 23.1.1.3, 00:01:13, Serial0/1
\\NSSA 區域的路由代碼為“O N2”或”O N1”
R2#sh ip ospf database
OSPF Router with ID (0.0.0.2) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
0.0.0.2 0.0.0.2 1063 0x80000005 0x001B2E 3
0.0.0.3 0.0.0.3 1019 0x80000005 0x008EB5 3
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
12.1.1.0 0.0.0.2 1509 0x80000002 0x004AA1
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
0.0.0.1 0.0.0.1 1054 0x80000006 0x00A5D0 2
0.0.0.2 0.0.0.2 1054 0x80000006 0x009CD6 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
0.0.0.0 0.0.0.2 346 0x80000001 0x002D07
Type-7 AS External Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 0.0.0.2 524 0x80000001 0x00BAE4 0
1.1.1.0 0.0.0.1 1076 0x80000001 0x00D4AE 0
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
1.1.1.0 0.0.0.2 1044 0x80000001 0x006329 0
4.4.4.0 0.0.0.3 1019 0x80000001 0x00454C 0
34.1.1.0 0.0.0.3 1019 0x80000001 0x000376 0
從輸出結果中表明,路由器R2 將類型7 的LSA 轉換成類型5 的LSA,并且繼續在網絡
上擴散到路由器R3。
4-4 OSPF stub 區域總結
1-stub: 過濾 4/5類LSA, 下放一條O*IA的默認路由
2-totally stub: 過濾3/4/5LSA ,下放一條O*IA的默認路由
3-NSSA: 過濾4/5 LSA,但允許本區域產生外部路由(ON2, 7類LSA),沒有下放默認路由,同時Router-id大的router(ABR)會做7轉5LSA (可以用 area 1 nssa default-information-origniate 產生一條 O*N2)
4-Totally NSSA: 過濾3/4/5 LSA, 但允許本區域產生外部路由(ON2, 7類LSA),有下放默認路由(O* IA默認路由),同時Router-id大的router(ABR)會做7轉5LSA
5-OSPF手工匯總
R1:
interface Loopback0
ip address 1.1.4.1 255.255.255.0
ip ospf 110 area 1
!
interface Loopback1
ip address 1.1.5.1 255.255.255.0
ip ospf 110 area 1
!
interface Loopback2
ip address 1.1.6.1 255.255.255.0
ip ospf 110 area 1
!
interface Loopback3
ip address 1.1.7.1 255.255.255.0
ip ospf 110 area 1
!
interface Serial0/0
ip address 12.1.1.1 255.255.255.0
ip ospf 110 area 1
router ospf 110
router-id 0.0.0.1
log-adjacency-changes
R2:
router ospf 110
router-id 0.0.0.2
log-adjacency-changes
area 1 range 1.1.4.0 255.255.252.0
\\在ABR上作區域間匯總
interface Serial0/0
ip address 23.1.1.2 255.255.255.0
ip ospf 110 area 0
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/1
ip address 12.1.1.2 255.255.255.0
ip ospf 110 area 1
serial restart-delay 0
no dce-terminal-timing-enable
!
R3:
interface Serial0/0
ip address 34.1.1.3 255.255.255.0
serial restart-delay 0
no dce-terminal-timing-enable
!
interface Serial0/1
ip address 23.1.1.3 255.255.255.0
ip ospf 110 area 0
serial restart-delay 0
no dce-terminal-timing-enable
router ospf 110
router-id 0.0.0.3
log-adjacency-changes
summary-address 4.4.0.0 255.255.252.0
\\在ASBR上做外部路由匯總
redistribute eigrp 90 subnets
router eigrp 90
redistribute ospf 110 metric 1000 10 255 1 1500
network 34.1.1.0 0.0.0.255
no auto-summary
看R2的路由表
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
34.0.0.0/24 is subnetted, 1 subnets
O E2 34.1.1.0 [110/20] via 23.1.1.3, 00:11:54, Serial0/0
1.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 1.1.5.1/32 [110/65] via 12.1.1.1, 00:11:54, Serial0/1
O 1.1.4.0/22 is a summary, 00:11:54, Null0?\\防環
O 1.1.4.1/32 [110/65] via 12.1.1.1, 00:11:54, Serial0/1
O 1.1.7.1/32 [110/65] via 12.1.1.1, 00:11:54, Serial0/1
O 1.1.6.1/32 [110/65] via 12.1.1.1, 00:11:54, Serial0/1
4.0.0.0/22 is subnetted, 1 subnets
O E2 4.4.0.0 [110/20] via 23.1.1.3, 00:07:57, Serial0/0
\\從外部學來的路由打 OE2
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/1
看R3的路由表
R3#sh ip route ospf
1.0.0.0/22 is subnetted, 1 subnets
O IA 1.1.4.0 [110/129] via 23.1.1.2, 00:13:55, Serial0/1
\\學到了 區域1 匯總過來的ospf 域間路由
4.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O 4.4.0.0/22 is a summary, 00:09:56, Null0 \\防環
12.0.0.0/24 is subnetted, 1 subnets
O IA 12.1.1.0 [110/128] via 23.1.1.2, 00:17:15, Serial0/1
6-OSPF默認路由
我們使用上圖的拓撲
主要的變化在R3上
R3上取消掉重分布,取消的外部路由匯總
R3(config)#ip route 0.0.0.0 0.0.0.0 s0/0
R3(config-router)#default-information originate [always] always用于沒有指定 ip router 0.0.0.0 0.0.0.0 就下放默認路由
在R1和R2上路由表中可以看到一條O*E2的默認路由
7-OSPF虛鏈路
在實際網絡中,可能會存在主干區域不連續或者某一個區域與主干區域物理不相連的情
況,在這兩種情況下(分割區域0和遠離區域0),可以通過虛鏈路來解決。
其實配置比較簡單
R2: R2(config-router)#area 1 virtual-link 0.0.0.3
R3: R3(config-router)#area 1 virtual-link 0.0.0.2
R2#sh ip ospf virtual-links
Virtual Link OSPF_VL0 to router 0.0.0.3 is up
Run as demand circuit
DoNotAge LSA allowed.
Transit area 1, via interface Serial0/0, Cost of using 64
Transmit Delay is 1 sec,?State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Adjacency State FULL (Hello suppressed)
Index 2/3, retransmission queue length 0, number of retransmission 1
First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
Last retransmission scan length is 1, maximum is 1
Last retransmission scan time is 0 msec, maximum is 0 msec
R2#sh ip ospF database
OSPF Router with ID (0.0.0.2) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
0.0.0.1 0.0.0.1 1458 0x80000003 0x00402C 3
0.0.0.2 0.0.0.2 964 0x80000004 0x00D03D 3
0.0.0.3 0.0.0.3 5 (DNA) 0x80000003 0x00CB11 3
0.0.0.4 0.0.0.4 118 (DNA) 0x80000003 0x006EBB 3
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
23.1.1.0 0.0.0.2 1454 0x80000001 0x00BC25
23.1.1.0 0.0.0.3 398 (DNA) 0x80000001 0x00B62A
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
0.0.0.2 0.0.0.2 964 0x80000003 0x0062FF 2
0.0.0.3 0.0.0.3 965 0x80000003 0x00560A 2
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
1.1.1.1 0.0.0.2 1444 0x80000001 0x00DB1A
4.4.4.4 0.0.0.3 1080 0x80000001 0x004B9D
12.1.1.0 0.0.0.2 1460 0x80000001 0x004CA0
34.1.1.0 0.0.0.3 1361 0x80000001 0x0027AE
R2#sh ip route
34.0.0.0/24 is subnetted, 1 subnets
O 34.1.1.0 [110/128] via 23.1.1.3, 00:16:25, Serial0/0
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 12.1.1.1, 00:16:25, Serial0/1
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
O 4.4.4.4 [110/129] via 23.1.1.3, 00:16:25, Serial0/0
23.0.0.0/24 is subnetted, 1 subnets
C 23.1.1.0 is directly connected, Serial0/0
12.0.0.0/24 is subnetted, 1 subnets
C 12.1.1.0 is directly connected, Serial0/1
配置同上
注意:
虛鏈路屬于區域0,所以在進行區域0 認證的時候,不要忘記虛鏈路的認證,例如如果
區域0 采用MD5 認證,則在虛鏈路上配置如下:
R3(config-router)#area 1 virtual-link 2.2.2.2 message-digest-key 1 md5 cisco
且虛鏈路的認證是通過物力借口去認證的
8-OSPF命令匯總
show ip route 查看路由表
show ip ospf neighbor 查看OSPF 鄰居的基本信息
show ip ospf database 查看OSPF 拓撲結構數據庫
show ip ospf interface 查看OSPF 路由器接口的信息
show ip ospf 查看OSPF 進程及其細節
debug ip ospf adj 顯示OSPF 鄰接關系創建或中斷的過程
debug ip ospf events 顯示OSPF 發生的事件
debug ip ospf packet 顯示路由器收到的所有的OSPF 數據包
router ospf 啟動OSPF 路由進程
router-id 配置路由器ID
network 通告網絡及網絡所在的區域
ip ospf network 配置接口網絡類型
ip ospf cost 配置接口cost 值
ip ospf hello-interval 配置hello 間隔
ip ospf dead-interval 配置OSPF 鄰居的死亡時間
ip ospf priority 配置接口優先級
auto-cost reference-bandwidth 配置參考帶寬
clear ip ospf process 清除OSPF 進程
area area-id authentication 啟動區域簡單口令認證
ip ospf authentication-key cisco 配置認證密碼
area area-id authentication message-digest 啟動區域MD5 認證
ip ospf message-digest-key key-id md5 key 配置key ID 及密匙
ip ospf authentication 啟用鏈路簡單口令認證
ip ospf authentication message-digest 啟用鏈路MD5 認證
default-information originate [always] 向OSPF 區域注入默認路由
本文轉自 bilinyee博客,原文鏈接: ? ?http://blog.51cto.com/ericfu/1668964?? ?如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的[Lab 2] OSPF专题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VS 解决方案平台和解决方案配置
- 下一篇: Intel 10nm为何迟迟不肯露面?良