What is route summarization and why to use it?
In large internetworks, hundreds, or even thousands, of network addresses can exist. It is often problematic for routers to maintain this volume of routes in their routing tables. Route summarization (also called route aggregation or supernetting) can reduce the number of routes that a router must maintain, because it is a method of representing a series of network numbers in a single summary address. Another advantage of using route summarization in a large, complex network is that it can isolate topology changes from other routers.
In the example below we will configure three routers that will participate in dynamic routing. However, behind each router eight unique networks will exist. These networks will only be used for the demonstration but are designed in such a way that makes summarization very easy. For example we are using 172.16.0.0-172.16.7.0 that can easily be summarized as 172.16.0.0 255.255.248.0 or /21. The same practice is deployed throughout the Internet to allocate address spaces to providers and providers further supernet segments of networks to geographical areas.
Steps to configure route summarization
R1(config)#interface FastEthernet0/0.1 R1(config-subif)#encapsulation dot1Q 1 R1(config-subif)#ip address 172.16.0.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.2 R1(config-subif)#encapsulation dot1Q 2 R1(config-subif)#ip address 172.16.1.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.3 R1(config-subif)#encapsulation dot1Q 3 R1(config-subif)#ip address 172.16.2.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.4 R1(config-subif)#encapsulation dot1Q 4 R1(config-subif)#ip address 172.16.3.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.5 R1(config-subif)#encapsulation dot1Q 5 R1(config-subif)#ip address 172.16.4.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.6 R1(config-subif)#encapsulation dot1Q 6 R1(config-subif)#ip address 172.16.5.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.7 R1(config-subif)#encapsulation dot1Q 7 R1(config-subif)#ip address 172.16.6.1 255.255.255.0 ! R1(config)#interface FastEthernet0/0.8 R1(config-subif)#encapsulation dot1Q 8 native R1(config-subif)#ip address 172.16.7.1 255.255.255.0 ! R1(config)#interface FastEthernet1/0 R1(config-if)#ip address 10.1.1.1 255.255.255.252 ! R1(config)#interface FastEthernet1/1 R1(config-if)#ip address 10.1.1.5 255.255.255.252
Step 2: Configure a BGP routing process, advertise all applicable networks and define neighbors.
R1(config)#router bgp 65011 R1(config-router)#network 10.1.1.0 mask 255.255.255.252 R1(config-router)#network 10.1.4.0 mask 255.255.255.252 R1(config-router)#network 172.16.0.0 mask 255.255.255.0 R1(config-router)#network 172.16.1.0 mask 255.255.255.0 R1(config-router)#network 172.16.2.0 mask 255.255.255.0 R1(config-router)#network 172.16.3.0 mask 255.255.255.0 R1(config-router)#network 172.16.4.0 mask 255.255.255.0 R1(config-router)#network 172.16.5.0 mask 255.255.255.0 R1(config-router)#network 172.16.6.0 mask 255.255.255.0 R1(config-router)#network 172.16.7.0 mask 255.255.255.0 R1(config-router)#neighbor 10.1.1.2 remote-as 65012 R1(config-router)#neighbor 10.1.1.6 remote-as 65013
Step 3: Repeat steps 1 and 2 on R2 and R3 where R2 will make use of networks 172.16.8.0-172.16.15.0 and R3 will make use of 172.16.16.0-172.16.23.0.
Step 4: Manually summarize 172.16.0.0-172.16.7.0, 172.16.8.0-172.16.15.0, and 172.16.16.0-172.16.23.0 each as a /21 or 255.255.255.248.
R1(config)#router bgp 65011 R1(config-router)#aggregate-address 172.16.0.0 255.255.248.0 summary-only
R2(config)#router bgp 65012 R2(config-router)#aggregate-address 172.16.8.0 255.255.248.0 summary-only
R3(config)#router bgp 65013 R3(config-router)#aggregate-address 172.16.16.0 255.255.248.0 summary-only
Verify the configuration
Now that the configuration is finished lets verify our neighbors and routes. Using the show ip bgp neighbors and show ip route commands you can verify the remote routes to which your router has formed and adjacency and verify the expected routes are being advertised. Use the ping command to verify connectivity. Per the below routing table on R1 we can view the networks behind R2 and R3 have been summarized each as a /21. If you check the routing table on R2 or R3 you will see the same for the networks behind R1.