据我了解,BGP 同步是一项现在默认禁用的功能。如果存在匹配的 IGP 路由,它只允许将 iBGP 路由选择为最佳(并因此进一步通告给其他邻居)。
我有一个同时运行 BGP(在 AS100 中)和 EIGRP 的路由器 (R1)。该路由器是 AS100 中的路由反射器,并连接到另一个路由器 (R8),该路由器又连接到 AS54 中的 R10。R8 从 R10 (112.0.0.0/8) 获知一条路由,并将其进一步通告给 R1。这些外部路由器不会重新分配到 EIGRP,因此不能通过 BGP 以外的其他方式在 R1 上使用。
R1配置:
R1#sh run | s eigrp|bgp
router eigrp 100
network 155.1.0.0
redistribute connected route-map ONLY_LOOPBACK
router bgp 100
! sync is enabled
synchronization
bgp log-neighbor-changes
network 150.1.1.1 mask 255.255.255.255
! R8 neighbor
neighbor 155.1.58.8 remote-as 100
neighbor 155.1.58.8 route-reflector-client
! R4 neighbor
neighbor 155.1.146.4 remote-as 100
neighbor 155.1.146.4 route-reflector-client
R1 没有到 112.0.0.0/8 (EIGRP) 的 IGP 路由,也没有运行任何其他路由协议:
R1#sh ip eigrp topo 112.0.0.0/8
EIGRP-IPv4 Topology Entry for AS(100)/ID(150.1.1.1)
%Entry 112.0.0.0/8 not in topology table
BGP 还将到 112.0.0.0/8 的两个可能路径标记为未同步:
R1# sh ip bgp 112.0.0.1
BGP routing table entry for 112.0.0.0/8, version 2
Paths: (2 available, best #2, table default)
Advertised to update-groups:
1
Refresh Epoch 1
54 50 60, (Received from a RR-client)
155.1.58.8 (metric 3328) from 155.1.58.8 (150.1.8.8)
Origin IGP, metric 0, localpref 100, valid, internal, not synchronized
rx pathid: 0, tx pathid: 0
Refresh Epoch 1
54 50 60, (Received from a RR-client)
155.1.67.7 (metric 3072) from 155.1.67.7 (150.1.7.7)
Origin IGP, metric 0, localpref 100, valid, internal, not synchronized, best
rx pathid: 0, tx pathid: 0x0
据我所知,它们都是内部路由(从 iBGP 对等方接收),并且两者都不同步。因此,它们不应被视为最佳路径的候选者,并且 R1 不应进一步宣传该路径。
然而,如前所述,它仍然选择路径#2 为最佳,并将路径进一步通告给其他 RR 客户端,例如 R4:
R4#sh ip bgp 112.0.0.0
BGP routing table entry for 112.0.0.0/8, version 0
Paths: (1 available, no best path)
Not advertised to any peer
Refresh Epoch 2
54 50 60
155.1.67.7 (inaccessible) from 155.1.146.1 (150.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, not synchronized
Originator: 150.1.7.7, Cluster list: 150.1.1.1
rx pathid: 0, tx pathid: 0
它从 R1 (150.1.1.1 / 155.1.146.1) 发布。在 R4,路由被认为是不同步的,因此没有最佳路径。但为什么它首先是由 R1 宣传的呢?当两条可用路径不同步时,为什么 R1 会选择最佳路径?