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.
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 BGP Route Aggregation 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.
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.6 mask 255.255.255.255
Router R3 aggregates these addresses with and advertises them to R4.
R3#sh runn | sec run bgp
aggregate-address 172.168.0.0 255.255.255.248
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.[/su_note]
R4#sh ip bgp
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:
Only summarized route is received and AS path information is preserved.
R4#sh ip bgp
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 :
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.
*> 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 :
Output on R4 :
We see the origin of aggregate route has changed from “i” to “?”
R4#sh ip bgp
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:
Non-Exist-Map & BGP Advertise-Map
ABOUT THE AUTHOR
I am here to share my knowledge and experience in the field of networking with the goal being – “The more you share, the more you learn.”
I am a biotechnologist by qualification and a Network Enthusiast by interest. I developed interest in networking being in the company of a passionate Network Professional, my husband.
I am a strong believer of the fact that “learning is a constant process of discovering yourself.”
– Rashmi Bhardwaj (Author/Editor)