Determining how many subnet bits allow for X subnets

wavewave Senior MemberMember Posts: 342
*edit*

Hey guys,

My apologies for the long post, but this one has me confused!

I was watching Jeremy's Advanced Subnetting Part 1 video last night and I practiced the problems he gave at the end for calculating the number of networks that needed to be created.

One of the questions was: Break this class B 150.5.0.0 into 100 networks.

He teaches a method in the video which takes the number of networks, in this case 100, and converts that number to binary. In the video he lays out the table 128 64 32 16 8 4 2 1 and he's saying "128 is too big so it must start from 64"...which makes sense to me because you can make 100 with the remaining numbers in the table.

So I do the practice problems and get them correct.

Today I flip open Odom's book again and continue where I left off, because I'm mixing up the book/videos.

I get to the bottom of page 363, this is the ICND1 book, and it says "Your network can use Class B network 130.1.0.0. What subnet masks meet the requirement that you plan to allow at most 200 subnets, with at most 200 hosts per subnet?"

Ok, got that...

"First you need to figure out how many subnet bits allow for 200 subnets..." - This brings Jeremy's method to mind!

"You can use the forumla 2 to the power of the subnet bits and plug in values for s until one of the numbers is at least 200. In this case s turns out to be 8, because 2^7 = 128, which is not enough subnets, but 28 = 256, which provides enough subnets."

Based on what Jeremy taught me, I would have stopped at 128 and discounted the 256 bit seeing it was 56 more than 200.

I'm thinking...HUH!? Not sure who has it right?

I would be most grateful for your assistance!!

Cheers!

ROUTE Passed 1 May 2012
SWITCH Passed 25 September 2012
TSHOOT Passed 23 October 2012
Taking CCNA Security in April 2013 then studying for the CISSP

Comments

  • smashedpumpkinssmashedpumpkins Member Member Posts: 33 ■■□□□□□□□□
    It sounds like they're teaching different ways to do it. I made a short tutorial on subnetting that may help you out. It's the method in Odom's book.

    http://www.techexams.net/forums/ccna-ccent/67245-quick-subnetting-all-your-head.html#post537526
    Fortune favors the brave.
  • Greenmet29Greenmet29 Senior Member Member Posts: 240
    I think what is confusing you is the wording in the question when it says "at most 200". It really is saying that you need to allow for 200 hosts and 200 subnets.

    2^8=256 subnets
    2^8-2=254 hosts/subnet
  • WebmasterWebmaster Johan Hiemstra Admin Posts: 10,292 Admin
    wave wrote: »
    He teaches a method in the video which takes the number of networks, in this case 100, and converts that number to binary. In the video he lays out the table 128 64 32 16 8 4 2 1 and he's saying "128 is too big so it must start from 128"...which makes sense to me because you can make 100 with the remaining numbers in the table.

    This all comes down to basic binary math. Basically you steal bits from the host portion of the address until you have enough bits to create 100 different decimal values from those bits. So in this case, stealing 1 bit from the host portion only gives you 2 subnets (true regardless of the class). Stealing another bit doubles that number to 4. Stealing 3 bits from the host portion gives you 8 different subnets. 4 bits is 16... Notice how my table is different: 2 4 8 16 32 64 128 256. So to make 100 different subnets, you need at least 7 bits.

    Now in your table add up the values of the first 7 bits and you get 128+ 64+ 32+ 16+ 8+ 4+ 2 = 254.

    This is a class B address so the mask would be 255.255.0.0 by default, and subnetted into 100 subnets would be 255.255.254.0.

    An easier way for the last portion is memorizing the prefix-mask pairs. Then you know the class B address has a prefix of 16, you need 7 bits more for 100 subnets so the eventual address is 150.5.0.0/23 which in turn is 150.5.0.0/23 255.255.254.0 (which is kinda obviously 1 less than the default class C /24 or 255.255.255.0).
  • wavewave Senior Member Member Posts: 342
    Firstly - thank you everyone!!

    Ahhh okay, I think I've got it now. It's really just two different methods of getting the same result. I note the difference in my table starting from 1 and yours from 2.

    Jeremy's method is more visual and it works because the table starts from 1.

    Odom's method follows the 2^S formula (2^Subnet bits) until the desired number of networks is reached.

    I ran a test on 150.2.0.0 to create at least 300 networks and both methods told me I needed 9 more bits on top of the 16 from the class B. Giving a mast of 255.255.255.128 or /25

    Re-reading Odom's question again: "Your network can use Class B network 130.1.0.0. What subnet masks meet the requirement that you plan to allow at most 200 subnets, with at most 200 hosts per subnet?"

    I take "at most" to mean no more than.

    The answer is a /24 or 255.255.255.0 which actually would provide a maximum of 256 subnets with 254 hosts per subnet. The question said "at most" so I would have thought it should be /23, providing 128 subnets.

    Thoughts?

    *Edit* It seems I am not alone! http://www.techexams.net/forums/ccna-ccent/46324-subnetting-questions.html

    I'll return to my books, thanks again guys!

    ROUTE Passed 1 May 2012
    SWITCH Passed 25 September 2012
    TSHOOT Passed 23 October 2012
    Taking CCNA Security in April 2013 then studying for the CISSP
  • foxhenryfoxhenry Member Banned Posts: 37 ■■□□□□□□□□
    hi this chart i normally used during the exam and i write this on the scratch pad before the exam begins..hope this will help..

    128 --- 192 --- 224 --- 240 --- 248 --- 252 ---254 --- 255 ---> subnet mask
    2
    4
    8
    16 ---- 32 ---- 64 ---- 128 --- 256 ---> 512 1024 2048 etc.. # of host
    128 --- 64 ---- 32
    16 ---- 8
    4
    2
    1 ---> block or increment
    25 ---- 26 ---- 27
    28 ---- 29 ---- 30 ---- 31
    32 ---> slash mask or slash notation
Sign In or Register to comment.