BGP Aggregation – AS-Set

简介:
配置R5 通告 汇聚路由150.1.0.0/21,同时抑制任何明细路由,但要确保 R3 学习到的汇聚路由中as-path包括 AS1,2,5。

 
【实验拓扑】

 

 
【实验分析】
这是一个帧中继的hub-and-spoke 网络,R1、R2、R3都与R5能够相互访问,但R1、R2、R3 之间不能互相访问,因此在AS3上能够学习到 AS1、AS2、AS5 通告的路由,如果在R5上配置了汇聚路由,并且对所有明细路由进行抑制之后,R3学习到的汇聚路由中的as-path将不包括as1与as2,原因是默认情况下 聚合路由的as-path是基于生成聚合路由的as-path。因此本实验要使用as-set,是的R3学习到的汇聚路由中的as-path能够包含源明细路由的as号。

 

 
【实验配置步骤】
  • 按照上图配置各个设备
  • 在R1、R2、R3、R5 上配置BGP
  • R5 与 R1, R2, and R3 配置为邻居对等体
  • 在R1上创建Loopback 150.X.1.1/24 并通告到 BGP
  • 在R2上创建Loopback 150.X.2.2/24 并通告到 BGP
  • 在R5上创建Loopback 150.X.5.5/24 并通告到 BGP
  • 在R5上配置 BGP aggregate 150.X.0.0/21
  • 汇聚路由中包含明细路由的 AS-Path 信息

 
【实验配置】
R1:
interface Serial0/0
ip address 155.1.0.1 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.5 105 broadcast
no frame-relay inverse-arp
!
router bgp 1
network 150.1.1.0 mask 255.255.255.0
neighbor 155.1.0.5 remote-as 5
!
R2:
interface Loopback0
ip address 150.1.2.2 255.255.255.0
!
interface Serial0/0
ip address 155.1.0.2 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.5 205 broadcast
no frame-relay inverse-arp
!
router bgp 2
network 150.1.2.0 mask 255.255.255.0
neighbor 155.1.0.5 remote-as 5

R3:
interface Serial0/0
ip address 155.1.0.3 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.5 305 broadcast
no frame-relay inverse-arp
router bgp 3
neighbor 155.1.0.5 remote-as 5

R5:
interface Loopback0
ip address 150.1.5.5 255.255.255.0
interface Serial0/0
ip address 155.1.0.5 255.255.255.0
encapsulation frame-relay
clock rate 2000000
frame-relay map ip 155.1.0.3 503 broadcast
frame-relay map ip 155.1.0.2 502 broadcast
frame-relay map ip 155.1.0.1 501 broadcast
no frame-relay inverse-arp
!
router bgp 5
network 150.1.5.0 mask 255.255.255.0
aggregate-address 150.1.0.0 255.255.248.0 as-set summary-only
neighbor 155.1.0.1 remote-as 1
neighbor 155.1.0.2 remote-as 2
neighbor 155.1.0.3 remote-as 3
【实验验证】

 
我们分别在R5上配置了不同的汇聚路由,区别在与是否加入了as-set 参数,下面在R3的输出结果看到,加入as-set参数之后,R3学习到的汇聚路由中会包含明细路由的as-path。

 
在R5上配置 aggregate-address 150.1.0.0 255.255.248.0 summary-only之后
R3#show ip bgp
BGP table version is 8, local router ID is 155.1.0.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 150.1.0.0/21 155.1.0.5 0 0 5 i

 


 
在R5上配置  aggregate-address 150.1.0.0 255.255.248.0 as-set summary-only之后
 
R3#show ip bgp
BGP table version is 9, local router ID is 155.1.0.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 150.1.0.0/21 155.1.0.5 0 0  5 {1,2} i


本文转自zcm8483 51CTO博客,原文链接:http://blog.51cto.com/haolun/992252
相关文章
|
负载均衡 网络协议 网络架构
策略路由(Policy-Based-Route)
定义及运用场景 PBR: Policy-Based-Route,该技术打破了路由表的传统选路规则,可以根据管理员定义的策略条件来选择性的转发数据包。
496 0
策略路由(Policy-Based-Route)
|
网络协议 网络架构 负载均衡