Route aggregation or route summarization is an essential part of any design. In most cases, this is typically performed by the ISP; however, route summarization may also be used at the enterprise edge to advertise a summary to the upstream provider router. In Cisco IOS software, there are two ways BGP can be configured to perform route summarization:
- Using the network [network] mask [mask] command
- Using the aggregate-address [network][mask] command
The network command is simply used to advertise a summary route for more specific route entries that fall within the specified network range. However, for the summary prefix to be advertised, the specific routes must be learned via an IGP or by configuring a static route pointing to the Null0 interface. The following output shows a BGP speaker receiving internal BGP routes in the 12.0.0.0/8 range:
| R3#show ip bgp regexp ^$ BGP table version is 18, local router ID is 3.3.3.3 Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path *>i12.0.0.0/24 10.0.0.1 0 100 0 i *>i12.0.1.0/24 10.0.0.1 0 100 0 i *>i12.0.2.0/24 10.0.0.1 0 100 0 i *>i12.0.3.0/24 10.0.0.1 0 100 0 i |
To advertise a summary route representing these specific prefixes, the following configuration is implemented on the local router:
| R1(config)#ip route 12.0.0.0 255.0.0.0 null0 R1(config)#router bgp 123 R1(config-router)#network 12.0.0.0 mask 255.255.252.0 R1(config-router)#exit R1(config)#exit R3#clear ip bg * soft out |
Although this configuration advertises the 12.0.0.0/8 prefix, it also allows the specific prefixes to also be advertised. Given that the primary goal of summarization is to reduce the size of the routing tables by reducing the number of advertised prefixes, this configuration is less than desirable. The recommend solution is to use theaggregate-address router configuration command when configuring BGP route aggregation.
The aggregate-address command can be used by itself or in conjunction with one or more additional keywords. While the majority of these keywords are beyond the scope of the ROUTE exam, one of them, the summary-only keyword, is and will be described in this chapter. By default, when the aggregate-address command is used to configure, Table 7-6 shows the default values for applicable attributes that are assigned to the aggregate address:
| Attribute | Value |
|---|---|
|
NEXT_HOP |
0.0.0.0 (Local Router) |
|
AS_PATH |
N/A (Null String) |
|
MULTI_EXIT_DISC |
N/A (Not Set) |
|
LOCAL_PREF |
100 (Default) |
|
WEIGHT |
32,768 (Default) |
|
AGGREGATOR |
Local Router AS and RID |
|
ATOMIC_AGGREGATE |
Tagged With This Value |
|
ORGIN |
IGP |
Tab.7-5. Regular Expression Pieces
These default settings can be seen in the following output for a summary route generated using the aggregate-address router configuration command:
| R1#show ip bgp 12.0.0.0/22 BGP routing table entry for 12.0.0.0/22, version 219 Paths: (1 available, best #1, table Default-IP-Routing-Table) Flag: 0x820 Advertised to update-groups: 1 2 Local, (aggregated by 123 1.1.1.1) 0.0.0.0 from 0.0.0.0 (1.1.1.1) Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic-aggregate, best |
Like the network command, the aggregate-address command used without any options will advertise both the aggregate and the more specific route entries. For example, using the same networks used in the previous example, an aggregate is configured as follows:
| R1(config)#router bgp 123 R1(config-router)#aggregate-address 12.0.0.0 255.255.252.0 R1(config-router)#exit R1(config)#exit |
Following this configuration, the aggregate is entered into the BGP RIB on the local router. The output of theshow ip bgp command (filtered) shows the following:
| R1#show ip bgp regexp ^$ BGP table version is 222, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path *> 12.0.0.0/24 0.0.0.0 0 32768 i *> 12.0.0.0/22 0.0.0.0 32768 i *> 12.0.1.0/24 0.0.0.0 0 32768 i *> 12.0.2.0/24 0.0.0.0 0 32768 i *> 12.0.3.0/24 0.0.0.0 0 32768 i |
The same command, if issued on either an internal or external peer, shows that the aggregate, as well as the more specific entries, are still being received from the router on which aggregation was performed. This is illustrated in the following output on an iBGP peer:
| R3#show ip bgp regexp ^$ BGP table version is 24, local router ID is 3.3.3.3 Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path *>i12.0.0.0/24 10.0.0.1 0 100 0 i *>i12.0.0.0/22 10.0.0.1 0 100 0 i *>i12.0.1.0/24 10.0.0.1 0 100 0 i *>i12.0.2.0/24 10.0.0.1 0 100 0 i *>i12.0.3.0/24 10.0.0.1 0 100 0 i |
The summary-only keyword configures the local BGP speaker to advertise only the summary address and suppress more specific entries included in the specified range. This configuration is implemented on router R1 as follows:
| R1(config)#router bgp 123 R1(config-router)#aggregate-address 12.0.0.0 255.255.252.0 summary-only R1(config-router)#exit R1(config)#exit R1#clear ip bgp * soft out |
Following this configuration change, the BGP RIB on R1 now shows the following:
| R1#show ip bgp regexp ^$ BGP table version is 226, local router ID is 1.1.1.1 Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path s> 12.0.0.0/24 0.0.0.0 0 32768 i *> 12.0.0.0/22 0.0.0.0 32768 i s> 12.0.1.0/24 0.0.0.0 0 32768 i s> 12.0.2.0/24 0.0.0.0 0 32768 i s> 12.0.3.0/24 0.0.0.0 0 32768 i |
If you compare the output prior to the use of the summary-only keyword with the one above, you will notice that all the specific prefixes now have an ‘s‘ preceding them. This indicates the entries are suppressed and are not advertised to any peer as shown in the following output:
| R1#show ip bgp 12.0.0.0/24 BGP routing table entry for 12.0.0.0/24, version 223 Paths: (1 available, best #1, table Default-IP-Routing-Table, Advertisements suppressed by an aggregate.) Not advertised to any peer Local 0.0.0.0 from 0.0.0.0 (1.1.1.1) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best |
This behavior can be validated by looking at the RIB of any peer of R1 as shown below:
| R3#show ip bgp regexp ^$ BGP table version is 28, local router ID is 3.3.3.3 Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale Origin codes: i – IGP, e – EGP, ? – incompleteNetwork Next Hop Metric LocPrf Weight Path *>i12.0.0.0/22 10.0.0.1 0 100 0 i |