Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

wildcard mask

Hi Guys

i have some confusion understanding the wildcard masks.

For eg:we have below networks which i want to calculate the wildcard mask.

192.168.32.0/24

192.168.33.0/24

192.168.34.0/24

192.168.35.0/24

192.168.36.0/24

192.168.37.0/24

192.168.38.0/24

192.168.39.0/24

now if we summarize these then we get 255.255.248.0

if i want to calculate the wildcard mask then i will inverse the bit i.e

11111000

00000111

now my confusion is i am saying the 5 bits should match in the third octet and the 3 bits dnot care.

My confusion is how we are getting the the mask 0.0.7.255.

Thanks

Mahmood

5 REPLIES
Super Bronze

Re: wildcard mask

"My confusion is how we are getting the the mask 0.0.7.255. "

You just calculated the 3 octet binary value as 00000111, which is 7 in decimal. The full inversion is:

255.255.248.0

11111111 11111111 11111000 0000000

00000000 00000000 00000111 1111111

0.0.7.255

Re: wildcard mask

Hi

I understand that we will get this result.

My question is how does the mask 0.0.7.255 covers all the subnet ranges i.e 192.168.32.0 - 192.168.39.0..?

if we summarize the below address we will get the mask as

255.255.248.0.

And if we invserse it how is it covering this range of address.

Sorry for stupid question.

Thanks

Mahmood

Super Bronze

Re: wildcard mask

Community Member

Re: wildcard mask

Dear Mahmoud,

your problem is with the summerized address itself; it should be 192.168.32.0 /20 (subnet mask of 255.255.240.0) which is going to result in a wildcard mask of 0.0.15.255

Now I am going to tell you how I reached that result. (I am assuming you know a little binary, if not you should work on that first)

in your example, you have the subnets

192.168.32.0 /24

192.168.33.0 /24

192.168.34.0 /24

.

.

.

192.168.39.0 /24

this sequence indeed qualifies for a summarized address because we can notice that the first 16 bits are always the same (192.168.0.0) + if we convert the rest of the subnets to binary, we are going to find that the first 4 bits are always the same.

when doing summerization I always prefer to use this method;

first put all the 8 bits like this

128 64 32 16 8 4 2 1

0 0 0 0 0 0 0 0

then assign the 1 to the bits until you get the network you want to get (in our example 32,33,34...39)

128 64 32 16 8 4 2 1

0 0 0 0 0 0 0 0

for 32: 0 0 1 0 0 0 0 0

for 33: 0 0 1 0 0 0 0 1

for 34: 0 0 1 0 0 0 1 0

for 35: 0 0 1 0 0 0 1 1

for 36: 0 0 1 0 0 1 0 0

for 37: 0 0 1 0 0 1 0 1

for 38: 0 0 1 0 0 1 1 0

for 39: 0 0 1 0 1 0 0 1

we notice that the 4 most significant bits (the 4 bits from the left, the ones that are responsible for the 32) doesn't change for all the subnets. so we are going to add 4 bits to the subnet mask that we already have 16 + 4 = 20 (255.255.240.0)

Here is another hint that will help you to get the wildcard mask;

wildcard mask = 255.255.255.255-Subnet Mask

Wildcard Mask (for our example) = 255.255.255.255 - 255.255.240.0 = 0.0.15.255

Hope that solved your problem and made subnetting, route summarization a little more easier.

Community Member

Re: wildcard mask

Sorry you all,

I messed up while converting to binary (Gotta watch out for those simple mistakes that would have catastrophic effects !)

Here is the same topic after the fix

your problem is with the summerized address itself; it should be 192.168.32.0 /20 (subnet mask of 255.255.248.0) which is going to result in a wildcard mask of 0.0.7.255

Now I am going to tell you how I reached that result. (I am assuming you know a little binary, if not you should work on that first)

in your example, you have the subnets

192.168.32.0 /24

192.168.33.0 /24

192.168.34.0 /24

.

.

.

192.168.39.0 /24

this sequence indeed qualifies for a summarized address because we can notice that the first 16 bits are always the same (192.168.0.0) + if we convert the rest of the subnets to binary, we are going to find that the first 5 bits are always the same.

when doing summerization I always prefer to use this method;

first put all the 8 bits like this

128 64 32 16 8 4 2 1

0 0 0 0 0 0 0 0

then assign the 1 to the bits until you get the network you want to get (in our example 32,33,34...39)

128 64 32 16 8 4 2 1

0 0 0 0 0 0 0 0

for 32: 0 0 1 0 0 0 0 0

for 33: 0 0 1 0 0 0 0 1

for 34: 0 0 1 0 0 0 1 0

for 35: 0 0 1 0 0 0 1 1

for 36: 0 0 1 0 0 1 0 0

for 37: 0 0 1 0 0 1 0 1

for 38: 0 0 1 0 0 1 1 0

for 39: 0 0 1 0 0 1 1 1

we notice that the 5 most significant bits (the 5 bits from the left, the ones that are responsible for the 32) doesn't change for all the subnets. so we are going to add 5 bits to the subnet mask that we already have 16 + 5 = 21 (255.255.248.0)

Here is another hint that will help you to get the wildcard mask;

wildcard mask = 255.255.255.255-Subnet Mask

Wildcard Mask (for our example) = 255.255.255.255 - 255.255.248.0 = 0.0.7.255

Hope that solved your problem and made subnetting, route summarization a little more easier.

622
Views
0
Helpful
5
Replies
CreatePlease to create content