BGP建立邻居更新源问题


在这里插入图片描述

1、背景描述:

红色箭头为旧线路,绿色线路为新搭建专线。三台路由器路由互通,均在同一个AS10内。

2、路由器1.1.1.1与3.3.3.3建立 IBGP邻居配置如下:

##路由器1.1.1.1:
router bgp 10
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 10
neighbor 3.3.3.3 description to-3.3.3.3
!
address-family ipv4
bgp redistribute-internal
network 10.250.0.8 mask 255.255.255.252
network 1.1.1.1 mask 255.255.255.255
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community both
neighbor 3.3.3.3 next-hop-self
neighbor 3.3.3.3 soft-reconfiguration inbound
exit-address-family
!

##路由器3.3.3.3:
router bgp 10
bgp router-id 3.3.3.3
bgp cluster-id 2.2.2.2
bgp log-neighbor-changes
neighbor 10.250.0.1 remote-as 10
neighbor 10.250.0.1 description to-1.1.1.1
neighbor 10.250.0.1 update-source Loopback0
neighbor 1.1.1.1 remote-as 10
neighbor 1.1.1.1 description to-1.1.1.1
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
bgp redistribute-internal
network 10.250.0.8 mask 255.255.255.252
network 10.255.254.16 mask 255.255.255.255
neighbor 10.250.0.1 activate
neighbor 10.250.0.1 send-community both
neighbor 10.250.0.1 route-reflector-client
neighbor 10.250.0.1 next-hop-self
neighbor 10.250.0.1 soft-reconfiguration inbound
exit-address-family
!

原先路由器1.1.1.1利用物理口跟3.3.3.3建立邻居关系,现如今增加一条新的专线,为了增加架构冗余性,希望使用环回口建立邻居关系
路由器1.1.1.1和3.3.3.3增加配置如下

##路由器1.1.1.1:
router bgp 10
neighbor 3.3.3.3 update-source Loopback0 //指定更新源为环回口

##路由器3.3.3.3:
router bgp 10
neighbor 1.1.1.1 remote-as 10
neighbor 1.1.1.1 description to-1.1.1.1
neighbor 1.1.1.1 update-source Loopback0
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both
neighbor 1.1.1.1 route-reflector-client
neighbor 1.1.1.1 next-hop-self
neighbor 1.1.1.1 soft-reconfiguration inbound

增加配置后,路由器3.3.3.3使用环回口同时希望跟路由器1.1.1.1的物理口10.250.0.1和环回口1.1.1.1建立邻居关系。
在这里插入图片描述
通过查看路由器3.3.3.3的BGP邻居(show ip bgp summary),发现只有原来的邻居10.250.0.1是成功建立的,1.1.1.1没有成功,状态为idle,后来通过重置与10.250.0.1的BGP邻居关系后(clear ip bgp 10.250.0.1),发现邻居关系变为1.1.1.1成功,10.250.0.1不成功。

分析:一台路由器通过一个更新源去跟另外一台路由器的多个接口(环回口、物理口)建立BGP邻居关系,只能建立成功一条连接,并且先建立的连接具有稳定性,不让后来的抢占,除非该条邻居关系被重置

3、路由器1.1.1.1与2.2.2.2建立 IBGP邻居配置如下:

##路由器1.1.1.1:
router bgp 10
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 10.250.0.2 remote-as 10
neighbor 10.250.0.2 description to-2.2.2.2
neighbor 10.250.0.2 fall-over bfd
!
address-family ipv4
bgp redistribute-internal
network 10.250.0.0 mask 255.255.255.252
neighbor 10.250.0.2 activate
neighbor 10.250.0.2 send-community both
neighbor 10.250.0.2 next-hop-self
neighbor 10.250.0.2 soft-reconfiguration inbound
exit-address-family
!
##路由器2.2.2.2:
router bgp 10
bgp router-id 2.2.2.2
bgp cluster-id 2.2.2.2
bgp log-neighbor-changes
neighbor 10.250.0.1 remote-as 10
neighbor 10.250.0.1 description to-1.1.1.1
neighbor 10.250.0.1 fall-over bfd
!
address-family ipv4
bgp redistribute-internal
network 10.250.0.0 mask 255.255.255.252
network 2.2.2.2 mask 255.255.255.255
neighbor 10.250.0.1 activate
neighbor 10.250.0.1 send-community both
neighbor 10.250.0.1 route-reflector-client
neighbor 10.250.0.1 next-hop-self
neighbor 10.250.0.1 soft-reconfiguration inbound
exit-address-family
!

原先路由器1.1.1.1利用物理口跟2.2.2.2物理口建立邻居关系,现如今增加一条新的专线,为了增加架构冗余性,希望使用环回口建立邻居关系
路由器1.1.1.1和2.2.2.2增加配置如下

##路由器1.1.1.1:
router bgp 10
neighbor 2.2.2.2 remote-as 10
neighbor 2.2.2.2 description to-2.2.2.2
neighbor 2.2.2.2 update-source Loopback0
address-family ipv4
network 1.1.1.1 mask 255.255.255.255
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 send-community both
neighbor 2.2.2.2 next-hop-self
neighbor 2.2.2.2 soft-reconfiguration inbound

##路由器2.2.2.2:
router bgp 10
neighbor 1.1.1.1 remote-as 10
neighbor 1.1.1.1 description to-1.1.1.1
neighbor 1.1.1.1 update-source Loopback0
address-family ipv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both
neighbor 1.1.1.1 next-hop-self
neighbor 1.1.1.1 soft-reconfiguration inbound

增加配置后,路由器2.2.2.2使用环回口跟路由器1.1.1.1的环回口建立邻居关系,路由器2.2.2.2还使用物理口跟路由器1.1.1.1的物理口建立邻居关系
在这里插入图片描述
通过查看路由器2.2.2.2的BGP邻居(show ip bgp summary),发现邻居10.250.0.1和1.1.1.1都是成功建立的。

分析:因为路由器2.2.2.2是使用两个不同的源来跟路由器1.1.1.1不同源建立邻居关系,因此可以成功建立。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值