BGP“协议下一跳”解析为与使用 ISIS 的同一 IP 不同的下一跳地址

网络工程 BGP 杜松 伊斯兰国
2022-03-01 10:25:10

我有一个 BGP 学习的前缀130.130.0.0/24,带有协议下一跳10.0.2.5

root@r2> show route 130.130.0.0 detail

inet.0: 60 destinations, 61 routes (57 active, 0 holddown, 4 hidden)
130.130.0.0/24 (1 entry, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Indirect, Next hop index: 0
                Address: 0xd30c210
                Next-hop reference count: 6
                Source: 10.0.3.4
                Next hop type: Router, Next hop index: 0
                Next hop: 10.0.4.9 via ge-0/0/3.0, selected
                Session Id: 0x0
                Next hop: 10.0.4.1 via ge-0/0/6.0
                Session Id: 0x0
                Protocol next hop: 10.0.2.5
                Indirect next hop: 0xba9dd80 1048582 INH Session ID: 0x1aa
                State: <Active Int Ext>
                Local AS: 65001 Peer AS: 65001
                Age: 44:28      Metric2: 20
                Validation State: unverified
                ORR Generation-ID: 0
                Task: BGP_65001.10.0.3.4+179
                Announcement bits (2): 0-KRT 5-Resolve tree 4
                AS path: (65000) 65222 I
                Communities: 65412:200
                Accepted
                Localpref: 100
                Router ID: 10.0.3.4

root@r2>

如上所示,10.0.2.5被解析为下一跳10.0.4.9(选定)和10.0.4.1. 但是,输出show route 10.0.2.5选择 a10.0.4.1作为下一跳:

root@r2> show route 10.0.2.5

inet.0: 60 destinations, 61 routes (57 active, 0 holddown, 4 hidden)
+ = Active Route, - = Last Active, * = Both

10.0.2.4/30        *[IS-IS/15] 1w5d 02:17:27, metric 20
                      to 10.0.4.9 via ge-0/0/3.0
                    > to 10.0.4.1 via ge-0/0/6.0

root@r2> show route forwarding-table matching 10.0.2.4/30 table default
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination        Type RtRef Next hop           Type Index    NhRef Netif
10.0.2.4/30        user     0 10.0.4.1           ucst      595     5 ge-0/0/6.0

root@r2>

为什么 BGPprotocol next hop使用与 ISIS 不同的下一跳地址?

1个回答

为什么 BGP 协议的下一跳使用与 ISIS 不同的下一跳地址?

因为与 130.130.0.0/24 关联的 BGP 下一跳是 10.0.2.5。BGP 必须解析该路由的下一跳,正如您所指出的那样,它是 IS-IS 路由。这就引出了一个问题,IS-IS 如何到达 10.0.2.5,即通过接口路由 10.0.4.9 和 10.0.4.1。

Jeff Wheeler 是正确的,为什么您在 FIB 中看不到两条路线。假设这是 RIB:

jhead@r3# run show route 1.1.1.1/32 detail

inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
1.1.1.1/32 (1 entry, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Indirect, Next hop index: 0
                Address: 0xce31930
                Next-hop reference count: 2
                Source: 10.10.10.10
                Next hop type: Router, Next hop index: 0
                Next hop: 172.16.0.14 via ge-0/0/0.0, selected
                Session Id: 0x0
                Next hop: 172.16.0.18 via ge-0/0/1.0
                Session Id: 0x0
                Protocol next hop: 10.10.10.10
                Indirect next hop: 0xba3e680 1048575 INH Session ID: 0x142
                State: <Active Int Ext>
                Local AS: 65000 Peer AS: 65000
                Age: 13:48  Metric2: 2
                Validation State: unverified
                Task: BGP_65000.10.10.10.10
                Announcement bits (2): 0-KRT 4-Resolve tree 1
                AS path: I
                Accepted
                Localpref: 100
                Router ID: 10.10.10.10

jhead@r3# run show route 10.10.10.10

inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.10/32     *[OSPF/10] 00:14:53, metric 2
                    > to 172.16.0.14 via ge-0/0/0.0
                      to 172.16.0.18 via ge-0/0/1.0

没有负载平衡策略:

jhead@r3# run show route forwarding-table destination 10.10.10.10
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination        Type RtRef Next hop           Type Index    NhRef Netif
10.10.10.10/32     user     1 172.16.0.14        ucst      583     8 ge-0/0/0.0

使用负载平衡策略:

jhead@r3# run show route forwarding-table destination 10.10.10.10
Routing table: default.inet
Internet:
Enabled protocols: Bridging,
Destination        Type RtRef Next hop           Type Index    NhRef Netif
10.10.10.10/32     user     1                    ulst  1048574     4
                              172.16.0.14        ucst      583     6 ge-0/0/0.0
                              172.16.0.18        ucst      584     6 ge-0/0/1.0