据我所知,BGP同步是现在默认禁用的特性。它只允许在有匹配的IGP路由的情况下,选择最佳的iBGP路由(从而进一步向其他邻居发布广告)。
我有一个路由器(R1)同时运行BGP (在AS100中)和EIGRP。路由器是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-clientR1没有到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 tableBGP还将到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在两个可用路径都不同步的情况下选择最佳路径?
发布于 2016-08-20 22:21:19
我想你误解了BGP同步。BGP同步意味着BGP路由器将不会向eBGP对等方发布前缀广告,直到您中的所有路由器都知道通过IGP路由。换句话说,除非路由通过IGP存在于路由表中,否则eBGP不会向eBGP对等方发布路由广告。思科有很多文件要解释BGP。例如,BGP:常见问题:
什么是同步,它如何影响安装在IP路由表中的BGP路由?如果您的AS将流量从另一个AS传递到第三个AS,BGP不应该在您的AS中的所有路由器通过IGP了解该路由之前为该路由做广告。BGP等待到IGP在AS中传播路由,然后向外部对等点发布该路由。如果BGP路由器无法在其IGP中验证这些路由,则启用同步的BGP路由器不会将iBGP学习路由安装到其路由表中。在路由器bgp下发出无同步命令,以禁用同步。这将阻止BGP验证IGP中的iBGP路由。有关更详细的解释,请参阅BGP案例研究:同步。
iBGP中有一条规则,即iBGP对等方不能为通过iBGP学到的任何前缀做广告。这与BGP同步无关。这意味着您的iBGP对等点必须具有完整的网格(通过IGP,或者在所有BGP对等点之间有直接连接),或者您必须使用缓解(路由反射器或联盟)。
https://networkengineering.stackexchange.com/questions/34216
复制相似问题