Route summarization is summarising a range of subnets as one. Route summarization is commonly used in routing protocols to reduce how many entries are in a routing table and to reduce packet size. Having many routes can slow the routing process down so it is best practise to summarise where possible.
We want to summarise the following routes as one:
We’ll first convert each of these IPs to binary and find the common bits.
I have highlighted the common bits above. If we look at the last octet we’ll notice 0001 are common this equates to 4 bits if we convert these 4 bits to a subnet mask we’ll end up with 240 (128, 192, 224, 240). The summarization route will be 192.168.2.20 /28
We want to summarise the following three IPs:
Lets convert these to binary:
Highlighted are the common bits, the second octet we have four common bits 0001 – if we convert these 4 bits to a subnet mask we’ll end up with 240.
The route summarization is 172.16.0.0 255.240.0.0 or /12
When configuring WAN links between routers it would be a waste to assign a /24 bit subnet mask. Lets think about this, how many IPs do we need between two routers? two. One for the each end of the WAN link.
If we only need two IP addresses, which subnet mask would be the most efficient one to use? Lets have a look at the following subnet masks and how many hosts we can get from each:
128 – 126 hosts
192 – 62 hosts
224 – 30 hosts
240 – 14 hosts
248 – 6 hosts
252 – 2 hosts
We can see 252 will give us 2 hosts. The most efficient mask to use on a WAN link would be 255.255.255.252 or /30.