本文顯示兩個開放最短路徑優先(OSPF)路由器,它們通過點對多點鏈路連線。
本文件沒有特定需求。
本文件所述內容不限於特定軟體和硬體版本。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
本節提供用於設定本文件中所述功能的資訊。
註:使用Command Lookup Tool(僅限註冊客戶)查詢有關本文檔中使用的命令的更多資訊。
本檔案會使用以下網路設定:
本檔案會使用以下設定:
路由器1.1.1.1 |
---|
Current configuration: hostname r1.1.1.1 interface Loopback0 ip address 1.1.1.1 255.0.0.0 interface Ethernet2/0/0 ip address 4.0.0.1 255.0.0.0 interface Serial2/1/0 ip address 5.0.0.1 255.0.0.0 ip ospf network point-to-multipoint router ospf 1 network 4.0.0.0 0.255.255.255 area 0 network 5.0.0.0 0.255.255.255 area 0 end |
路由器2.2.2.2 |
---|
Current configuration: hostname r2.2.2.2 interface Loopback0 ip address 2.2.2.2 255.0.0.0 interface Ethernet0/0/4 ip address 6.0.0.2 255.0.0.0 interface Serial2/1/0 ip address 5.0.0.2 255.0.0.0 ip ospf network point-to-multipoint router ospf 2 network 6.0.0.0 0.255.255.255 area 0 network 5.0.0.0 0.255.255.255 area 0 end |
本節提供的資訊可用於確認您的組態是否正常運作。
輸出直譯器工具(僅供已註冊客戶使用)(OIT)支援某些show命令。使用OIT檢視show命令輸出的分析。
show ip ospf database — 顯示鏈路狀態通告(LSA)清單並將其鍵入鏈路狀態資料庫。此清單僅顯示LSA報頭中的資訊。
show ip ospf database [router] [link-state-id] — 顯示資料庫中路由器的所有LSA的清單。LSA由每台路由器生成。這些基本LSA列出了所有路由器的鏈路或介面,以及鏈路的狀態和傳出成本。它們只被淹沒在它們的源頭地區。
若要檢視給定此網路環境的OSPF資料庫外觀,請檢視show ip ospf database 命令的輸出。
r2.2.2.2#show ip ospf database OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 206 0x8000000A 0x158C 3 2.2.2.2 2.2.2.2 206 0x8000000B 0x791 3 r2.2.2.2#show ip ospf database router 1.1.1.1 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 224 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 1.1.1.1 !--- For router links, Link State Id is always the same !--- as the Advertising Router (next line). Advertising Router: 1.1.1.1 !--- This is the router ID of the router that created !--- this LSA. LS Seq Number: 8000000A Checksum: 0x158C Length: 60 Number of Links: 3 Link connected to: another Router (point-to-point) !--- This line shows that this router(1.1.1.1) is a !--- neighbor with 2.2.2.2. (Link ID) Neighboring Router ID: 2.2.2.2 (Link Data) Router Interface address: 5.0.0.1 !--- This line shows the interface on this router !--- (1.1.1.1) that connects the neighbor (2.2.2.2). Number of TOS metrics: 0 TOS 0 Metrics: 64 !--- The OSPF cost of the link is 64. Link connected to: a Stub Network !--- This router's (1.1.1.1) interface on the !--- point-to-multipoint network. (Link ID) Network/subnet number: 5.0.0.1 (Link Data) Network Mask: 255.255.255.255 !--- Notice the mask. Only the interface is advertised, !--- not the whole subnet. Number of TOS metrics: 0 TOS 0 Metrics: 0 !--- The OSPF cost for this router to reach its !--- own interface is zero. Link connected to: a Stub Network !--- Represents the subnet of the Ethernet segment 4.0.0.0/8. (Link ID) Network/subnet number: 4.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 !--- The cost of the link is 10. r2.2.2.2#show ip ospf database router 2.2.2.2 OSPF Router with ID (2.2.2.2) (Process ID 2) Router Link States (Area 0) LS age: 253 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 2.2.2.2 Advertising Router: 2.2.2.2 LS Seq Number: 8000000B Checksum: 0x791 Length: 60 Number of Links: 3 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 1.1.1.1 (Link Data) Router Interface address: 5.0.0.2 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 5.0.0.2 (Link Data) Network Mask: 255.255.255.255 Number of TOS metrics: 0 TOS 0 Metrics: 0 Link connected to: a Stub Network (Link ID) Network/subnet number: 6.0.0.0 (Link Data) Network Mask: 255.0.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10
本節從路由器2.2.2.2的角度計算最短路徑樹。
路由器2.2.2.2在自己的LSA中查詢,發現路由器1.1.1.1是鄰居。路由器2.2.2.2檢視1.1.1.1的路由器LSA,檢驗1.1.1.1將2.2.2.2視為鄰居。如果兩台路由器都視彼此為鄰居,則認為它們是可到達的。
每台路由器還檢查其本地鄰居表(可以使用show ip ospf neighbor命令檢查該表),以檢驗其介面和鄰居的介面是否位於公用IP子網中。如果是,則路由器為其鄰居的路由器LSA中列出的任何末節網路安裝路由。
在本例中,路由器2.2.2.2在其路由表中安裝4.0.0.0/8的路由,因為路由器1.1.1.1在其自己的路由器LSA中將4.0.0.0/8列為末節網路。路由器1.1.1.1也將5.0.0.1/32列為末節,這是它在點對多點網路上的介面。因此,Router 2.2.2.2在其路由表中安裝用於5.0.0.1/32的OSPF路由。
Router 2.2.2.2#show ip route ospf O 4.0.0.0/8 [110/74] via 5.0.0.1, 00:09:26, Serial0/1/0 O 5.0.0.1/32 [110/64] via 5.0.0.1, 00:09:26, Serial0/1/0 Router 1.1.1.1#show ip route ospf O 6.0.0.0/8 [110/74] via 5.0.0.2, 00:00:49, Serial2/1/0 O 5.0.0.2/32 [110/64] via 5.0.0.2, 00:00:49, Serial2/1/0
目前尚無適用於此組態的具體疑難排解資訊。
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
10-Aug-2005 |
初始版本 |