Summarizing Outbound Routing Information

Problem

You want to summarize your routing table before forwarding it to another router.

Solution

BGP includes an automatic summarization feature that is on by default:

Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#router bgp 65500
Router1(config-router)#neighbor 192.168.1.5 remote-as 65520
Router1(config-router)#auto-summary
Router1(config-router)#exit
Router1(config)#end
Router1#

Discussion

By default, BGP will try to summarize routes. This is not always desirable, though, which is why we have explicitly disabled this feature in many of the examples in this chapter. In fact, many engineers prefer to manually summarize their routing tables because they want to control what gets summarized and what doesn’t.

The first problem with auto-summarization is that it is strictly classful. Your AS may not control all of the subnets in a classful network, and even if you do, this may not be the most useful prefix on which to summarize your networks. The second problem is that autosummarization only works on routes that are redistributed into BGP, and not on routes from BGP or routes injected via the network command. Please refer to Recipe 9.14 for more information on redistributing routes into BGP.

Suppose you wanted to summarize several routes to a single nonclassful route, or to summarize routes from several downstream BGP networks. You might be tempted to handle this by redistributing a static route ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.