BGP Route Aggregation: BGP Suppress MAP And Attribute MAP

Google ADs

BGP Route Aggregation is the process of combining multiple IP prefixes into a single, summarized route to reduce routing table size. Hence, it is also called route summarization. It improves efficiency and scalability in large networks.

In this blog, we discuss BGP Route aggregation with special emphasis on BGP suppress map and attribute map in detail.

Introduction to BGP Route Aggregation

As we all are aware we can advertise a summarized route in BGP using the “aggregate-address” command. But there may be few issues that may come using the Aggregate address command in BGP Route Aggregation.

Google ADs

  • If we use only the aggregate-address command without any keyword then the summarized route and all the more specific routes will be advertised.
  • If we use the summary-only keyword then only the summarized route will be advertised and the more specific routes are denied from the advertisement. The AS path information is however lost as the summarized route in it’s AS path will contain only the AS number of the router on which the summarization takes place.

In order to preserve the AS path information, we can use the as-set keyword along with summary-only keyword which will preserve the AS path information of the more specific routes.

Related- BGP Table MAP

We will see these outputs shortly in our BGP Route Aggregation example below.

BGP Suppress Map

BGP Suppress Map is used to selectively suppress specific prefixes during route aggregation, allowing finer control over which specific routes are advertised.

So, ss stated in point 2 if we use the summary-only keyword we will be able to advertise only the summary route and no specific routes will be advertised. But let’s suppose we want to advertise a few specific routes along with summary route then we will need to take the help of suppress-map command.

BGP Attribute Map

BGP Attribute Map is used during route aggregation to assign specific BGP attributes to the aggregated route for consistent policy enforcement. With the attribute map command, we can change the attribute of the aggregate route i.e. from origin of “?” to “i”.

BGP Suppress Map vs Attribute Map

To summarize the difference between the two:

FeatureBGP Suppress MapBGP Attribute Map
PurposeTo selectively suppress specific prefixes during aggregationTo apply BGP attributes to the aggregate route
Used Withaggregate-address commandaggregate-address command
EffectPrevents specific more-specific routes from being advertisedModifies attributes (e.g., MED, community) of the aggregate
Common AttributesPrefix-based matchSets attributes like community, AS-path, MED, etc.
ConfigurationUses route-map with match conditionsUses route-map with set actions
ResultSummarized route advertised; selected specific routes hiddenAggregated route with customized attributes

Download the comparison table: BGP suppress map vs attribute map

Let us take the help of the below example to understand the above theory:

BGP Route Aggregation: Topology Diagram

bgp suppress map

Router R1 advertises below specific prefixes to R3.

network 172.168.0.1 mask 255.255.255.255network 172.168.0.2 mask 255.255.255.255
network 172.168.0.3 mask 255.255.255.255

Related: BGP route map

Router R2 advertises below specific prefixes to R3.

network 172.168.0.4 mask 255.255.255.255network 172.168.0.5 mask 255.255.255.255
network 172.168.0.6 mask 255.255.255.255

Router R3 aggregates these addresses with and advertises them to R4.

R3#sh runn | sec run bgp

router bgp 300bgp log-neighbor-changes
aggregate-address 172.168.0.0 255.255.255.248

neighbor 9.9.13.1 remote-as 100
neighbor 9.9.23.2 remote-as 200
neighbor 9.9.34.4 remote-as 400

Since we haven’t used summary-only keyword and also as-set we see all specific routes are advertised and also under AS path on aggregate route we see AS 300 only.

Routes on R4 as below:

We see specifics as well as aggregated route.

AS-path contains only 300 hence AS information is lost.

R4#sh ip bgp

BGP table version is 8, local router ID is 9.9.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i – IGP, e – EGP, ? – incomplete

RPKI validation codes: V valid, I invalid, N Not found

Network         Next Hop           Metric LocPrf Weight Path

*> 172.168.0.0/29   9.9.34.3                 0             0 300 i

*> 172.168.0.1/32   9.9.34.3                               0 300 100 i

*> 172.168.0.2/32   9.9.34.3                               0 300 100 i

*> 172.168.0.3/32   9.9.34.3                               0 300 100 i

*> 172.168.0.4/32   9.9.34.3                               0 300 200 i

*> 172.168.0.5/32   9.9.34.3                               0 300 200 i

*> 172.168.0.6/32   9.9.34.3                              0 300 200 I

Now we configure Summary-only and as-set so we receive only summarized route and AS-path remains preserved.

Config on R3

R3(config-router)#$address 172.168.0.0 255.255.255.248 summary-only as-set

Output on R4 now

Only summarized route is received and AS path information is preserved.

R4#sh ip bgp

BGP table version is 15, local router ID is 9.9.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i – IGP, e – EGP, ? – incomplete

RPKI validation codes: V valid, I invalid, N Not found

Network         Next Hop           Metric LocPrf Weight Path

*> 172.168.0.0/29   9.9.34.3           0             0 300 {100,200} I

Now let us say we want to suppress only few specific routes and allow rest.

We will allow all specifics except 172.168.0.4 & 172.168.0.5 to be advertised along with help of suppress-map.

Configuration

ip access-list standard Suppress_routepermit 172.168.0.4
permit 172.168.0.5

!

route-map suppress_route permit 10

match ip address Suppress_route

!

Router bgp 300

aggregate-address 172.168.0.0 255.255.255.248 as-set summary-only suppress-map suppress_route

Output on R4

We see all specifics along with aggregate address except 172.168.0.4 & 172.168.0.5.

Network          Next Hop            Metric LocPrf Weight Path*>  172.168.0.0/29   9.9.34.3                 0             0 300 {100,200} i
*>  172.168.0.1/32   9.9.34.3                               0 300 100 i

*>  172.168.0.2/32   9.9.34.3                               0 300 100 i

*>  172.168.0.3/32   9.9.34.3                               0 300 100 i

*>  172.168.0.6/32   9.9.34.3                               0 300 200 i

Now lets us use attribute-map as well to change the origin attribute on the aggregate route from “I” to “?”.

Config on R3

route-map attribute permit 10set origin incomplete

Output on R4

We see the origin of aggregate route has changed from “i” to “?”

R4#sh ip bgp

BGP table version is 20, local router ID is 9.9.34.4Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i – IGP, e – EGP, ? – incomplete

RPKI validation codes: V valid, I invalid, N Not found

Network          Next Hop            Metric LocPrf Weight Path

*>  172.168.0.0/29   9.9.34.3                 0             0 300 {100,200} ?

*>  172.168.0.1/32   9.9.34.3                               0 300 100 i

*>  172.168.0.2/32   9.9.34.3                               0 300 100 i

*>  172.168.0.3/32   9.9.34.3                               0 300 100 i

*>  172.168.0.6/32   9.9.34.3                               0 300 200 I

Continue Reading

BGP Interview Questions

Non-Exist-Map & BGP Advertise-Map

ABOUT THE AUTHOR


Shopping Cart