With the advent of Variable Length Subnet Masks (VLMS) and classless networking keeping track of where exactly IP address space physically resides on the network has become a bit more complicated simply because we have the options and the flexibility to break networks into smaller subnets. Chances are you are probably at least somewhat familiar with subnetting but may not be as familiar with route summarization. Summarization is basically reversing the same actions of subnetting. This can also be called supernetting by the way. Really, in today’s world you can basically manipulate the subnet mask in any way you like as long as the VLSM rules are followed. If you need some assistance with subnetting I do have a nice subnet calculator HERE.
To talk about summarizing lets actually subnet something first. Let’s look at the topology below. You have the 192.168.1.0/24 and 192.168.2.0/24 network cut half into a total of four /25 networks. The Loopback interface are each assigned with the first IP address of the subnet to keep it easy. You can see the topology in the diagram below.
Let’s also assume a routing protocol is running, say EIGRP for instance. Let’s say R2 is passing all of its routes down to R1. Lets also assumes “ip classless” is enabled as well as “no auto-summary” in the EIGRP configuration. R1’s routing table would look something like this:
192.168.0.0/25 is subnetted, 2 subnets D 192.168.0.0 [90/156160] via 192.168.3.2, 00:00:19, FastEthernet0/0 D 192.168.0.128 [90/156160] via 192.168.3.2, 00:00:19, FastEthernet0/0 192.168.1.0/25 is subnetted, 2 subnets D 192.168.1.0 [90/156160] via 192.168.3.2, 00:00:19, FastEthernet0/0 D 192.168.1.128 [90/156160] via 192.168.3.2, 00:00:19, FastEthernet0/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0
Not bad really, but what if we had thousands of small subnets on our network? There would be many more routes for sure. Taking a step back you will notice that the entire class C networks of 192.168.1.0 and 192.168.2.0 are accounted for here a peice at a time.
Cisco’s EIGRP can summarize on its own and this behavior is actually enabled by default. Let’s re enable it by using the following command under the routing protocol configuration mode:
R2(config)#router eigrp 100 R2(config-router)#auto-summary
This command will take the four subnets above and roll them back into their pre subnetted class C networks before advertising them to the neighboring R1. Jump to R1 and look at the routing table again:
D 192.168.0.0/24 [90/156160] via 192.168.3.2, 00:00:01, FastEthernet0/0 D 192.168.1.0/24 [90/156160] via 192.168.3.2, 00:00:01, FastEthernet0/0 C 192.168.3.0/24 is directly connected, FastEthernet0/0
As you can see we now have half as many routes pointing to the same amount of address space. Like I said, this is the default summarization configuration. This is more efficient but let’s summarize even further. To do this remove the auto-summary configuration and add a summary to the interface that faces the rest of the network.
R2(config-router)#no auto-summary R2(config-router)#interface fastethernet 0/0 R2(config-if)#ip summary-address eigrp 100 192.168.0.0 255.255.254.0
Jumping back to R1 we can now see the routing table is updated to show the summary we created manually.
C 192.168.3.0/24 is directly connected, FastEthernet0/0 D 192.168.0.0/23 [90/156160] via 192.168.3.2, 00:00:07, FastEthernet0/0
So, you might be asking, how does this work? In the case of auto summarization you can think of it as “un subnetting”. 192.168.0.0/25 and 192.168.0.128/25 are each part of the 192.168.0.0/24 network and we simply advertise that classfull network they are derived from in the case of auto summarization.
Expanding the summary a bit further to be 192.168.0.0/23 is where it gets a little more complicated. Lets look at the third octet specifically as this is where the manipulation takes place.
A CIDR /23 subnet mask means all but the last bit in the third byte is looked at in the summary. As long as all combinations of bits are used we have a valid summary. Since there is only one bit we are summarizing there are only two combinations.
“0” from the third byte in binary leaves this byte of data as all “0’s” 0000 0000
“1” from the third byte in binary leaves this byte of data as a binary “1” 0000 0001
Again, we know this is a valid summary because a decimal “2” in this byte of the network address would put us into the second bit’s field. 0000 0010.
A final note about summaries; The default route 0.0.0.0 0.0.0.0 is the largest summary of them all. It essentially says any address with any value will meet its routing table entry. This is the destination for all traffic that has no other route to follow.