Previous Section  < Day Day Up >  Next Section

Summarization

BGP can summarize routes that are advertised to peers using the aggregate-address command. As an example, assume that you have multiple subnets of the 172.30.0.0/16 network, and you want to advertise this summary if any of these subnets exist. The following configuration advertises the 172.30.0.0/16 prefix and all the subnets for which network statements and matching routes are in the routing table:


router bgp 1

 neighbor 10.1.1.1 remote-as 2

 network 172.30.1.0 mask 255.255.255.0

 network 172.30.8.0 mask 255.255.255.0

 network 172.30.14.0 mask 255.255.255.0

 network 172.30.25.0 mask 255.255.255.0

 network 172.30.42.0 mask 255.255.255.0

 aggregate-address 172.30.0.0 255.255.0.0


To advertise the summary address only, use the summary-only keyword on the aggregate-address command:


aggregate-address 172.30.0.0 255.255.0.0 summary-only


When a BGP speaker originates a summary, it usually places only its AS number in the AS-path. This can lead to loops if the prefixes that are being summarized are from several eBGP peers, rather than originating within the AS of the router.

To prevent these loops from occurring, use the as-set keyword in the aggregate-address command:


aggregate-address 172.30.0.0 255.255.0.0 as-set


This command tells the router to place all the autonomous systems in the AS-paths from each component in an AS-set and advertise them with the route.

    Previous Section  < Day Day Up >  Next Section