△解决IBGP的水平分割

IBGP的水平分割:当一个IBGP收到一个IBGP邻居的路由时他不会再将这条路由传递给下一个IBGP邻居。

BGP笔记5_BGP笔记

在上图中,R2通告的2.2.2.0/24网络,在R1和R3上的BGP路由表中都是有的,但是R4就没有。这就是因为IBGP的水平分割在起作用。 
BGP笔记5_BGP笔记_02 
BGP笔记5_BGP笔记_03 
BGP笔记5_BGP笔记_04 
BGP笔记5_BGP笔记_05

为了解决IBPG的水平分割带来的问题,让R4也能收到R2通告的2.2.2.0/24网络,我们可以采取下面两种方法:1、路由反射器  2、联邦

1、路由反射器

路由反射器属于C/S模式。其中的S就是RR(Route Reflector即路由反射器)

1)RR从EBGP收到的路由即会发给Client,也会发给Non-Client

BGP笔记5_BGP笔记_06

2)RR从Client收到的的路由,即会发送给EBGP和Client也会发送给Non-Client

BGP笔记5_BGP笔记_07

3)RR从Non-Client收到的路由会发给EBGP和Client,而不会发送给Non-Client

BGP笔记5_BGP笔记_08

----------------------------------------------------------------------------------------------

下面开始在RR上配置路由反射器:

BGP笔记5_BGP笔记_09

BGP笔记5_BGP笔记_10

做完以后去R4 看看效果:发现,R4已经有2.2.2.0/24的BPG路由了。

BGP笔记5_BGP笔记_11

2、联邦

BGP笔记5_BGP笔记_12

联邦就是在大AS里面再划分小AS,小AS之间的关系就类似EBGP,从而解决了IBGP的水平分割问题。这个小AS号一般用私有AS号(AS64512 到 AS65535)

做联邦一般有一下三个步骤:

BGP笔记5_BGP笔记_13

先在R1、R3和R4上no掉之前配置的router bgp 1。

第一步:router bgp 小AS号

R1:

router bgp 64512 
   bgp router-id 1.1.1.1 
   no synchronization 
   no auto-summary 
   neighbor 3.3.3.3 remote-as 64512 
   neighbor 3.3.3.3 update-source Loopback0 
   neighbor 3.3.3.3 next-hop-self 
   neighbor 12.1.1.2 remote-as 2 
R3:

router bgp 64512 
   bgp router-id 3.3.3.3 
   no synchronization 
   no auto-summary 
   neighbor 1.1.1.1 remote-as 64512 
   neighbor 1.1.1.1 update-source Loopback0 
   neighbor 4.4.4.4 remote-as 64513 
   neighbor 4.4.4.4 ebgp-multihop 255 
   neighbor 4.4.4.4 update-source Loopback0 
R4:  

router bgp 64513 
   bgp router-id 4.4.4.4 
   no synchronization 
   no auto-summary 
   neighbor 3.3.3.3 remote-as 64512 
   neighbor 3.3.3.3 ebgp-multihop 255 
   neighbor 3.3.3.3 update-source Loopback0 
 

第二步:声明所在的大AS号

R1:

bgp confederation identifier 1

R3:

bgp confederation identifier 1 
 

R4:

bgp confederation identifier 1 
 

第三步:小AS号之间互指peers

R3:

bgp confederation peers 64513

R4:

bgp confederation peers 64512

看看最后的效果:

BGP笔记5_BGP笔记_14

本文出自 “梦想不远” 博客,请务必保留此出处http://zjskobe.blog.51cto.com/2772091/838043