8.7 The Routing Process
8.7.5
CIDR and aggregation addresses
BGP4 does support classless interdomain routing (CIDR). CIDR makes it easy to aggregate routes. Aggregation is the process of combining several different routes in such a way that a single route can be advertised, which minimizes the size of routing tables.
Lab Activity
  In this lab, you will learn how to configure CIDR with BGP.

In Figure , Router B in AS 200 is originating network 160.11.0.0 and advertising it to Router C in AS 300. To configure Router C to propagate the aggregate address 160.0.0.0 to Router A, use the following commands:

!Router C
router bgp 300
neighbor 3.3.3.3 remote-as 200
neighbor 2.2.2.2 remote-as 100
network 160.10.0.0
aggregate-address 160.0.0.0 255.0.0.0

The aggregate-address router configuration command advertises the prefix route (in this case, 160.0.0.0/8) and all of the more specific routes.

It is important to note that a router cannot aggregate an address if it does not have a more specific route of that address in the BGP routing table. The more specific route can be injected in the BGP routing table by incoming updates from other ASs, can be redistributed from an IGP, or can be established by the network router configuration command.

If you want Router C to propagate the prefix route only, and you do not want it to propagate a more specific route, use the following command:

aggregate-address 160.0.0.0 255.0.0.0 summary-only

This command propagates the prefix (160.0.0.0/8) and suppresses any more specific routes that the router may have in its BGP routing table.

It is important to recognized that if you use the network command to advertise a network, the entry for that network is always injected into BGP updates, even if you specify the summary-only keyword with the aggregate-address router configuration command.

If you want to suppress specific routes when aggregating routes, you can define a route map and apply it to the aggregate. If, for example, you want Router C in Figure 12-25 to aggregate 160.0.0.0 and suppress the specific route 160.20.0.0, but propagate route 160.10.0.0, use the following commands:

!Router C
router bgp 300
neighbor 3.3.3.3 remote-as 200
neighbor 2.2.2.2 remote-as 100
network 160.10.0.0 aggregate-address 160.0.0.0 255.0.0.0 suppress-map CHECK
!
route-map CHECK permit 10
match ip address 1
!
access-list 1 deny 160.20.0.0 0.0.255.255
access-list 1 permit 0.0.0.0 255.255.255.255

Aggregation and Static Routes
The network shown in Figure demonstrates how static routes can be used to generate aggregates.

In Figure , you want Router B to advertise the prefix 160.0.0.0 and suppress all of the more specific routes. The following configuration for Router B redistributes a static aggregate route into BGP:

!Router B
router bgp 200
neighbor 3.3.3.1 remote-as 300
redistribute static
!
ip route 160.0.0.0 255.0.0.0 null 0

As a result of this configuration, Router B advertises the aggregate with an origin attribute whose value is Incomplete.

Using the network router command instead of the redistribute command, as in the following configuration, has the same effect as the preceding configuration except that the origin attribute of updates for network 160.0.0.0 will be set to IGP instead of Incomplete.

!Router B
router bgp 200
network 160.0.0.0 mask 255.0.0.0
neighbor 3.3.3.1 remote-as 300
!
ip route 160.0.0.0 255.0.0.0 null 0

The use of static routes (as shown in these examples) is the preferred method of injecting an aggregate route because using static routes avoids unnecessary route flaps.