为什么 Type-5 AS 外部 OSPF 路由不会安装在路由表中?

网络工程 思科 ospf cisco-ios-15 cisco-asr
2021-07-08 23:02:06

我正在将 eBGP 路由重新分配到 OSPF,我看到该路由在数据库中泛滥,但它没有安装在其他路由器的路由表中。

什么会导致这条路由没有安装在路由表中?

下面是输出的一些故障排除dallasatlanta我期待路线 172.16.192.0/19 在atlanta.

asr1k/达拉斯#show run | 秒路由器 ospf 1

router ospf 1 vrf blue
 router-id 172.18.255.1
 ispf
 prefix-suppression
 timers throttle spf 10 100 1000
 timers throttle lsa 10 100 1000
 timers lsa arrival 50
 timers pacing flood 5
 timers pacing retransmission 60
 redistribute static subnets
 redistribute bgp 65001 subnets tag 0
 passive-interface default
 no passive-interface GigabitEthernet0/0/2.100
 no passive-interface Tunnel1000
 network 172.16.0.0 0.15.255.255 area 0
 neighbor 172.16.254.25
 neighbor 172.16.254.19
 neighbor 172.16.254.22
 neighbor 172.16.254.20
 neighbor 172.16.255.27 cost 5000
 maximum-paths 1

asr1k/dallas#show ip route vrf blue 172.16.192.0

Routing Table: blue
Routing entry for 172.16.192.0/19
  Known via "bgp 65001", distance 20, metric 100
  Tag 65000, type external
  Redistributing via ospf 1
  Advertised by ospf 1 subnets tag 0
  Last update from 169.254.13.109 03:37:09 ago
  Routing Descriptor Blocks:
  * 169.254.13.109, from 169.254.13.109, 03:37:09 ago
      Route metric is 100, traffic share count is 1
      AS Hops 2
      Route tag 65000
      MPLS label: none
      MPLS Flags: NSF

asr1k/dallas#show ip ospf 1 数据库

            OSPF Router with ID (172.18.255.1) (Process ID 1)

        Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.255.28   172.16.255.28   358         0x80005070 0x00C976 18
172.17.255.1    172.17.255.1    696         0x8000A4AB 0x003027 18
172.18.255.1    172.18.255.1    344         0x8002933B 0x00B226 23
172.19.255.1    172.19.255.1    1562        0x8000FEE0 0x00553C 22
172.20.255.1    172.20.255.1    762         0x800F04F8 0x00A1D6 23
172.21.255.1    172.21.255.1    1223        0x8002CAA2 0x00DFAF 3
172.22.255.1    172.22.255.1    125         0x8000D829 0x00DD6C 23
172.23.255.1    172.23.255.1    192         0x80004AD5 0x00EFB5 19
172.24.255.1    172.24.255.1    306         0x80006A76 0x0005AF 18
172.25.255.1    172.25.255.1    238         0x8000B51E 0x00B20C 23
172.27.255.1    172.27.255.1    159         0x8000588C 0x000254 19
172.30.255.1    172.30.255.1    1693        0x80001EC0 0x00045E 18
172.31.255.1    172.31.255.1    323         0x8000E561 0x004758 16
172.32.255.1    172.32.255.1    655         0x80003F20 0x00A33F 2

        Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.16.253.0    172.25.255.1    2011        0x80003F1C 0x00E1E7

        Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
172.16.192.0    172.18.255.1    597         0x80000003 0x008B87 0
172.17.0.0      172.17.255.1    1461        0x800073C6 0x00CF1B 0
172.18.0.0      172.18.255.1    1881        0x8000739C 0x001003 0
172.19.0.0      172.19.255.1    1066        0x8000736F 0x0056E7 0
172.20.0.0      172.20.255.1    762         0x8000731A 0x00ECA4 0
172.22.0.0      172.22.255.1    1412        0x80007396 0x00CB45 0
172.23.0.0      172.23.255.1    1445        0x80003B75 0x00A2C5 0
172.24.0.0      172.24.255.1    306         0x800052F9 0x00408A 0
172.25.0.0      172.25.255.1    2011        0x80007341 0x003A26 0
172.27.0.0      172.27.255.1    1672        0x80003390 0x003419 0
172.28.0.0      172.16.255.28   601         0x8000442E 0x006F1E 0

这是来自不同路由器的输出:

asr1k/atlanta#show run | 秒路由器 ospf 1

router ospf 1 vrf blue
 router-id 172.22.255.1
 ispf
 prefix-suppression
 timers throttle spf 10 100 1000
 timers throttle lsa 10 100 1000
 timers lsa arrival 50
 timers pacing flood 5
 timers pacing retransmission 60
 redistribute static subnets
 passive-interface default
 no passive-interface GigabitEthernet0/0/2.100
 no passive-interface Tunnel1000
 network 172.16.0.0 0.15.255.255 area 0
 neighbor 172.16.254.19
 neighbor 172.16.254.18
 neighbor 172.16.254.25
 neighbor 172.16.254.20
 neighbor 172.16.255.27 cost 5000
 maximum-paths 1

asr1k/atlanta#show ip route vrf blue 172.16.192.0

Routing Table: blue
% Subnet not in table

asr1k/atlanta#show ip ospf 1 数据库

            OSPF Router with ID (172.22.255.1) (Process ID 1)

        Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.255.28   172.16.255.28   515         0x80005070 0x00C976 18
172.17.255.1    172.17.255.1    853         0x8000A4AB 0x003027 18
172.18.255.1    172.18.255.1    501         0x8002933B 0x00B226 23
172.19.255.1    172.19.255.1    1718        0x8000FEE0 0x00553C 22
172.20.255.1    172.20.255.1    918         0x800F04F8 0x00A1D6 23
172.21.255.1    172.21.255.1    1380        0x8002CAA2 0x00DFAF 3
172.22.255.1    172.22.255.1    280         0x8000D829 0x00DD6C 23
172.23.255.1    172.23.255.1    347         0x80004AD5 0x00EFB5 19
172.24.255.1    172.24.255.1    462         0x80006A76 0x0005AF 18
172.25.255.1    172.25.255.1    394         0x8000B51E 0x00B20C 23
172.27.255.1    172.27.255.1    314         0x8000588C 0x000254 19
172.30.255.1    172.30.255.1    1849        0x80001EC0 0x00045E 18
172.31.255.1    172.31.255.1    480         0x8000E561 0x004758 16
172.32.255.1    172.32.255.1    811         0x80003F20 0x00A33F 2

        Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.16.253.0    172.25.255.1    132         0x80003F1D 0x00DFE8

        Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
172.16.192.0    172.18.255.1    755         0x80000003 0x008B87 0
172.17.0.0      172.17.255.1    1619        0x800073C6 0x00CF1B 0
172.18.0.0      172.18.255.1    1           0x8000739D 0x000E04 0
172.19.0.0      172.19.255.1    1223        0x8000736F 0x0056E7 0
172.20.0.0      172.20.255.1    919         0x8000731A 0x00ECA4 0
172.22.0.0      172.22.255.1    1568        0x80007396 0x00CB45 0
172.23.0.0      172.23.255.1    1601        0x80003B75 0x00A2C5 0
172.24.0.0      172.24.255.1    463         0x800052F9 0x00408A 0
172.25.0.0      172.25.255.1    132         0x80007342 0x003827 0
172.27.0.0      172.27.255.1    1829        0x80003390 0x003419 0
172.28.0.0      172.16.255.28   759         0x8000442E 0x006F1E 0

asr1k/atlanta#show ip ospf 1 数据库外部 172.16.192.0

            OSPF Router with ID (172.22.255.1) (Process ID 1)

        Type-5 AS External Link States

  LS age: 764
  Options: (No TOS-capability, DC, Downward)
  LS Type: AS External Link
  Link State ID: 172.16.192.0 (External Network Number )
  Advertising Router: 172.18.255.1
  LS Seq Number: 80000003
  Checksum: 0x8B87
  Length: 36
  Network Mask: /19
    Metric Type: 2 (Larger than any link state path)
    MTID: 0
    Metric: 1
    Forward Address: 0.0.0.0
    External Route Tag: 0

编辑

我还尝试tag 0在重新分发路由器上删除,我在亚特兰大也有相同的行为。

asr1k/atlanta#show ip ospf 1 database  external 172.16.192.0

            OSPF Router with ID (172.22.255.1) (Process ID 1)

        Type-5 AS External Link States

  LS age: 23
  Options: (No TOS-capability, DC, Downward)
  LS Type: AS External Link
  Link State ID: 172.16.192.0 (External Network Number )
  Advertising Router: 172.18.255.1
  LS Seq Number: 80000001
  Checksum: 0x9D99
  Length: 36
  Network Mask: /19
    Metric Type: 2 (Larger than any link state path)
    MTID: 0
    Metric: 1
    Forward Address: 0.0.0.0
    External Route Tag: 3489667571

asr1k/atlanta# show ip route vrf blue 172.16.192.0

Routing Table: blue
% Network not in table
2个回答

capability vrf-lite 下不见了 router ospf

这篇文章有很好的解释。本质上,该命令告诉 OSPF 忽略 DN 位并在 SPF 计算中使用 LSA。

https://supportforums.cisco.com/discussion/12754196/where-configure-capability-vrf-lite-ce-or-pe

问题就在您的数据库输出中:

Options: (No TOS-capability, DC, Downward)

在重新分配时,向下位被设置为循环防止机制。就其本身而言,这不一定是一件坏事,但您也正在清除在重新分发时设置的域标签。此处描述此机制,基本上,任何下游 ASBR 看到 OSPF 条目设置了该向下位且域 ID 相同或缺失时,都不会允许它作为已安装的路由。

简而言之,它基本上是一种循环预防机制。尝试tag 0从达拉斯路由器上的重新分发中删除该语句。

在重新分配上使用某种路由映射来明确控制域之间传递的内容以及控制路由属性/度量的机制也可能是一件明智的事情(仅举一个例子:type-1 可以非常适合在基于 IGP 的多个 ASBR 之间进行选择,但能够有选择地操纵基于 BGP 社区的指标是值得的)。不过,这纯粹只是一个卫生建议。