IP : 开放最短路径优先 (OSPF)

在帧中继的NBMA和广播模式中运行OSPF的问题

2016 年 10 月 27 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 8 月 22 日) | 反馈


目录


简介

此技术说明解释OSPF路由问题出现在林克状态数据库,但是不在全网状帧中继环境的路由表里的。关于更多方案,请参阅为什么是一些OSPF路由在数据库,但是不是路由表里?

先决条件

要求

本文档的读者应掌握以下这些主题的相关知识:

  • OSPF

  • 帧中继

使用的组件

本文档不限于特定的软件和硬件版本。然而,在本文的配置利用这些软件和硬件版本测试并且更新:

  • Cisco 2500 系列路由器

  • Cisco IOS�版本12.2(24a)

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

背景理论

下面的示例使用一个全网状帧中继环境。网络图和配置如下所示:

/image/gif/paws/13696/24a.gif

文档
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

Sleepy
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

Sneezy
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

问题

最初,所有路由器有所有路由在他们的邻居表里。事件发生那造成文档和Sleepy从他们的各自的邻居表互相下降。从在此部分给的邻居表,我们能看到文档邻居表没有条目70.70.70.70,并且困了邻居表没有条目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

另外,文档丢失从其路由表的所有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

虽然文档在其路由表里没有任何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)作为连接的路由器,中断广播模型。所以文档不通过帧中继网络安装任何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

另一个方式查看此是文档宣称Sneezy作为DR并且盼望Sneezy生成网络连接状态。然而,因为Sneezy不是DR,它不生成网络连接状态,在其路由表里反过来不允许文档安装任何路由。

文档邻居表
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看不到文档作为OSPF邻居。如在此示例中看到, ping从Sleepy到文档发生故障:

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)

从输出show frame-relay map命令在Sleepy,我们能看到去文档的DLCI是非激活的。那解释Sleepy为什么不能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

由于在文档和Sleepy之间的PVC是残破的,并且对指定路由器(DR)的Doc的链路是残破的,文档宣称从的所有LSA不是DR)的Sneezy (作为不可达的。如果帧中继网云充分地网状连接,在帧中继的广播模型正常运转。如果任何永久虚电路(PVC)是残破的,它能制造在OSPF数据库的问题,从如下所示的show ip ospf database router命令输出是明显的—哪些显示ADV路由器是不可到达的消息。

文档邻居表
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未正确地起作用。

在帧中继环境,如果Layer2是不稳定的,正如在我们的示例,我们不推荐OSPF广播网络类型。请使用点对多点的OSPF。


相关信息


Document ID: 13696