BGP Aggregation – Unsuppress Map

简介:
【实验说明】

 
在AS2上配置汇聚路由,对10.0.0.1/16、 10.1.0.1/16、 10.2.0.1/16、 10.3.0.1/16路由进行汇聚 ,但不通告明细路由出去, 使得AS1 能够学习到汇聚路由, 同时做实验配置,让10.0.0.1/16网络流量使用 R1-R4的链路。让10.3.0.1/16相关网络流量使用R3-R5的链路。我们可以通过R5 traceroute 这两个地址来验证。

 
【实验拓扑】

 

 

【实验分析】
在配置aggregate-address加入summary-only参数后,R4与R5均学习到汇聚路由,但是R4到达10.0.0.0/16与10.3.0.0/16 将使用R1-R4 链路,R5 到达 10.0.0.0/16与10.3.0.0/16  将使用R3-R5链路。因此本实验的核心是保证AS1上除了能够学习bgp汇聚路由外,还能学习到明细路由10.0.0.0/16与10.3.0.0/16 。因此本实验可以使用suppress-map来完成,也可以使用unsuppress-map 来完成。

unsuppress-map用处拓展:在上面两个实验我们学习到BGP汇聚路由 addregate-address 中使用suppress-map参数在通告之前抑制特定的明细路由,使用summary-only 参数抑制所有明细路由,想象一下,如果你只想通告一个分支机构的少量明系路由,使用suppress-map将是一项非常大的工作量,你可以使用unsuppress-map来简化这一工作。unsuppress-map 是在被aggregate-address命令抑制路由之前对路由进行通告。

【实验配置步骤】
  • 按照上图配置各个设备的接口地址
  • 在 R1, R3, R4, R5 上配置BGP
  • R1 与 R3 and R4 建立邻居对等体
  • R5 与 R3 and R4 建立邻居对等体
  • 通告 R5与R4上的loopback0 地址到BGP
  • 通告R1 上的Loopback地址 BGP
  • 通告R2 上的Loopback地址 BGP
  • 在R1与R3上配置BGP汇聚,使用 summary-only 参数
  • R1 使用 unsuppress 10.0.0.0/16 到R4
  • R3 使用 unsuppress 10.3.0.0/16 到R5

 
【实验基本配置】
R1:
interface Loopback0
ip address 10.0.0.1 255.255.0.0
!
interface Loopback1
ip address 10.1.0.1 255.255.0.0
!
interface FastEthernet0/0
ip address 155.1.146.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 155.1.13.1 255.255.255.0
clock rate 2000000
!
router bgp 2
network 10.0.0.0 mask 255.255.0.0
network 10.1.0.0 mask 255.255.0.0
aggregate-address 10.0.0.0 255.252.0.0 suppress-map summary-only
neighbor 155.1.13.3 remote-as 2
neighbor 155.1.13.3 next-hop-self
neighbor 155.1.146.4 remote-as 1
neighbor 155.1.146.4 unsuppress-map UNSUPPRESS
!
ip prefix-list 10.0.0.0 permit 10.0.0.0/16
!
route-map UNSUPPRESS permit 10
match ip add prefix-list 10.0.0.0
!
R3:
interface Loopback0
ip address 10.2.0.1 255.255.0.0
!
interface Loopback1
ip address 10.3.0.1 255.255.0.0
!
interface Serial0/1
ip address 155.1.13.3 255.255.255.0
clock rate 64000
!
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 2
network 10.2.0.0 mask 255.255.0.0
network 10.3.0.0 mask 255.255.0.0
aggregate-address 10.0.0.0 255.252.0.0 suppress-map summary-only
neighbor 155.1.13.1 remote-as 2
neighbor 155.1.13.1 next-hop-self
neighbor 155.1.0.5 remote-as 1
neighbor 155.1.0.5 unsuppress-map UNSUPPRESS
!
ip prefix-list 10.3.0.0 permit 10.3.0.0/16
!
route-map UNSUPPRESS permit 10
match ip add prefix-list 10.3.0.0

R4:
interface Loopback0
ip address 204.12.1.4 255.255.255.0
!
interface FastEthernet0/0
ip address 155.1.146.4 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 155.1.45.4 255.255.255.0
clock rate 2000000
!
router bgp 1
network 204.12.1.0
neighbor 155.1.45.5 remote-as 1
neighbor 155.1.146.1 remote-as 2
neighbor 155.1.45.5 next-hop-self

 
R5:
interface Loopback0
ip address 155.1.5.5 255.255.255.0
!
interface Serial0/1
ip address 155.1.45.5 255.255.255.0
clock rate 64000
!
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
no frame-relay inverse-arp
!
router bgp 1
network 155.1.5.0 mask 255.255.255.0
neighbor 155.1.45.4 remote-as 1
neighbor 155.1.0.3 remote-as 2
neighbor 155.1.45.4 next-hop-self

 
【实验验证】

 
从下面结果我们可以看到R5到达 10.0.0.1 网络走R1-R4,到达10.3.0.0 网络走R3-R5。证明了我们的实验中 unsuppress-map 命令可以在aggregate-address命令抑制路由之前对特定路由进行通告。但注意一点:unsuppress-map命令是基于邻居来配置的。

 
Rack1R5#trace 10.0.0.1 source 155.1.5.5
Type escape sequence to abort.i
Tracing the route to 10.0.0.1
1 155.1.45.4 16 msec 12 msec 16 msec
2 155.1.146.1 16 msec * 16 msec

Rack1R5#trace 10.3.0.1 source 155.1.5.5
Type escape sequence to abort.
Tracing the route to 10.3.0.1
1 155.1.0.3 32 msec * 28 msec

Rack1R4#trace 10.0.0.1 source 204.12.1.4
Type escape sequence to abort.
Tracing the route to 10.0.0.1
1 155.1.146.1 4 msec * 0 msec
Rack1R4#trace 10.3.0.1 source 204.12.1.4
Type escape sequence to abort.
Tracing the route to 10.3.0.1
1 155.1.45.5 16 msec 16 msec 16 msec
2 155.1.0.3 40 msec * 40 msec
R1#show ip bgp
BGP table version is 17, local router ID is 10.1.0.1
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
s> 10.0.0.0/16 0.0.0.0 0 32768 i
*> 10.0.0.0/14 0.0.0.0 32768 i
* i 155.1.13.3 0 100 0 i
s> 10.1.0.0/16 0.0.0.0 0 32768 i
* i155.1.5.0/24 155.1.13.3 0 100 0 1 i
*> 155.1.146.4 0 1 i
* i204.12.1.0 155.1.13.3 0 100 0 1 i
*> 155.1.146.4 0 0 1 i
R1#show ip bgp neighbors 155.1.146.4 advertised-routes
BGP table version is 17, local router ID is 10.1.0.1
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
s> 10.0.0.0/16 0.0.0.0 0 32768 i
*> 10.0.0.0/14 0.0.0.0 32768 i

R3#show ip bgp
BGP table version is 22, local router ID is 10.3.0.1
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
* i10.0.0.0/14 155.1.13.1 0 100 0 i
*> 0.0.0.0 32768 i
s> 10.2.0.0/16 0.0.0.0 0 32768 i
s> 10.3.0.0/16 0.0.0.0 0 32768 i
* i155.1.5.0/24 155.1.13.1 0 100 0 1 i
*> 155.1.0.5 0 0 1 i
* i204.12.1.0 155.1.13.1 0 100 0 1 i
*> 155.1.0.5 0 1 i

 
R3#show ip bgp neighbors 155.1.0.5 advertised-routes
BGP table version is 22, local router ID is 10.3.0.1
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
*> 10.0.0.0/14 0.0.0.0 32768 i
s> 10.3.0.0/16 0.0.0.0 0 32768 i

 

R4#show ip bgp
BGP table version is 12, local router ID is 204.12.1.4
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
*> 10.0.0.0/16 155.1.146.1 0 0 2 i
* i10.0.0.0/14 155.1.45.5 0 100 0 2 i
*> 155.1.146.1 0 0 2 i
*>i10.3.0.0/16 155.1.45.5 0 100 0 2 i
*>i155.1.5.0/24 155.1.45.5 0 100 0 i
*> 204.12.1.0 0.0.0.0 0 32768 i

 
R5#show ip bgp
BGP table version is 12, local router ID is 155.1.5.5
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
*>i10.0.0.0/16 155.1.45.4 0 100 0 2 i
* i10.0.0.0/14 155.1.45.4 0 100 0 2 i
*> 155.1.0.3 0 0 2 i
*> 10.3.0.0/16 155.1.0.3 0 0 2 i
*> 155.1.5.0/24 0.0.0.0 0 32768 i
*>i204.12.1.0 155.1.45.4 0 100 0 i

 

本文转自zcm8483 51CTO博客,原文链接:
http://blog.51cto.com/haolun/992253
相关文章
|
网络协议 测试技术 网络虚拟化
|
4月前
|
安全 Java 数据库连接
让我们讲解一下 Map 集合遍历的方式
我是小假 期待与你的下一次相遇 ~
159 43
使用 entrySet 遍历 Map 类集合 KV
使用 entrySet 遍历 Map 类集合 KV
Dart之集合详解(List、Set、Map)
Dart之集合详解(List、Set、Map)
154 1
|
存储 前端开发 API
ES6的Set和Map你都知道吗?一文了解集合和字典在前端中的应用
该文章详细介绍了ES6中Set和Map数据结构的特性和使用方法,并探讨了它们在前端开发中的具体应用,包括如何利用这些数据结构来解决常见的编程问题。
ES6的Set和Map你都知道吗?一文了解集合和字典在前端中的应用
|
Go 定位技术 索引
Go 语言Map(集合) | 19
Go 语言Map(集合) | 19
|
存储 安全 Java
java集合框架复习----(4)Map、List、set
这篇文章是Java集合框架的复习总结,重点介绍了Map集合的特点和HashMap的使用,以及Collections工具类的使用示例,同时回顾了List、Set和Map集合的概念和特点,以及Collection工具类的作用。
java集合框架复习----(4)Map、List、set
【Java集合类面试二十二】、Map和Set有什么区别?
该CSDN博客文章讨论了Map和Set的区别,但提供的内容摘要并未直接解释这两种集合类型的差异。通常,Map是一种键值对集合,提供通过键快速检索值的能力,而Set是一个不允许重复元素的集合。

热门文章

最新文章