本技术说明解释了在全网状帧中继环境中,OSPF路由出现在链路状态数据库中,但不出现在路由表中的问题。有关更多场景,请参阅为什么有些OSPF路由在数据库中,而不在路由表中?
本文档的读者应掌握以下这些主题的相关知识:
OSPF
帧中继
本文档不限于特定的软件和硬件版本。但是,本文档中的配置将通过使用以下软件和硬件版本进行测试和更新:
Cisco 2500 系列路由器
Cisco IOS®版本12.2(24a)
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。
有关文件规则的更多信息请参见“ Cisco技术提示规则”。
以下示例使用全网状帧中继环境。网络图和配置如下所示:
文档 |
---|
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未将文档路由器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,并期望Snezy生成网络链路状态。但是,由于Snezy不是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处于非活动状态。这就解释了为什么困困者无法ping通多克,也解释了为什么他们不把彼此视为邻居。以下事件触发了问题:
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 |
初始版本 |