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 up in BGP using the Aggregate address command.
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 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.
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 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 below example to understand the above theory:
Router R1 advertises below specific prefixes to R3.