 # Route Summarization

Hello Shivam

Rene in his post, is using the following example.

172.16.10.0/24
172.16.20.0/24
172.16.30.0/24
172.16.40.0/24
172.16.50.0/24

So how do we summarize this? When the IP addresses are in binary form, we find all the bits, starting from left to right, that are the same in all addresses. As soon as we see a bit that is different, that’s where we stop. So let’s transform all five addresses into binary:

``````172.16.10.0 = 101011000001000000  00101000000000
172.16.20.0 = 101011000001000000  01010000000000
172.16.30.0 = 101011000001000000  01111000000000
172.16.40.0 = 101011000001000000  10100000000000
172.16.50.0 = 101011000001000000  11001000000000
``````

Scanning from left to right, we find all the bits that are the same. I put a space in where the bits become different. So how many bits are the same? 18 bits. Now in order to find the summary address, we take the bits that are the same (18 bits) as they are, and then make all the rest of the bits equal to 0. So we get:

10101100000100000000000000000000

where the bold bits are those that stay the same. Converting back to decimal dot format we get a summary of the following, and don’t forget the 18 bit prefix!

172.16.0.0/18

Now here, Rene is suggesting an easier and faster way of determining the summary. Take a look at the list of networks again:

172.16.10.0/24
172.16.20.0/24
172.16.30.0/24
172.16.40.0/24
172.16.50.0/24

Now take a look at the list of of networks that Rene is listing, with a steadily decreasing prefix:

172.16.0.0 /24 = 1 network
172.16.0.0 /23 = 2 networks
172.16.0.0 /22 = 4 networks
172.16.0.0 /21 = 8 networks
172.16.0.0 /20 = 16 networks
172.16.0.0 /19 = 32 networks
172.16.0.0 /18 = 64 networks

As you make the prefix smaller, the number of /24 networks within that summary increases. For example, 172.16.0.0/23 can contain two /24 networks: 172.16.0.0/24 and 172.16.1.0/24. This is because 172.16.0.0/23 defines a range from 172.16.0.0 to 172.16.1.255, which contains those two networks.

Similarly, 172.16.0.0/21 refers to the range of IP addresses between 172.16.0.0 and 172.16.7.255, which contains eight /24 networks (172.16.0.0./24, 172.16.1.0./24, 172.16.2.0./24, 172.16.3.0./24 … 172.16.7.0./24).

So Rene keeps decreasing the size of the prefix, to increase the number of /24 networks that can fit. These are doubled each time. He keeps going until all of the networks in the list (172.16.10.0/24, 172.16.20.0/24, 172.16.30.0/24,172.16.40.0/24,172.16.50.0/24) are included.

For example, if he used 172.16.0.0/19, it would give us 32 /24 networks. Does that include all of the networks in our list? No, it doesn’t include 172.16.50.0/24. So he had to go one higher, which does include it.

I hope this has been helpful!

Laz

1 Like

Hi Laz,
is that below statement is right you mentioned in ur reply and now it create confusion . I think
in place of 172 .16.0.1/24 dere is 172.16.1.0 /24 .Please confirm

172.16.0.0/23 can contain two /24 networks: 172.16.0.0/24 and 172.16.0.1/24.

Hello Shivam

Yes you are right, that is a typo. I have fixed it in my post.

Thanks!

Laz

1 Like

Hi Laz ,

Thanks for ur kind confirmation , i have a last question as in above topic , Rene consider subnet mask of classfull NW only .

Is dere any relation of summarzition to classless network Suppose we have lot of network which are classless in nature and we need to summarize can it possible , if so then please let me know and if not then what is the reason behind this

Please tell me for which network summarization is possible and how can we find it that the r router need summarization .

Rgds
Shivam Chahal

It’s ok sir , no need to change , i already understand the topic . Hello Shivam

Yes, you can summarize using classless masks. That’s part of what CIDR is (Classless Inter Domain Routing). For example, you can summarize the following networks

10.1.16.0/23
10.1.18.0/23
10.1.20.0/23

using the following summarization: 10.1.16.0/21

None of the subnet masks are classsful in this scenario.

If you can create a single summarized route to include all of your routes, then you can go ahead and do it. However, you must ensure that within the summary, there are no additional networks that may require a different routing path.

In my example above, 10.1.16.0/21 also includes 10.1.22.0/23, which was not one of the three networks being summarized. If that network actually exists somewhere else, and is routable via a different path, then you can’t use this summarization. What you can do is summarize the first two networks using 10.1.16.0/22 and keep 10.1.20.0/23 as it is.

I hope this has been helpful!

Laz

1 Like

Hi Laz Sir ,

Please help me here as in few example we can easily decided the block size by seeing the network but as in given example how you decide the block size 8 , may be it is 32 : 0-31 by seeing the second octet because last network goes to 23 .(2 Octet )How can we decide that we have to check the count of network or simple check the network lie in which block i.e 2,4,8,16,32,64,128

172.16.0.0 / 16 subnet mask 255.255.0.0
172.17.0.0 / 16 subnet mask 255.255.0.0
172.18.0.0 / 16 subnet mask 255.255.0.0
172.19.0.0 / 16 subnet mask 255.255.0.0
172.20.0.0 / 16 subnet mask 255.255.0.0
172.21.0.0 / 16 subnet mask 255.255.0.0
172.22.0.0 / 16 subnet mask 255.255.0.0
172.23.0.0 / 16 subnet mask 255.255.0.0

When i am attempting this question or read ur post i am unable to do as i stuck in deciding the block size 8,32

Why it is start from 172.16.0.0 /13 to 172 .16 .23.255 /13

I know that changes occur in 2 octet they why it not start from 172 .0.0.0 -172.31.255.255 (range of ip including network id and broadcast id ) .In both cases subnet mask change , then how can we decide if someone ask the interview then tell the summarize ip as here we hv known example but interviewer ask anything Its really tough question i have ever seen in this topic .

Hope u understand my concern as the network lies in summarized ip have to cover 655 ,536 /16 Subnet but not decide the network.

As i worked on above network if we consider block size of /8 then it will go to 0-7 block , it will cover in block size of /32 0-31 , Sir please it really quite confusion as i invested lot of time in this may be something is lack .

Hi Laz ,

Is dere any picture reflect of Flsm and vlsm in route summarisation
Because as I go through with topic we have considered classful and classless network and after summarisation we get a particular network of specific subnet mask where all network come under in one roof .
So my question after summarisation what it show Flsm or vlsm or any condition in this .Please let me know .
I think its Flsm kindly correct if I am wrong.

Edited
Please let us know can we summarised those networks whose subnet mask is differ to each other not same .
If yes then please point out with example and if not den what the exact reason behind it .

Rgds
Shivam Chahal

Hello Shivam

For your example above, you can see that the second octet ranges from 16 to 23. This is 8 networks of size /16. To find the summary that will include all of these 8 networks, ask these questions:

• how many /16 networks fit into a summary using /16? Answer: 1
• how many /16 networks fit into a summary using /15? Answer: 2
• how many /16 networks fit into a summary using /14? Answer: 4
• how many /16 networks fit into a summary using /13? Answer: 8

So you have to know first the size of your networks (/16) and how many you want to fit (8). You can do this exercise and find the number.

The network 172.16.0.0/13 has a range of IP addresses of: 172.16.0.0 to 172.23.255.255. This is because, with a prefix of /13, which is a subnet mask of 255.248.0.0:

• the network address is 172.16.0.0
• the first host address is 172.16.0.1
• the last host address is 172.23.255.254

You could start from 172.0.0.0 and use a prefix of /11 which would give a range of 172.0.0.0 to 172.31.255.255. That would give us a correct summarization, but it includes many more address ranges than just the ones we want. The goal is always to create the smallest possible summarization range for the addresses in question.

A block size of 8 will give you 0 to 7, but it can also give you 8 to 15, or 16 to 23, or 24 to 31 and so on. The block size does not have to start at 0.

I hope this has been helpful!

Laz

Hello Shivam

All of the examples in the above posts use FLSM. This simply means that all of the subnets included in the summaries have the same prefix or subnet mask. This is a lot easier than VLSM, because it makes the calculations much simpler. However, you can use summaries for VLSM subnets. For example:

Imagine you have an enterprise network where you have the following subnets behind a router:

• 192.168.1.0/26 for the marketing department (range 192.168.1.0 to 192.168.1.63)
• 192.168.1.63/26 for the sales department (range 192.168.1.64 to 192.168.1.127)
• 192.168.1.128/27 for the research and development department (range 192.168.1.128 to 192.168.1.159)
• 192.168.1.160/27 for the retail department (range 192.168.1.160 to 192.168.1.191)
• 192.168.1.192/28 for the IT department (range 192.168.1.192 to 192.168.1.207)

If you use a summarization of these subnets, you can try:

• 192.168.1.0/26 which gives a range of 192.168.1.0 to 192.168.1.63, but that doesn’t include everything
• 192.168.1.0/25 which gives a range of 192.168.1.0 to 192.168.1.127, but that doesn’t include everything
• 192.168.1.0/24 which gives a range of 192.168.1.0 to 192.168.1.255, which does include all of the VLSM subnets!

So you see, you can use either FLSM or VLSM networks, and summarize them.

I hope this has been helpful!

Laz

1 Like

Hi Laz ,

A big salute to you commendable job

1 Like

Hie laz ,

Very well explaination , hats of to you boss 1 Like

If I am not wrong : This can be think with other method as well 126.89.120.0
/22 is given means 255.255.252.0
256-252=4
So 4 networks
126.89.120.0 ; 126.89.121.0,126.89.122.0,126.89.123.0

Thanks

Hello Mohit

Yes that is correct. In this context, as in the lesson as well, a “network” is defined as a /24 subnet. Just keep in mind that this terminology is not always valid, as a “network” can have many different prefixes/subnet masks.

Laz

1 Like

Hello Rene,

I have one doubt…if we have networks as below,
192.168.50.0/24
192.168.51.0/24
192.168.52.0/24
192.168.53.0/24
Then if we summarize these then as per binary merhod third octate is,

0011 0010
0011 0011
0011 0100
0011 0101

So we get 21 bits same so summary address is /21.(255.255.248.0)

But if we use decimal method that 256 - 4 it is 22.(255.255.252.0)

Could you please clarify on this.

Thank you.

Hello Swapnil

The decimal method works only if all possible combinations of the host portion bits are used. For your particular example you have:

`00110` `010`
`00110` `011`
`00110` `100`
`00110` `101`

But in this series, there are more combinations of the host bits available (in bold), specifically:

`00110` `000` `<--`
`00110` `001` `<--`
`00110` `010`
`00110` `011`
`00110` `100`
`00110` `101`
`00110` `110` `<--`
`00110` `111` `<--`

The ones indicated by arrows are the additional subnets that are not included in your original list. So really, for these subnets, you would use 8 as the number to subtract from 256 which gives you a result of 248 or /21 and is correct.

Even with your method, the subnet mask that you end up with includes your original four subnets, but also includes 192.168.48.0/24 192.168.49.0/24 192.168.54.0/24 and 192.168.55.0/24

The decimal method is much easier for addresses where the value of the octet is 0 or 64 or 128 or 192 (or even 48 for that matter), which are values that you can more readily perceive that they are “at the beginning” of another set of subnets.

I hope this has been helpful!

Laz

Hi Guys - I understand that one of the rules that must be met before we can summarise a route is that the “networks must share the same high-order bits.”

In terms of route summarisation, does this mean the first two octets of an ipv4 address?

I’ve been researching online and have found that ‘high-order’ is a term applicable in other areas of networking. What does it actually mean?

Thanks,

Gareth.

Hello Gareth

High order bits in any binary number simply means the leftmost bits. This is sometimes referred to as the most significant bits. So it is true that in order to summarise several routes in a single summary route, at least one of the leftmost bits must be the same in all routes you want to summarise. If there are no leftmost bits that are the same then you can’t summarise. For example, 10.10.10.0/24 and 212.11.11.0/24 have no leftmost bits the same. Even from the first leftmost bit, they are different, as the first starts with a 0 and the second with a 1 in binary.

Actually what it means is that one or more leftmost bits must be the same in order to summarise. And actually, the number of bits that are the same, counting from left to right, will determine the actual summary route. Just like it was done in the lesson, you get all routes into binary and start looking at all of them from left to right. At the very first instance where there is a difference in them, even in only one route, you have found the subnet mask to use. In this way, you find the total number of higher order (leftmost) bits that are the same in all routes, and you’ve found the subnet mask.

I hope this has been helpful!

Laz

Thanks Laz - so how many leftmost bit are there in an ipv4 address?

Hello Gareth

The number of leftmost bits used for a summarisation can vary. For example, if you have the following networks:

10.10.0.0/24
10.10.1.0/24
10.10.2.0/24
10.10.3.0/24

…then you have to find the maximum number of leftmost bits for which these networks are the same. Allow me to use decimal for the first two octets, and binary for the next two, to illustrate this:

`10.10.00000000.00000000`
`10.10.00000001.00000000`
`10.10.00000010.00000000`
`10.10.00000011.00000000`

How many leftmost bits are the same for these four networks? The first 22 bits for all four networks are the same, but the 23rd bit changes. So the leftmost bits that do not change, define the summary address which will be:

10.10.0.0 with a subnet mask of /22 which is 255.255.252.0.

So the leftmost bits for this particular example which remain the same, is 22, and this defines the summary address for this specific set of networks.

If we use the following networks:

192.168.10.128/26
192.168.10.192/26

then the number of leftmost bits will be different for the summary address. Doing the same exercise (this time I’ll write the first three octets in decimal, and the fourth in binary):

``````192.168.10.10000000
192.168.10.11000000
``````

How many leftmost bits are the same? 25, because the 26th bit, counting from the left, changed. So the summary address will be

192.168.10.128 with a subnet mask of /25 which is 255.255.255.128. So this is the summary address.

I hope this has been helpful!

Laz