Friday, November 28, 2008

How to perform the summarization for odd or even subnets?

Still I remember the day of 22nd February 2008 when I was asked to perform the summarization of only odd subnets in my CCIE lab. It seems a hard job in the first seen but you really enjoy when you come to know it’s actually not as hard as you are thinking of it. Before moving ahead you should be familiar with the concept of summarization.
When we talk about the permission of odd or even subnets it means you have to create an acl in a smart way so that it must allow the only subnets which are not divisible by 2 for odd subnets or divisible by 2 for even subnets. Start playing with the binary.
For example we want to allow only the given odd subnets in the acl. For this we require the network address as well as its subnet mask.
10.1.0.0/24
10.1.2.0/24
10.1.4.0/24
10.1.6.0/24
10.1.8.0/24

First two octets & last octets are same so there is no need for compiling its binary. We need to play with the third octet only. Convert it to binary

Binary of 0 is 00000000
Binary of 2 is 00000010
Binary of 4 is 00000100
Binary of 6 is 00000110
Binary of 8 is 00001000

Check the pattern of the first bit which is always set to 0. Here is the logic. It means for all even numbers the first bit will always be 0 & will be 1 in case of odd numbers. Now create the wild card mask put the 1’s where the bits are changing & rest will be as 0.
Wild card mask 0,2,4,6,8 will be 00001110 which is equivalent to 14
Network is 10.1.0.0 & wildcard mask is 0.0.14.0.
By doing same steps you can calculate the wildcard mask for odd subnets also.

Does this type of summary or acls required in real life scenario? May be the answer is no but I think it can be used where you are having two links and you can advertise the odd subnets from the one link and even subnets from the other link. But what will happen if a link goes down? When will you get the answer kindly reply to my post?

Regards
shivlu jain

People who read this post also read :



5 comments:

Rana said...

I think in case of odd networks. It will not work

10.10.1.0
10.10.3.0
10.10.5.0

In above example 0000 0111 will be bit combination. And '1' bit part is ignored so this combination can generate 8 different combination thats why it can also generate Even nos also. like 110.

I think with this method only Even subnets or networks can be summarized.

What you say about it.

Anonymous said...

Please disclose how to create a WSM for odd subnets. Thanx for the info provided for creating a WSM for even subnets.

bleamers said...

if the summariation is no matched it will be forwared according to the routing table path

shivlu jain said...

longest prefix match if it is permitted

CCIE said...

It's no wonder why there are so many ccie's now if people posted the questions! NDA stands for Non Disclosure Agreement!!