本技術說明解釋了在全網狀幀中繼環境中,出現在鏈路狀態資料庫中、而不是路由表中的OSPF路由問題。有關更多方案,請參閱為什麼某些OSPF路由位於資料庫中,而不是路由表?
本文檔的讀者應瞭解以下主題:
OSPF
框架轉送
本文件所述內容不限於特定軟體和硬體版本。但是本檔案中的組態會使用以下軟體和硬體版本進行測試和更新:
Cisco 2500系列路由器
Cisco IOS®版本12.2(24a)
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
以下示例使用全網狀幀中繼環境。網路圖和配置如下所示:
文檔 |
---|
interface Ethernet0 ip address 50.50.50.50 255.255.255.0 interface Serial0 encapsulation frame-relay !--- Enables Frame Relay encapsulation on the interface. interface Serial0.1 multipoint !--- The subinterface is configured as a multipoint link. ip address 10.10.10.5 255.255.255.0 ip ospf network broadcast !--- This command is used to define the network type as broadcast. !--- The network type is defined on nonbroadcast networks to !--- avoid configuring the neighbors explicitly. frame-relay map ip 10.10.10.6 101 broadcast frame-relay map ip 10.10.10.10 100 broadcast !--- To define the mapping between a destination protocol address !--- and the data-link connection identifier (DLCI) used to !--- connect to the destination address. !--- The broadcast keyword is used to forward broadcasts to !--- this address when broadcast/multicast is !--- disabled because of non-broadcast medium. router ospf 1 network 0.0.0.0 255.255.255.255 area 0 |
睏倦 |
---|
interface Ethernet0 ip address 70.70.70.70 255.255.255.0 interface Serial0 encapsulation frame-relay !--- Enables Frame Relay encapsulation on the interface. interface Serial0.1 multipoint !--- The subinterface is configured as a multipoint link. ip address 10.10.10.6 255.255.255.0 ip ospf network broadcast !--- This command is used to define the network type as broadcast. !--- The network type is defined on nonbroadcast networks to !--- avoid configuring the neighbors explicitly. frame-relay map ip 10.10.10.5 101 broadcast frame-relay map ip 10.10.10.10 102 broadcast !--- To define the mapping between a destination protocol address !--- and the DLCI used to connect to the destination address. !--- The broadcast keyword is used to forward broadcasts to !--- this address when broadcast/multicast is !--- disabled because of non-broadcast medium. router ospf 1 network 0.0.0.0 255.255.255.255 area 0 |
噴嚏 |
---|
interface Ethernet0 ip address 60.60.60.60 255.255.255.0 interface Serial0 encapsulation frame-relay !--- Enables Frame Relay encapsulation on the interface. interface Serial0.1 multipoint !--- The subinterface is configured as a multipoint link. ip address 10.10.10.10 255.255.255.0 ip ospf network broadcast !--- This command is used to define the network type as broadcast. !--- The network type is defined on nonbroadcast networks to !--- avoid configuring the neighbors explicitly. frame-relay map ip 10.10.10.5 100 broadcast frame-relay map ip 10.10.10.6 102 broadcast !--- To define the mapping between a destination protocol address !--- and the DLCI used to connect to the destination address. !--- The broadcast keyword is used to forward broadcasts to !--- this address when broadcast/multicast is !--- disabled because of non-broadcast medium. router ospf 1 network 0.0.0.0 255.255.255.255 area 0 |
最初,所有路由器的鄰居表中都有所有路由。發生一個事件,導致Doc和Sleepy從各自的鄰居表中相互刪除。從本節中給出的鄰居表中,我們可以看到Doc鄰居表沒有條目70.70.70.70,而Sleepy鄰居表沒有條目50.50.50.50。
文檔鄰居表 |
---|
doc# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 60.60.60.60 1 FULL/DR 00:00:33 10.10.10.10 Serial0.1 |
睏倦鄰居表 |
sleepy# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 60.60.60.60 1 FULL/BDR 00:00:32 10.10.10.10 Serial0.1 |
Sneezy鄰居表 |
sneezy# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 50.50.50.50 1 FULL/DROTHER 00:00:36 10.10.10.5 Serial0.1 70.70.70.70 1 FULL/DR 00:00:31 10.10.10.6 Serial0.1 |
此外,Doc會丟失其路由表中的所有OSPF路由,Sleepy和Sneezy在其路由表中不再有50.50.50.0(Doc的LAN子網)。
文檔路由表 |
---|
doc# show ip route Gateway of last resort is not set 10.0.0.0 255.255.255.0 is subnetted, 1 subnets C 10.10.10.0 is directly connected, Serial0.1 50.0.0.0 255.255.255.0 is subnetted, 1 subnets C 50.50.50.0 is directly connected, Ethernet0 |
休眠路由表 |
sleepy# show ip route Gateway of last resort is not set 10.0.0.0/ 24 is subnetted, 1 subnets C 10.10.10.0 is directly connected, Serial0.1 60.0.0.0/ 24 is subnetted, 1 subnets O 60.60.60.0 [110/ 11175] via 10.10.10.10, 00: 07: 25, Serial0.1 70.0.0.0/ 24 is subnetted, 1 subnets C 70.70.70.0 is directly connected, Ethernet0 |
Sneezy路由表 |
sneezy# show ip route Gateway of last resort is not set 10.0.0.0/ 24 is subnetted, 1 subnets C 10.10.10.0 is directly connected, Serial0.1 60.0.0.0/ 24 is subnetted, 1 subnets C 60.60.60.0 is directly connected, Ethernet0 70.0.0.0/ 24 is subnetted, 1 subnets O 70.70.70.0 [110/ 11175] via 10.10.10.6, 00: 07: 53, Serial0.1 |
儘管Doc的路由表中沒有任何OSPF路由,但從下面的輸出中我們可以看到,它有一個完整的OSPF資料庫。
文檔資料庫 |
---|
doc# show ip ospf database OSPF Router with ID (50.50.50.50) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 50.50.50.50 50.50.50.50 169 0x80000030 0x3599 2 60.60.60.60 60.60.60.60 1754 0x8000002F 0xD26D 2 70.70.70.70 70.70.70.70 1681 0x8000002D 0xFDD9 2 Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 10.10.10.6 70.70.70.70 569 0x8000002B 0x8246 |
網路鏈路狀態是由指定路由器(DR)生成的鏈路狀態,用於描述連線到網路的所有路由器。在下面的輸出中,我們看到DR未將Doc路由器ID(50.50.50.50)列為連線的路由器,因此它打破了廣播模式。因此,Doc不會安裝通過幀中繼網路獲知的任何OSPF路由。
網路鏈路狀態 |
---|
doc# show ip ospf database network 10.10.10.6 Net Link States (Area 0) LS Type: Network Links Link State ID: 10.10.10.6 (address of Designated Router) Advertising Router: 70.70.70.70 Network Mask: 255.255.255.0 Attached Router: 70.70.70.70 Attached Router: 60.60.60.60 |
另一種解釋是,Doc宣佈Sneezy為DR,並期望Sneezy生成網路鏈路狀態。但是,由於Sneezy不是DR,它不會生成網路鏈路狀態,這反過來又不允許Doc在其路由表中安裝任何路由。
文檔鄰居表 |
---|
doc# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 60.60.60.60 1 FULL/DR 00:00:29 10.10.10.10 Serial0.1 |
根據資料庫,幀中繼雲的DR為Sleepy。但是,Sleepy不將Doc視為OSPF鄰居。如本例所示,從Sleepy到Doc的ping失敗:
sleepy# ping 10.10.10.5 Type escape sequence to abort. Sending 5, 100- byte ICMP Echos to 10.10.10.5, timeout is 2 seconds: ..... Success rate is 0 percent (0/ 5)
從Sleepy中的show frame-relay map命令的輸出中,我們可以看到,發往Doc的DLCI處於非活動狀態。這就解釋了為什麼Sleepy無法ping通Doc,以及為什麼他們不能將彼此視為鄰居。這是觸發問題的事件:
sleepy# show frame-relay map Serial0.1 (up): ip 10.10.10.5 dlci 101( 0x65,0x1850), static, broadcast, CISCO, status defined, inactive Serial0.1 (up): ip 10.10.10.10 dlci 102( 0x66,0x1860), static, broadcast, CISCO, status defined, active
由於Doc和Sleepy之間的PVC已斷開,並且Doc到指定路由器(DR)的鏈路已斷開,因此Doc會宣告來自Sneezy(不是DR)的所有LSA均無法訪問。如果幀中繼網雲完全網格化,則通過幀中繼的廣播模型可以正常工作。如果任何永久虛擬電路(PVC)損壞,它可能會在OSPF資料庫中出現問題,這一點從下面所示的show ip ospf database router命令輸出中明顯可見,該命令顯示Adv router is not-reachable消息。
文檔鄰居表 |
---|
doc# show ip ospf database router OSPF Router with ID (50.50.50.50) (Process ID 1) Router Link States (Area 0) LS age: 57 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 50.50.50.50 Advertising Router: 50.50.50.50 LS Seq Number: 800000D4 Checksum: 0x355D Length: 48 Number of Links: 2 Link connected to: a Transit Network (Link ID) Designated Router address: 10.10.10.10 (Link Data) Router Interface address: 10.10.10.5 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 50.50.50.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 Adv Router is not-reachable LS age: 367 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 60.60.60.60 Advertising Router: 60.60.60.60 LS Seq Number: 800000C9 Checksum: 0xC865 Length: 48 Number of Links: 2 Link connected to: a Transit Network (Link ID) Designated Router address: 10.10.10.6 (Link Data) Router Interface address: 10.10.10.10 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 60.60.60.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 Adv Router is not-reachable LS age: 53 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 70.70.70.70 Advertising Router: 70.70.70.70 LS Seq Number: 800000CA Checksum: 0xEDD4 Length: 48 Number of Links: 2 Link connected to: a Transit Network (Link ID) Designated Router address: 10.10.10.6 (Link Data) Router Interface address: 10.10.10.6 Number of TOS metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 70.70.70.0 (Link Data) Network Mask: 255.255.255.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 |
當您將OSPF配置為在支援廣播或不支援廣播的多路訪問網路上運行時,所有裝置必須能夠直接與指定路由器通訊(至少能夠與指定路由器通訊)。廣播和NBMA模式依賴於幀中繼雲完全網格化。如果永久虛電路(PVC)關閉,雲將不再完全網狀,並且OSPF無法正常工作。
在幀中繼環境中,如果第2層不穩定(如本例所示),我們不建議使用OSPF廣播網路型別。改為使用OSPF點對多點。
修訂 | 發佈日期 | 意見 |
---|---|---|
1.0 |
29-Dec-2005 |
初始版本 |