BGP Route Aggregation
What is BGP Route Aggregation
Route Aggregation (RA) also known as BGP Route Summarization is a method to minimize the size of the routing table, announcing the whole address block received from the Regional Internet Registry (RIR) to other ASes. RA is opposite to non-aggregation routing, where individual sub-prefixes of the address block are announced to BGP peers. RA reduces the size of the global routing table, decreases routers’ workload and saves network bandwidth.
Benefits of BGP Route Aggregation
BGP route aggregation, also known as route summarization, is a technique used in Border Gateway Protocol (BGP) to consolidate multiple specific routes into a single summary route. This practice offers several significant benefits:
Usage Guidelines
Usage Scenario
BGP route summarization is classified into manual summarization and automatic summarization. The aggregate command can be used to configure manual summarization. This command can summarize routes in the local BGP routing table. Manually-summarized routes take precedence over automatically-summarized routes. The outbound interface of the summarized route on the local switch is NULL0. When receiving the summarized route, other switches automatically add the outbound interface.
If the specific member routes of a summarized route have different Origin attributes, the Origin attribute of the summarized route uses the value in the order of igp, egp, and incomplete. The summarized route will carry the community attribute of every specific route.
The aggregate command adds a summarized route to the BGP routing table.
BGP - aggregate-address command in action
The aggregate-address command that is available under the BGP router configuration of a Cisco router is a command that allows you to summarize already existing routes into a single entry. For example, refer to the following topology:
In the above topology, the 172.16.2.2/32 and 172.16.3.3/32 are advertised by R2 and R3 to R1, which in turn advertises both routes to R4. Initially, R4's BGP table looks like this:
Network Next Hop Metric LocPrf Weight Path
*> 172.16.2.2/32 192.168.14.1 0 1 2 i
*> 172.16.3.3/32 192.168.14.1 0 1 3 i
In the following sections, we'll see how the aggregate-address command behaves when applied alone, when applied with the summary-only keyword, and when applied with the as-set keyword.
Used alone
We issue the following command on the BGP router configuration section of R1:
R1(config-router)#aggregate-address 172.16.0.0 255.255.0.0
The resulting BGP table in R4 is:
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 192.168.14.1 0 0 1 i
*> 172.16.2.2/32 192.168.14.1 0 1 2 i
*> 172.16.3.3/32 192.168.14.1 0 1 3 i
Notice that the aggregate address we configured is added, but the original routes are still included in the BGP table. Also notice that the AS path of the aggregate route is removed.
Used with the summary-only keyword
This time, we issue the following command on the BGP router configuration section
R1(config-router)#aggregate-address 172.16.0.0 255.255.0.0 summary-only
The resulting BGP table in R4 is:
Recommended by LinkedIn
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 192.168.14.1 0 0 1 i
Notice that the individual routes to each destination are removed. The summary-only keyword causes R1 to advertise only the summary route and not the individual ones found within it. Also, the AS path of the aggregate route is still removed.
Used with the AS-setkeyword
Next we issue the following command on the BGP router configuration section of R1:
R1(config-router)#aggregate-address 172.16.0.0 255.255.0.0 as-set
The resulting BGP table in R4 is:
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 192.168.14.1 0 0 1 {2,3} i
*> 172.16.2.2/32 192.168.14.1 0 1 2 i
*> 172.16.3.3/32 192.168.14.1 0 1 3 i
Notice here that the as-set keyword causes the AS Path to remain within the aggregate route, and the two alternative ASNs for each component route are included in curly brackets or braces "{ }".
Used with both the summary-only and the As-set keywords
Finally, we issue the following command on the BGP router configuration section of R1:
R1(config-router)#aggregate-address 172.16.0.0 255.255.0.0 as-set summary-only
The resulting BGP table in R4 is:
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0 192.168.14.1 0 0 1 {2,3} i
As expected, the individual component routes are eliminated and only the aggregate route with the alternative ASNs in the AS path remains.
Practical Considerations when using BGP Aggregate Address
Using the BGP aggregate address command involves several practical considerations to ensure optimal network performance and stability:
Conclusion
Route Aggregation is a universal method used to supersede a set of routes by a single general route, widely used for intra-domain and inter-domain routing purpose. In this guide we have explained the purpose and the benefits of BGP Route Aggregation using a real-world scenario and provided configuration steps explaining various configuration options. Carefully planned and deployed, BGP Route Aggregation reduces the number of BGP entries that have to be stored and exchanged with other BGP peers. It curbs the growth of global routing table size and conserves network bandwidth, helping to increase Internet routing stability by hiding route flaps.
Sources