Monday, June 9, 2008

BGP aggregation with unsuppress-map option

In a previous post we learned how to aggregate BGP routes and use the suppress-map to suppress certain component routes from being advertised. With the summary-only option on the aggregate-address command you can suppress ALL component subnets. Suppose you had a bunch of component routes but only wanted to advertise a few, it would be a lot of work to make that big of a suppress-map. I don't know the exact reason behind this, but you can instead use the summary-only option of the aggregate-address command and then use an unsuppress-map to advertise the few component subnets you want. Here's how:

R1 [AS 100] connects to R2 [AS 200]

R1 is currently summarizing a bunch of subnets in the range.

R1# show ip route | in C
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
C is directly connected, Loopback0
C is directly connected, Loopback3
C is directly connected, Loopback2
C is directly connected, Loopback5
C is directly connected, Loopback4
C is directly connected, Loopback7
C is directly connected, Loopback6

R1 is configured as such:

router bgp 100
no synchronization
bgp log-neighbor-changes
network mask
network mask
network mask
network mask
network mask
aggregate-address summary-only
neighbor remote-as 200
neighbor remote-as 100

The following route shows up on R2:

R2#show ip bgp | begin Network
Network Next Hop Metric LocPrf Weight Path
* 0 300 100 i
*> 0 100 i

As you can see we are supressing all of the subnets. Suppose we wanted to advertise one of the subnets as well, to do so we can use the unsuppress-map option on the neighbor command.

On R1:

R1(config)#access-list 12 permit
R1(config)#access-list 12 permit
R1(config)#access-list 12 permit
R1(config)#route-map ALLOW
R1(config-route-map)#match ip address 12
R1(config)#router bgp 100
R1(config-router)#neighbor unsuppress-map ALLOW

Clear BGP:

R1#clear ip bgp *
00:41:47: %BGP-5-ADJCHANGE: neighbor Down User reset
00:42:28: %BGP-5-ADJCHANGE: neighbor Up

Now on R2 we have "unsuppressed" 3 routes:

R2#show ip bgp | inc 1\.
* 0 300 100 i
*> 0 0 100 i
*> 0 0 100 i
*> 0 0 100 i


  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. Hi There,
    You must be wondering but I am really going through deeply with all of your hard work. And trying to improve my understanding as I am bit lazy in configuring things... But I have start doing it...

    Well I have answer for
    When to use " unsuppress-map" and when to use "suppress-map"

    As we know this both options are used with different commands...
    1. # neighbor ip-add unsuppress-map 'route-map'
    2. # aggregate-add suppress-map

    2. Option will not only suppress the unwanted routes but also affect the as_path attributes for aggregate route,
    1. Option will un-suppress routes that are suppressed in aggregate-address summary and here ,
    important thing is we have more granularity to apply this to specific neighbor

    while option 2 will affect every neighbor

  4. Great post! thanks for that


Note: Only a member of this blog may post a comment.