【实验说明】

 
在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 这两个地址来验证。

 
【实验拓扑】

 

BGP Aggregation – Unsuppress Map_第1张图片 

【实验分析】
在配置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