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.
1: If we use only the aggregate-address command without any keyword then the summarized route and all the more specific routes will be advertised.
2: 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 example below.
As 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.
With the attribute map command, we can change the attribute of the aggregate route i.e. from origin of “?” to “i”.
Let us take the help of the below example to understand the above theory:
BGP Route Aggregation : TOPOLOGY DIAGRAM
Router R1 advertises below specific prefixes to R3.
Related: BGP route map
Router R2 advertises below specific prefixes to R3.
Router R3 aggregates these addresses with and advertises them to R4.
R3#sh runn | sec run bgp
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.[/su_note]
R4#sh ip bgp
Now we configure Summary-only and as-set so we receive only summarized route and AS-path remains preserved.
Config on R3:
Only summarized route is received and AS path information is preserved.
R4#sh ip bgp
Now let us say we want to suppress only few specific routes and allow rest.
We will allow all specifics except 126.96.36.199 & 188.8.131.52 to be advertised along with help of suppress-map.
Output on R4:
We see all specifics along with aggregate address except 184.108.40.206 & 220.127.116.11.
Now lets us use attribute-map as well to change the origin attribute on the aggregate route from “I” to “?”.
Config on R3 :
Output on R4 :
We see the origin of aggregate route has changed from “i” to “?”
R4#sh ip bgp
Related- BGP Interview Questions
Related- Non-Exist-Map & BGP Advertise-Map