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

OSPF虚拟链路

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


目录


简介

开放最短路径优先 (OSPF) 自治系统中的所有区域都必须以物理方式与主干区域(区域 0)相连。在无法实现这种连接的情况下,可利用虚拟链路来通过非主干区域连接到主干网。您还可利用虚拟链路来通过非主干区域连接一个主干网中分割而成的两个部分。配置虚拟链路所使用的区域称为中转区域,这种区域必须具有全部路由信息。中转区域不能是末节区域。本文档对虚拟链路环境中的 OSPF 数据库进行了说明。有关虚拟链路的详细信息,请参阅 OSPF 设计指南

先决条件

要求

Cisco 建议您了解以下主题:

使用的组件

本文档不限于特定的软件或硬件版本。

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

规则

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

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 有关本文档所用命令的详细信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

/image/gif/paws/47866/ospfdb7.gif

配置

本文档使用以下配置:

Router1.1.1.1
Current configuration:

hostname Router1.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

router ospf 2
 network 4.0.0.0 0.255.255.255 area 0
 network 5.0.0.0 0.255.255.255 area 1
 area 1 virtual-link 3.3.3.3

!--- Area 1 is the transit area.
!--- IP address 3.3.3.3 is the router
!--- ID of the router between Area 1
!--- and Area 2 (Router3.3.3.3). See
!--- the next Note.

end

注意: OSPF 路由器 ID 通常是设备上的最高 IP 地址或最高环回地址(如果存在)。路由器 ID 只在启动时或每次重新启动 OSPF 进程时进行计算。发出 show ip ospf interface 命令,以便查找路由器 ID。

Router2.2.2.2
Current configuration:

hostname Router2.2.2.2

interface Loopback0
 ip address 2.2.2.2 255.0.0.0

interface Serial0/1/0
 ip address 5.0.0.2 255.0.0.0

interface ATM1/0.20 point-to-point
 ip address 6.0.0.2 255.0.0.0

router ospf 2
 network 6.0.0.0 0.255.255.255 area 1
 network 5.0.0.0 0.255.255.255 area 1

end

Router3.3.3.3
Current configuration:

hostname Router3.3.3.3

interface Loopback0
 ip address 3.3.3.3 255.0.0.0

interface Ethernet0/0
 ip address 12.0.0.3 255.0.0.0

interface ATM2/0.20 point-to-point
 ip address 6.0.0.3 255.0.0.0

router ospf 2
 network 12.0.0.0 0.255.255.255 area 2
 network 6.0.0.0 0.255.255.255 area 1
 area 1 virtual-link 1.1.1.1

!--- Area 1 is the transit area.
!--- IP address 1.1.1.1 is the router
!--- ID of the router between Area 1
!--- and Area 0 (Router1.1.1.1).

end

虚拟链路的工作原理

最初,虚拟链路断开是因为 Router1.1.1.1 不知道如何到达 Router3.3.3.3(虚拟链路的另一端)。要让 Router1.1.1.1 知道如何通过区域 1 到达 Router 3.3.3.3,区域 1 中的所有链路状态通告 (LSA) 都需要进行泛洪,而且区域 1 内的三个路由器都必须运行最短路径优先 (SPF) 算法。

各个路由器知道如何通过中转区域到达彼此所在位置后,会设法在整个虚拟链路内建立邻接关系。虚拟链路两端之间的 OSPF 数据包不是组播数据包。这些数据包通过隧道传输至虚拟链路的另一端,所以它们是从源地址 5.0.0.1 传输到目标地址 6.0.0.3 的隧道数据包。有必要指出的一点是,如果虚拟链路路由器之间存在防火墙,则您需要启用虚拟链路隧道传出接口 IP 之间(在 5.0.0.1 和 6.0.0.3 之间)的 OSPF(IP 协议 89)端口。

路由器在虚拟链路之间建立邻接关系之后,Router3.3.3.3 会将自己视为区域边界路由器 (ABR),因为现在它在区域 0 中有了一个链路。因此,Router3.3.3.3 会为区域 0 和区域 1 中的 12.0.0.0/8 创建一个汇总 LSA。

如果出于某种原因而错误地配置了虚拟链路,Router3.3.3.3 就不会将自己视为 ABR,因为它在区域 0 中没有任何接口。如果出现这种情况,该路由器就不会创建汇总 LSA 或者向区域 1 中通告 12.0.0.0/8。

注意: OSPF 在 IP 之上运行并且使用协议号 89。OSPF 不依赖其他任何传输协议,例如 TCP 和 UDP。

计算最短路径

本部分从 Router2.2.2.2 的角度计算最短路径。

Router2.2.2.2 在自身的 LSA 中进行查找,发现 Router3.3.3.3 是邻居。然后 Router2.2.2.2 会查看 Router3.3.3.3 的 LSA,验证 Router3.3.3.3 是否将自己视为邻居。如果两个路由器互相看见作为邻居,则他们被认为可及的。

每个路由器也都会检查自己的本地邻居表(可通过发出 show ip ospf neighbor 命令进行查看),以便验证自身接口与邻居的接口是否处于同一个 IP 子网上。

注意: 在未编号的接口没有执行此检查。

如果它们在同一个子网上,路由器将安装各自邻居的路由器 LSA 中列出的所有残域网络路由。在本示例中,6.0.0.0/8 是区域 1 中 Router3.3.3.3 的 LSA 列出的唯一残域网络,Router2.2.2.2 已经与其直接相连。

Router3.3.3.3 也对 Router1.1.1.1 的 LSA 执行相同的检查,但是在 Router1.1.1.1 的 LSA 中没有任何有用的残域网络。

检查完区域 1 中所有可到达路由器的 LSA 后,Router2.2.2.2 会查看数据库中的汇总 LSA。在区域 1 中找到两个用于 12.0.0.0/8 的汇总 LSA,然后选择总成本(到达通告路由器的度量加上汇总 LSA 的度量)最低的汇总 LSA。

  • Router2.2.2.2 能通过 Router1.1.1.1 到达 12.0.0.0,成本为 64 + 75 = 139。

  • Router2.2.2.2 能通过 Router3.3.3.3 到达 12.0.0.0,成本为 1 + 10 = 11。

Router2.2.2.2 安装其路由表中一个通过 Router3.3.3.3 的路由,度量为 11。

此输出显示了前面介绍的每个路由器的路由表所包含的 OSPF 路由:

Router1.1.1.1#show ip route ospf

!--- Output suppressed.

O    6.0.0.0/8 [110/65] via 5.0.0.2, 00:38:12, Serial2/1/0
O IA 12.0.0.0/8 [110/75] via 5.0.0.2, 00:38:02, Serial2/1/0

Router2.2.2.2#show ip route ospf

!--- Output suppressed.

O IA 4.0.0.0/8 [110/74] via 5.0.0.1, 00:38:08, Serial0/1/0
O IA 12.0.0.0/8 [110/11] via 6.0.0.3, 00:38:12, ATM1/0.20

!--- This is the route in this example.

Router3.3.3.3#show ip route ospf

!--- Output suppressed.

O    4.0.0.0/8 [110/75] via 6.0.0.2, 00:38:18, ATM2/0.20
O    5.0.0.0/8 [110/65] via 6.0.0.2, 00:38:28, ATM2/0.20

使用 GRE 隧道而非虚拟链路

也可以在 Router1.1.1.1 和 Router3.3.3.3 之间构建一个通用路由封装 (GRE) 隧道,并将隧道放入区域 0 中。GRE 隧道和虚拟链路之间的主要区别如下表所示:

GRE 通道 虚拟链路
隧道中的所有数据流都由隧道终点进行封装和解封。 路由更新通过隧道传输,数据流则以本地方式发送。
每个数据包中的隧道报头都会产生开销。 数据流不受任何隧道开销影响。
隧道可穿过残域区域。 因为残域区域中的路由器没有外部目标的路由,所以中转区域不能是残域区域。由于数据是本地发送的,所以如果将要发往外部目标位置的数据包发送到一个同时也是中转区域的残域区域,将无法正确路由该数据包。残域区域中的路由器没有特定外部目标的路由。

验证

使用本部分可确认配置能否正常运行。

命令输出解释程序仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。

检查 OSPF 数据库

考虑到这种网络环境,当您发出 show ip ospf database 命令时,OSPF 数据库将如下所示。

Router1.1.1.1#show ip ospf database

       OSPF Router with ID (1.1.1.1) (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       919             0x80000003    0xD5DF         2
3.3.3.3   3.3.3.3       5     (DNA)     0x80000002    0x3990         1

                Summary Net Link States (Area 0)

Link ID   ADV Router    Age                 Seq#         Checksum
5.0.0.0   1.1.1.1       1945                0x80000002   0xAA48
5.0.0.0   3.3.3.3       9     (DNA)         0x80000001   0x7A70
6.0.0.0   1.1.1.1       1946                0x80000002   0xA749
6.0.0.0   3.3.3.3       9     (DNA)         0x80000001   0xEA3F
12.0.0.0  3.3.3.3       9     (DNA)         0x80000001   0xF624

                Router Link States (Area 1)

Link ID   ADV Router    Age             Seq#          Checksum   Link count
1.1.1.1   1.1.1.1       1946            0x80000005    0xDDA6         2
2.2.2.2   2.2.2.2       10              0x80000009    0x64DD         4
3.3.3.3   3.3.3.3       930             0x80000006    0xA14C         2

                Summary Net Link States (Area 1)

Link ID   ADV Router    Age             Seq#           Checksum
4.0.0.0   1.1.1.1       1947            0x80000002     0x9990
4.0.0.0   3.3.3.3       911             0x80000001     0xEBF5
12.0.0.0  1.1.1.1       913             0x80000001     0xBF22
12.0.0.0  3.3.3.3       931             0x80000001     0xF624

Router2.2.2.2#show ip ospf database

       OSPF Router with ID (2.2.2.2) (Process ID 2)

                Router Link States (Area 1)

Link ID   ADV Router    Age     Seq#          Checksum   Link count
1.1.1.1   1.1.1.1       1988    0x80000005    0xDDA6        2
2.2.2.2   2.2.2.2       50      0x80000009    0x64DD        4
3.3.3.3   3.3.3.3       969     0x80000006    0xA14C        2

                Summary Net Link States (Area 1)

Link ID   ADV Router    Age      Seq#          Checksum
4.0.0.0   1.1.1.1       1988     0x80000002    0x9990
4.0.0.0   3.3.3.3       950      0x80000001    0xEBF5
12.0.0.0  1.1.1.1       955      0x80000001    0xBF22
12.0.0.0  3.3.3.3       970      0x80000001    0xF624

Router3.3.3.3#show ip ospf database

       OSPF Router with ID (3.3.3.3) (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       6   (DNA)    0x80000003    0xD5DF         2
3.3.3.3   3.3.3.3       977          0x80000002    0x3990         1

                Summary Net Link States (Area 0)

Link ID   ADV Router    Age            Seq#          Checksum
5.0.0.0   1.1.1.1       1027  (DNA)    0x80000002    0xAA48
5.0.0.0   3.3.3.3       986            0x80000001    0x7A70
6.0.0.0   1.1.1.1       1027  (DNA)    0x80000002    0xA749
6.0.0.0   3.3.3.3       987            0x80000001    0xEA3F
12.0.0.0  3.3.3.3       987            0x80000001    0xF624

                Router Link States (Area 1)

Link ID   ADV Router    Age    Seq#          Checksum   Link count
1.1.1.1   1.1.1.1       2007   0x80000005    0xDDA6         2
2.2.2.2   2.2.2.2       68     0x80000009    0x64DD         4
3.3.3.3   3.3.3.3       987    0x80000006    0xA14C         2

                Summary Net Link States (Area 1)

Link ID   ADV Router    Age      Seq#         Checksum
4.0.0.0   1.1.1.1       2007    0x80000002    0x9990
4.0.0.0   3.3.3.3       967     0x80000001    0xEBF5
12.0.0.0  1.1.1.1       973     0x80000001    0xBF22
12.0.0.0  3.3.3.3       987     0x80000001    0xF624

                Router Link States (Area 2)

Link ID   ADV Router    Age    Seq#          Checksum   Link count
3.3.3.3   3.3.3.3       987    0x80000003    0xCF5          1

                Summary Net Link States (Area 2)

Link ID   ADV Router    Age    Seq#        Checksum
4.0.0.0   3.3.3.3       968    0x80000001  0xEBF5
5.0.0.0   3.3.3.3       988    0x80000001  0x7A70
6.0.0.0   3.3.3.3       988    0x80000001  0xEA3F

请注意,通过虚拟链路获知的 LSA 具有 DoNotAge 选项。虚拟链路被视为需求电路。

Router1.1.1.1#show ip ospf database router 1.1.1.1

       OSPF Router with ID (1.1.1.1) (Process ID 2)

                Router Link States (Area 0)

  LS age: 1100
  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.

  Advertising Router: 1.1.1.1

!--- This is the router ID of the router that created this LSA.

  LS Seq Number: 80000003
  Checksum: 0xD5DF
  Length: 48
  Area Border Router

!--- Bit B in the router LSA indicates that this router is an ABR.

   Number of Links: 2

!--- There are two links in Area 0.

    Link connected to: a Virtual Link
     (Link ID) Neighboring Router ID: 3.3.3.3

!--- Router ID of the neighbor on the other end of the virtual link.

     (Link Data) Router Interface address: 5.0.0.1

!--- The interface that this router uses to send packets to the neighbor.

      Number of TOS metrics: 0
       TOS 0 Metrics: 65

!--- The metric comes from the cost for this router to reach the neighboring router:
!--- the ATM link has a cost of 1 and the serial link has a cost of 64.

    Link connected to: a Stub Network

!--- This represents 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

                Router Link States (Area 1)

  LS age: 122
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 1.1.1.1
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000006
  Checksum: 0xDBA7
  Length: 48
  Area Border Router
   Number of Links: 2

!--- There are two links in Area 1.

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 5.0.0.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 5.0.0.0
     (Link Data) Network Mask: 255.0.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

Router1.1.1.1#show ip ospf database router 2.2.2.2

       OSPF Router with ID (1.1.1.1) (Process ID 2)

                Router Link States (Area 1)

  LS age: 245
  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: 80000009
  Checksum: 0x64DD
  Length: 72
   Number of Links: 4

!--- There are four links in Area 1.


    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 3.3.3.3
     (Link Data) Router Interface address: 6.0.0.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    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: 1

    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.0
     (Link Data) Network Mask: 255.0.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64

Router1.1.1.1#show ip ospf database router 3.3.3.3

       OSPF Router with ID (1.1.1.1) (Process ID 2)

                Router Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 5 (DoNotAge)
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 3.3.3.3
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0x3990
  Length: 36
  Area Border Router
   Number of Links: 1

!--- There is one link in Area 0.


    Link connected to: a Virtual Link
     (Link ID) Neighboring Router ID: 1.1.1.1
     (Link Data) Router Interface address: 6.0.0.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 65

                Router Link States (Area 1)

  Routing Bit Set on this LSA
  LS age: 1137
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 3.3.3.3
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000006
  Checksum: 0xA14C
  Length: 48
  Area Border Router
   Number of Links: 2

!--- There are two links in Area 1.


    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 6.0.0.3
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    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: 1

Router3.3.3.3 会将自己视为 ABR,因为它有通往区域 0 的链路(虚拟链路)。因此,该路由器会面向区域 1 和区域 0 为 12.0.0.0 生成汇总 LSA,发出 show ip ospf database summary 命令即可看到此 LSA。

Router3.3.3.3#show ip ospf database summary 12.0.0.0

       OSPF Router with ID (3.3.3.3) (Process ID 2)

                Summary Net Link States (Area 0)

  LS age: 1779
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 12.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0xF624
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 10

                Summary Net Link States (Area 1)

  LS age: 1766
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 12.0.0.0 (summary Network Number)
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xBF22
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 75

  LS age: 1781
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 12.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0xF624
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 10

另请注意,Router3.3.3.3 会在区域 2 中为其从区域 0 和区域 1 中获知的所有信息创建汇总 LSA。

Router3.3.3.3#show ip ospf database summary self-originate

       OSPF Router with ID (3.3.3.3) (Process ID 2)

                Summary Net Link States (Area 0)

  LS age: 155
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 5.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0x7871
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 65

  LS age: 155
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 6.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0xE840
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 1

  LS age: 156
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 12.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0xF425
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 10

                Summary Net Link States (Area 1)

  LS age: 157
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 4.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0xE9F6
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 75

  LS age: 165
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 12.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0xF425
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 10

                Summary Net Link States (Area 2)

  LS age: 167
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 4.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0xE9F6
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 75

  LS age: 168
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 5.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0x7871
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 65

  LS age: 168
  Options: (No TOS-capability, DC)
  LS Type: Summary Links(Network)
  Link State ID: 6.0.0.0 (summary Network Number)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0xE840
  Length: 28
  Network Mask: /8
        TOS: 0  Metric: 1

故障排除

使用本部分可排除配置故障。

故障排除命令

命令输出解释程序仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。

注意: 使用 debug 命令之前,请参阅有关 Debug 命令的重要信息

  • debug ip ospf adj - 显示构建或中断 OSPF 邻接关系所涉及的事件。

路由器会通过类似于物理链路的虚拟链路建立邻接关系并交换 LSA。如果查看路由器 LSA 或 debug ip ospf adj 命令的输出,就能看到邻接情况:

Router3.3.3.3#
May 26 17:25:03.089: OSPF: Rcv hello from 1.1.1.1 area 0 from OSPF_VL3 5.0.0.1
May 26 17:25:03.091: OSPF: 2 Way Communication to 1.1.1.1 on OSPF_VL3, state 2WAY
May 26 17:25:03.091: OSPF: Send DBD to 1.1.1.1 on OSPF_VL3
                           seq 0xD1C opt 0x62 flag 0x7 len 32
May 26 17:25:03.135: OSPF: End of hello processing
May 26 17:25:03.139: OSPF: Rcv DBD from 1.1.1.1 on OSPF_VL3
                           seq 0x1617 opt 0x22 flag 0x7 len 32
                           mtu 0 state EXSTART
May 26 17:25:03.175: OSPF: First DBD and we are not SLAVE
May 26 17:25:03.179: OSPF: Rcv DBD from 1.1.1.1 on OSPF_VL3
                           seq 0xD1C opt 0x22 flag 0x2 len 172
                           mtu 0 state EXSTART
May 26 17:25:03.183: OSPF: NBR Negotiation Done. We are the MASTER
May 26 17:25:03.189: OSPF: Send DBD to 1.1.1.1 on OSPF_VL3
                           seq 0xD1D opt 0x62 flag 0x3 len 172
May 26 17:25:03.191: OSPF: Database request to 1.1.1.1
May 26 17:25:03.191: OSPF: sent LS REQ packet to 5.0.0.1, length 36
May 26 17:25:03.263: OSPF: Rcv DBD from 1.1.1.1 on OSPF_VL3
                           seq 0xD1D opt 0x22 flag 0x0 len 32
                           mtu 0 state EXCHANGE
May 26 17:25:03.267: OSPF: Send DBD to 1.1.1.1 on OSPF_VL3
                           seq 0xD1E opt 0x62 flag 0x1 len 32
May 26 17:25:03.311: OSPF: Rcv DBD from 1.1.1.1 on OSPF_VL3
                           seq 0xD1E opt 0x22 flag 0x0 len 32
                           mtu 0 state EXCHANGE
May 26 17:25:03.311: OSPF: Exchange Done with 1.1.1.1 on OSPF_VL3
May 26 17:25:03.315: OSPF: Synchronized with 1.1.1.1 on OSPF_VL3, state FULL
May 26 17:25:03.823: OSPF: Build router LSA for area 0,
                           router ID 3.3.3.3, seq 0x80000029
May 26 17:25:03.854: OSPF: Dead event ignored for 1.1.1.1 on demand circuit OSPF_VL3

Router3.3.3.3#show ip ospf neighbor

Neighbor ID       Pri       State        Dead Time       Address         Interface
2.2.2.2           1         FULL/  -     00:00:38        6.0.0.2         ATM2/0.20

Router3.3.3.3#show ip ospf virtual-links

Virtual Link OSPF_VL3 to router 1.1.1.1 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface ATM2/0.20, Cost of using 65
  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:01
    Adjacency State FULL (Hello suppressed)
    Index 1/2, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

请注意,show ip ospf neighbor 命令的输出内容中不显示通过虚拟链路建立的邻接关系。唯一可以看到这种邻接关系的方法就是查看路由器 LSA 并在出现邻接时观察 debug 命令,或者发出 show ip ospf virtual-links 命令。


相关信息


Document ID: 47866