# How do I solve this sub question?

Member Posts: 199 ■■■□□□□□□□
I tried the Jeremy CBT Nuggets way but not getting the right answer, thx.

Question: You are designing a subnet mask for the 172.29.0.0 network. You want 210 subnets with up to 240 hosts on each subnet. What subnet mask should you use?

• Member Posts: 393
what answer are you getting?
• Member Posts: 953
I tried the Jeremy CBT Nuggets way but not getting the right answer, thx.

Question: You are designing a subnet mask for the 172.29.0.0 network. You want 210 subnets with up to 240 hosts on each subnet. What subnet mask should you use?

SurferdudeHB,

What class is that network address?
• Member Posts: 199 ■■■□□□□□□□
jovan88 wrote: »
what answer are you getting?[/QUOT

IIII IIII. IIII IIII. IIII IIII. I000 0000
• Member Posts: 199 ■■■□□□□□□□
SurferdudeHB,

What class is that network address?

Class B
• Member Posts: 29 ■□□□□□□□□□
Answer 'd be 255.255.255.0

11111111.11111111.11111111.00000000

The borrowed 1's give u 2^8 while the host 0's also give u 2^8. Suffice both.
• Member Posts: 415
172.29.0.0 for 210 subnets and 240 host. 172 = class B 255.255.0.0.

2^8 = 256 subnet for borrowed subnet bits 11111111.11111111.11111111.00000000
2^8 = 256 -2 = 254 for the remaining zero bits (host bits)

so it will give you 256 subnet and 254 host each subnet, suffice for the requirement of 210 subnet and 240 host each subnet.

172.29.0.0 / 24
• Member Posts: 953
Class B

SurferdudeHB,

What is the default mask for a Class B network?
• Member Posts: 19 ■□□□□□□□□□
jojopramos wrote: »
172.29.0.0 for 210 subnets and 240 host. 172 = class B 255.255.0.0.

2^8 = 256 subnet for borrowed subnet bits 11111111.11111111.11111111.00000000
2^8 = 256 -2 = 254 for the remaining zero bits (host bits)

so it will give you 256 subnet and 254 host each subnet, suffice for the requirement of 210 subnet and 240 host each subnet.

172.29.0.0 / 24

His question says 'up to' 240 hosts. 254 > 240, so that doesn't work. From the question, I gather it means it needs 0-240 hosts and no more. Unless it says 'at least' 240.
• Member Posts: 422
TheVirus wrote: »
His question says 'up to' 240 hosts. 254 > 240, so that doesn't work. From the question, I gather it means it needs 0-240 hosts and no more. Unless it says 'at least' 240.

It also says You want 210 subnets , not You want between 210 and 256 subnets. You can't create a mask for exactly 240 hosts, and the next smallest option is only 126 (128-2).

The /24 mask is perfect.
• Member Posts: 196
Pretty simple really...save the hosts...

Well you know straight of the bat that it is a class b address...

Ok so you need to allow for up to 240 hosts on each subnet...so how many host bits will give you 240 hosts ?

2^x - 2...where x is the number of host bits that you need...

2^7 - 2 = 128 - 2 = 126...will that give you the required number of host addresses ?....ummmmm no

2^8 - 2 = 256 - 2 = 254...that gives you 254 hosts for each subnet which is fine...that is what the question requires

Now you need 210 subnets...using the formula to work out the number of subnets (2^x)...how many subnet bits will you need ?

lets see...2^7 = 128 subnets...does that sound ok ?....ummmm no

2^8 = 256 subnets...which gives you the required number of subnets

So need 8 host bits and 8 subnet bits...

Default class b subnet mask is 255.255.0.0...11111111.11111111.00000000.00000000

For 8 host bits we need 8 zero's
For 8 subnet bits we need 8 one's

255.255.255.0...11111111.11111111.11111111.00000000
• Member Posts: 195
The answer has already been explained by others. Jeremy's method does work fine. I can see where the OP likely got confused, since Jeremy would have rounded up the chart: 256 128 64.. They likely thought it took 9 bits instead of putting the first bit under the 128 column. A simple slip can certainly throw off calculations
---
XPS 15: i7-6700HQ, 256 pcie ssd, 32 GB RAM, 2 GB Nvidia GTX 960m, windows 10 Pro

Cert in progress: CCNA (2016 revision)
• Member Posts: 199 ■■■□□□□□□□
surferdudehb,

what is the default mask for a class b network?

255.255.0.0
• Member Posts: 953
255.255.0.0

Since you need at least 210 subnets, how many subnet bits do you need to borrow from the host portion of the 172.29.0.0 network?
• Member Posts: 199 ■■■□□□□□□□
Since you need at least 210 subnets, how many subnet bits do you need to borrow from the host portion of the 172.29.0.0 network?

256 128 64 32 16 8 4 2
1 1 1 1 1 1 1 1 = 8 bits

What I don't understand is Jeremy has for binary 128 64 32 16 8 4 2 1 <-- there is a 1 in his method..
• Member Posts: 29 ■□□□□□□□□□
^it starts from 0 as exponent. 2^0 = 1
• Member Posts: 195
As mentioned that's because its 2^0. Anything to the power of zero equals one. The theory behind why that is, isn't important as far as networking goes. Only to remember that it starts at one.
---
XPS 15: i7-6700HQ, 256 pcie ssd, 32 GB RAM, 2 GB Nvidia GTX 960m, windows 10 Pro

Cert in progress: CCNA (2016 revision)
• Member Posts: 953
256 128 64 32 16 8 4 2
1 1 1 1 1 1 1 1 = 8 bits

What I don't understand is Jeremy has for binary 128 64 32 16 8 4 2 1 <-- there is a 1 in his method..

SurferdudeHB,

Technically, your answer is correct with 8 bits, however I don't understand the "256 128 64 32 16 8 4 2" part.

To calculate how may bits you need to borrow to create subnets, from the network, is to borrow one bit, see if that's enough. If it's enough, then step. If it's not enough, keep borrowing.

Since you said the default mask for a Class B network is 255.255.0.0, let's start from there...

Borrowing one bit

255.255.|1|000000.00000000
255.255.128.0

That creates two possible subnets because the one subnet bit can be either of two values, 0 or 1. So is 2 subnets equal to or greater than 210 subnets (as the design requires)? No, so keep borrowing.

So:
if you borrow 2 bits, thats 2 x 2 = 4 subnets.
if you borrow 3 bits, thats 2 x 2 x 2 = 8 subnets.
if you borrow 4 bits, thats 2 x 2 x 2 x 2 = 16 subnets.
...
if you borrow 8 bits, that's 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 = 256 subnets. That's enough for the 210 subnet requirement.

So, for the subnet requirement standpoint, the subnet mask can be 255.255.255.0.

Now, to double check, your design has a 240 hosts per subnet requirement. Since there's 8 bits left in the host portion of your subnet mask of 255.255.255.0, that allows 254 valid host addresses, so 255.255.255.0 is the answer that meets your: 1) 210 subnet requirement and 2) 240 hosts per subnet requirement.

See how it's possible to answer your own question?