The BGP routing table of each device is large on large networks. This burdens devices, increases the route flapping probability, and affects network stability.
Route summarization is a mechanism that combines multiple routes into one route. This mechanism allows a BGP device to advertise only the summarized route but not all the specific routes to peers, thereby reducing the size of the BGP routing table. If the summarized route flaps, the network is not affected, improving network stability.
BGP supports automatic summarization and manual summarization on IPv4 networks, and supports only manual summarization on IPv6 networks. Automatic and manual summarization work as follows:
Automatic summarization
Summarizes the routes imported by BGP. After automatic summarization is configured, BGP summarizes routes based on the natural network segment and advertises only the summarized route to peers. For example, BGP summarizes 10.1.1.1/24 and 10.2.1.1/24 (two Class A addresses with non-natural mask) into 10.0.0.0/8 (Class A address with natural mask).
Manual summarization
Summarizes routes in the local BGP routing table. Manual summarization can help control the attributes of the summarized route and determine whether to advertise specific routes.
To prevent routing loops caused by route summarization, BGP uses the AS_Set attribute. The AS_Set attribute is an unordered set of all ASs that a route passes through. When the summarized route enters an AS in the AS_Set attribute again, BGP finds that the local AS number has been recorded in the AS_Set attribute of the route and discards this route to prevent a routing loop.