什么会阻止活动路由转移到瞻博网络转发表?

网络工程 杜松 瞻博网络
2021-07-05 20:10:20

在具有两个路由器和两个上游的设置中,我偶然发现了一个问题,即仅对于 IPv6 路由,没有任何活动路径安装到其中一个路由器的转发表中(router B如下所述)。IPv4 工作没有问题,另一个路由器的工作方式正如我所期望的那样,尽管它们是相同的模型并且配置非常相似。

例如,一些应该通过连接到路由器 B 的上游路由的路由:

miho@ROUTER-B> show route 2a00:1450:4001:80f::200e 

inet6.0: 117422 destinations, 233492 routes (117210 active, 0 holddown, 212 hidden)
+ = Active Route, - = Last Active, * = Both

2a00:1450:4001::/48*[BGP/170] 03:00:15, localpref 100, from <UPSTREAM-B>
                      AS path: 2222 2914 15169 I, validation-state: unverified
                    >  to <UPSTREAM-B> via ae1.0
                    [BGP/170] 01:22:40, localpref 100
                      AS path: 1111 1111 1111 15169 I, validation-state: unverified
                    >  to <ROUTER-A> via ae0.0

miho@ROUTER-B> show route forwarding-table destination 2a00:1450:4001::
Routing table: default.inet6
Internet6:
Destination        Type RtRef Next hop           Type Index    NhRef Netif
2a00:1450:4001::/48 user     1                   indr  1048576 116715
                              <ROUTER-A>         ucst      626     4 ae0.0

Routing table: __master.anon__.inet6
Internet6:
Destination        Type RtRef Next hop           Type Index    NhRef Netif
default            perm     0                    rjct      558     1

( <ROUTER-A>, <ROUTER-B>, <UPSTREAM-A>,<UPSTREAM-B>是真实地址1111的占位符是上游 A 的 ASN 的占位符,2222对于上游 B)

假设我正确读取了上面的输出,最佳路由(并选择为活动路径)将指向上游 B 的直接连接路由器。但是,转发表指向路由器 A。查看另一台路由器,相同的目的地指向路由器 B,这实际上是预期的行为,但现在导致数据包在这些设备之间进行乒乓操作,直到达到 TTL。

为什么不将路由安装到转发表中的任何想法?

BGP 以局部视图运行,以避免过度的 FIB——因为这是我的第一个猜测。此外,在forwarding-options(= 也没有过滤器可以阻止传输到转发表)下没有任何设置


编辑:关于下面的评论,这里是show route ... extensive. 2a0d:fXXX::/64是路由器A和B2222:2222::/124的子网,上游B和9999自己AS使用的子网

miho@ROUTER-B> show route protocol bgp 2a00:1450:4001:80f:: extensive 

inet6.0: 117503 destinations, 233656 routes (117290 active, 0 holddown, 213 hidden)
2a00:1450:4001::/48 (2 entries, 1 announced)
TSI:
KRT queued (pending) change
  2a00:1450:4001::/48 -> {indirect(1048576)}=>{<UPSTREAM-B>}
Page 0 idx 0, (group local-ibgp-6 type Internal) Type 1 val 0x115fd964 (adv_entry)
   Advertised metrics:
     Flags: Nexthop Change
     Nexthop: Self
     Localpref: 100
     AS path: [9999] 2222 2914 15169 I
     Communities: 0:0 2222:888
    Advertise: 00000001
Path 2a00:1450:4001::
from 2222:2222::7
Vector len 4.  Val: 0
        *BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 0
                Address: 0x591ce8c
                Next-hop reference count: 328038
                Source: 2222:2222::7
                Next hop: <UPSTREAM-B> via ae1.0, selected
                Session Id: 0x0
                State: <Active Ext>
                Local AS: 9999 Peer AS:  2222
                Age: 6:04:47 
                Validation State: unverified 
                Task: BGP_2222.2222:2222::7
                Announcement bits (3): 0-KRT 2-BGP_RT_Background 3-Resolve tree 3 
                AS path: 2222 2914 15169 I 
                Communities: 0:0 2222:888
                Accepted
                Localpref: 100
                Router ID: <UPSTREAM-B>
         BGP    Preference: 170/-101
                Next hop type: Indirect, Next hop index: 0
                Address: 0x591cae4
                Next-hop reference count: 338961
                Source: <ROUTER-A>
                Next hop type: Router, Next hop index: 626
                Next hop: <ROUTER-A> via ae0.0, selected
                Session Id: 0x147
                Protocol next hop: <ROUTER-A>
                Indirect next hop: 0x6011a04 1048576 INH Session ID: 0x148
                State: <Int Ext Changed>
                Inactive reason: AS path
                Local AS: 9999 Peer AS: 9999
                Age: 4:27:12    Metric2: 0 
                Validation State: unverified 
                Task: BGP_9999.<ROUTER-A>
                AS path: 1111 1111 1111 15169 I 
                Communities: 1111:1111 1111:64633
                Accepted
                Localpref: 100
                Router ID: <ROUTER-A>
                Indirect next hops: 1   
                        Protocol next hop: <ROUTER-A>
                        Indirect next hop: 0x6011a04 1048576 INH Session ID: 0x148
                        Indirect path forwarding next hops: 1
                                Next hop type: Router
                                Next hop: <ROUTER-A> via ae0.0
                                Session Id: 0x147
                2a0d:fXXX::/48 Originating RIB: inet6.0
                  Node path count: 1
                  Forwarding nexthops: 1
                    Next hop type: Interface
                    Nexthop: via ae0.0
1个回答

感谢@Rais 的评论,我show route ... extensive再次检查了输出(也添加到上面的问题中)并发现有一些KRT queued (pending) change提到。

运行show krt queue然后显示:

miho@ROUTER-B> show krt queue 
<< few irrelevant lines removed here >>
High-priority change queue: 0 queued
High-priority add queue: 1 queued
                ADD nhtype Router index 0 (40759)
                    error 'ENOENT -- Item not found'
                    kqp '0x583bcc0'
<< few irrelevant lines removed here >>

本身并不是很有帮助,但它让我再次检查所有细节,我终于发现:我的上游发送的next-hop地址与路由器地址不同,并且next-hop位于用于与上游通信的子网之外。修复它也修复了卡住的路由(结果我们错过了子网大小的通信)。