The following question is from the web:

This assumes that each host has a unique address.

However, the website says the correct answer is: 255.255.248.0

So I will try again. This time I am going to assume that each subnet needs a unique address but the hosts do not. This leads me to the mask 255.255.255.224. You will notice that in the last byte of the mask the 3 most significant bits are on. However, this answer is wrong also.

What is the right way to solve this problem?

Well some of the numbers they give are not exact so it leads to a little confusion right off the bat. Working with subnet masks for beginners its easy to get confused.

Take a subnet mask of 255.255.0.0 If you look at that mask the 1's are the networks and the 0's are the hosts in that subnet. You can rewrite that subnet mask as

11111111.11111111.00000000.00000000

Again the 1's are the networks and the 0's are the hosts. In the subnet mask above that gives you 16384 networks and 16384 hosts. (I'm going to shift to a class c style subnet mask to explain it a bit easier with my old brain)

255.255.255.0 is in binary 11111111.11111111.11111111.00000000 that is 4294967040 networks of 255 hosts. This mask can also be written as /24

If you shift the bits one to the left (to increase the number of possible hosts)

255.255.254.0 is in binary 11111111.11111111.11111110.0000000 that is 4294966784 networks of 512 hosts. This mask can also be written as /23

So if we shift the number of bits again to the left (to increase the number of possible hosts)

255.255.252.0 gives you 1024 possible hosts. This mask can also be written as /22

Again we will shift it one tot he left to add more hosts

255.255.248.0 gives you 2048 possible hosts. This mask can also be written as /21 (that /21 is the number of binary 1's in the mask).

So to give you the "1490" hosts from the question you need a subnet mask of /21 because a subnet mask of /22 only gives you only 1024 possible hosts.

I know I took the long way to give you the answer, but i wanted you to understand how the bits interact with the number of available hosts.

## 6 Replies

I'm not going to give you a direct answer on this, but give you a clue where to look. I use this whenever I need to work with nonstandard subnets and netmasks.

https://www.subnet-calculator.com/cidr.php

This tool will give you the answer you seek. I do have the say the question is worded very poorly and can be misinterpreted very easily. They want you to start with the base address and then carve the 30 subnets from that.

George1421,

I thank you for the response. Having thought about it some more, I realize that the purpose of the sub-net mask is to make off the device address ( 11 bits in this case ) and only that. That is, we want to keep the address of the sub-net. Hence the website's answer is correct. Is my updated reasoning correct?

Well some of the numbers they give are not exact so it leads to a little confusion right off the bat. Working with subnet masks for beginners its easy to get confused.

Take a subnet mask of 255.255.0.0 If you look at that mask the 1's are the networks and the 0's are the hosts in that subnet. You can rewrite that subnet mask as

11111111.11111111.00000000.00000000

Again the 1's are the networks and the 0's are the hosts. In the subnet mask above that gives you 16384 networks and 16384 hosts. (I'm going to shift to a class c style subnet mask to explain it a bit easier with my old brain)

255.255.255.0 is in binary 11111111.11111111.11111111.00000000 that is 4294967040 networks of 255 hosts. This mask can also be written as /24

If you shift the bits one to the left (to increase the number of possible hosts)

255.255.254.0 is in binary 11111111.11111111.11111110.0000000 that is 4294966784 networks of 512 hosts. This mask can also be written as /23

So if we shift the number of bits again to the left (to increase the number of possible hosts)

255.255.252.0 gives you 1024 possible hosts. This mask can also be written as /22

Again we will shift it one tot he left to add more hosts

255.255.248.0 gives you 2048 possible hosts. This mask can also be written as /21 (that /21 is the number of binary 1's in the mask).

So to give you the "1490" hosts from the question you need a subnet mask of /21 because a subnet mask of /22 only gives you only 1024 possible hosts.

I know I took the long way to give you the answer, but i wanted you to understand how the bits interact with the number of available hosts.

George,

Thanks for the response. I believe, I now understand it but I want to check my understanding. If the problem had said:

What subnet mask would you use for the 172.19.0.0 network, such that you can get 90 subnets and 1490 hosts per subnet?

I claim the subnet mask would still be: 255.255.248.0

Am I right about that?

You don't want to think about a mask big enough to encompass all of those subnets as that's no the purpose of a subnet mask. The subnet mask is for the individual subnet that houses the 1490 hosts. So the question is, what is the smallest subnet mask you can go with that allows 1490 hosts.

Then the question becomes, can I fit 90 of those in a 172.19.xx.xx range or do I need to move to the larger 10.xx.xx.xx range.

George,

Thanks for the response. I believe, I now understand it but I want to check my understanding. If the problem had said:

What subnet mask would you use for the 172.19.0.0 network, such that you can get 90 subnets and 1490 hosts per subnet?

I claim the subnet mask would still be: 255.255.248.0

Am I right about that?

How about using another website that not only answer their question but give a reason ?

There used to be several CCNA "test" sites that do that ?

I would think the easiest is always look for goal in mind which lies with the 1490 host. Once you determine which subnet, then which network range to use for 90 subnets which means 90 x 1490 devices.