how many hosts question

ebykmebykm Member Posts: 29 ■□□□□□□□□□
Question : if class C network is subnetted into 3, how many host address will be there on all networks combined ? (no other information is given, esp number of hosts in a subnet)

answers :

128
186
254
250
64

my answer is 249 (2^3-2 hosts, + no wasted networks), but, a friend of mine who is a CCNP says 186 (because 62hosts*3 + one unused subnet), Who is correct ?.

Comments

  • KaminskyKaminsky Member Posts: 1,235
    hmm thinking about response again
    Kam.
  • DirtySouthDirtySouth Member Posts: 314 ■□□□□□□□□□
    I would say there would be 186 usable hosts.

    3 Class C Subnets = 255.255.255.192
    Subnet 1 -> 0 - 63
    Subnet 2 -> 64 - 127
    Subnet 3 -> 128 - 191
    Subnet 4 -> 192 - 255

    Since Subnet 1 is not usable (assuming no subnet-zero), That leaves 3 networks with 62 usable hosts per network. 62*3 = 186.

    I'm learning too, so hopefully my logic is correct.
  • KaminskyKaminsky Member Posts: 1,235
    Yep.. I rechecked my math (i'm learning this too) and I agree with Dirty South.

    however, I believe subnet 0 is allowed on the cisco certs now although they do speciy it is allowed on the question. It's the legacy stuff that couldn't handle the zero subnet like rip 1.
    Kam.
  • DirtySouthDirtySouth Member Posts: 314 ■□□□□□□□□□
    The whole subnet-zero thing is really irritating because some questions its implied, but not stated and others times you can use the "All 1's Subnet"...very confusing!

    In this situation, if subnet-zero were allowed the right answer was not an option.

    Subnet 1 -> 0 - 63 - Subnet Zero
    Subnet 2 -> 64 - 127
    Subnet 3 -> 128 - 191
    Subnet 4 -> 192 - 255 - All 1's Subnet

    62*4 = 248

    So, by process of elimination I knew that subnet-zero must not be allowed.
  • james_james_ Member Posts: 97 ■■□□□□□□□□
    Hi Sorry, probably dumb question, but if we know that Subnet-Zero is not used, I thought we didnt assign hosts to either the First (Subnet-Zero) AND the last (Broadcast Subnet), so really as per the workings so far, we only have 2 subnets to assign hosts to, not 3?
  • loboernestoloboernesto Member Posts: 94 ■■□□□□□□□□
    hi guys.. this is a reply I found in a cisco.com discussion forum from one of Cisco's staff who is charge of writing the exams to a guy how was asking the same:
    Replied by: mcbenson - May 24, 2006, 6:34am PST


    Hi, we do in fact use all subnets, unless otherwise specified in an item. Please have a look at: http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080093f18.shtml

    We are using this document as a guide and explanation of the how this issue is handled on the exam.


    Hope this clarifies the issue for you.

    Regards,
    Martin

    In short the link says (is not specifically related to the exam though):
    It should be noted that even though it was discouraged, the entire address space including subnet zero and the all-ones subnet have always been usable. The use of the all-ones subnet was explicitly allowed and the use of subnet zero is explicitly allowed since Cisco IOS Software Release 12.0. Even prior to Cisco IOS Software Release 12.0, subnet zero could be used by entering the ip subnet-zero global configuration command.

    cheers
  • DirtySouthDirtySouth Member Posts: 314 ■□□□□□□□□□
    hi guys.. this is a reply I found in a cisco.com discussion forum from one of Cisco's staff who is charge of writing the exams to a guy how was asking the same:
    It should be noted that even though it was discouraged, the entire address space including subnet zero and the all-ones subnet have always been usable. The use of the all-ones subnet was explicitly allowed and the use of subnet zero is explicitly allowed since Cisco IOS Software Release 12.0. Even prior to Cisco IOS Software Release 12.0, subnet zero could be used by entering the ip subnet-zero global configuration command.
    This makes sense, but unfortunately with the answers provided in the original question, they don't want you to use subnet-zero. If they did, the answer would be 248. This is why these types of questions are so irritating. icon_confused.gif
  • loboernestoloboernesto Member Posts: 94 ■■□□□□□□□□
    it depends on the source of the Q. i suppose cisco's Q will/should tell you whether the subnet 0 is used or not....although cisco's Q are known to be tricky and confusing...

    concerning the all 1's subnet i think we can take for sure that it's always used, i've never seen a Q where they were part of it.
    "The use of the all-ones subnet was explicitly allowed " <---it seems that they have been always used and it was allowed by default on routers even prior to ios 12
    cheers
  • james_james_ Member Posts: 97 ■■□□□□□□□□
    So we can always use the all 1's subnet even if subnet-zero is not allowed? Forgive me, but I thought the rule was n^2-2 if Subnet-Zero was not allowed, hence in this example, we are borrowing 2 subnet bits, we have come to the conclusion that Subnet-Zero is not allowed, therefore 2^2-2 gives us 2 networks which are available to hosts, providing we use a 192 mask.

    Cisco Press, Intro, Page 333, top of page, Step 5:

    Declare the number of subnets, which is 2^number-of-subnet-bits -2

    Please explain if I have got this right, the text from the CISCO website quote also mentions subnet-zero is also explicitly allowed, just as the all 1's subnet. Is one subnet really allowed and one is not regardless of subnet-zero?[/b]
  • thesemantheseman Member Posts: 230
    I think the answer that they are looking for, and the one that your CCNP friend gave you, are one and the same.
    IMO its not the best question, but I think they are looking at it this way:

    1)Assume subnet zero is enabled
    -so we know that we only need to borrow 2 bits for networks (2^2 = 4)
    -this means that we have 4 networks, and each network has 6 bits for hosts (2^6 -2 = 62 hosts each). So our TOTAL hosts would be 248

    But wait... thats not a choice! In the question they stated (sort of) that you are using only 3 of the subnets (I do NOT like the way this was worded). So in reality you are using 3 * 62 which is 186.
    I hope this helps!

    Travis
  • HumperHumper Member Posts: 647
    theseman wrote:
    I think the answer that they are looking for, and the one that your CCNP friend gave you, are one and the same.
    IMO its not the best question, but I think they are looking at it this way:

    1)Assume subnet zero is enabled
    -so we know that we only need to borrow 2 bits for networks (2^2 = 4)
    -this means that we have 4 networks, and each network has 6 bits for hosts (2^6 -2 = 62 hosts each). So our TOTAL hosts would be 248

    But wait... thats not a choice! In the question they stated (sort of) that you are using only 3 of the subnets (I do NOT like the way this was worded). So in reality you are using 3 * 62 which is 186.
    I hope this helps!

    Travis


    Terrible question it is.
    Now working full time!
  • ebykmebykm Member Posts: 29 ■□□□□□□□□□
    Questions like these are driving me nuts. icon_confused.gif

    folks, i don't know how you guys came up with 4 subnets, i was thinking

    1 * /25 subnet
    2 * /26 subnets

    resulting in 3 useful subnets and 249 valid hosts(if ip subnet-zero is enabled), how ever if it is disabled, i'd use /27 because, only 2 subnets can be used with /26 (subnet-zero and all-one subnets not to be used).
  • malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
    ebykm wrote:
    Questions like these are driving me nuts. icon_confused.gif

    folks, i don't know how you guys came up with 4 subnets, i was thinking

    1 * /25 subnet
    2 * /26 subnets

    resulting in 3 useful subnets and 249 valid hosts(if ip subnet-zero is enabled), how ever if it is disabled, i'd use /27 because, only 2 subnets can be used with /26 (subnet-zero and all-one subnets not to be used).

    with a mask of 255.255.255.192 (which is a /26) you have the following

    3 Usable subnets

    64 - 127,
    128 - 191 and
    192 - 254 (255 is broadcast address)

    In addition to this you have the original network/host portion .0 - .63 anything above this is a new subnet which has all 0's in the network portion of the address (128 & 64 = 2 & 1) therefore you can not use this, however it still counts as a network! Confusing stuff!

    This may bamboozle you all but the way I remember how to subnet quickly on paper and will use this method for my exam, is if you firstly draw an octet scale (or get one off the web) |128|64|32|16|8|4|2|1|

    Q: If you required a minimum of 6 usable sub networks on a class C network which mask would you use?

    A: You would use a mask of 255.255.255.224 which is a 3 bit borrow (128 + 64 + 32 from octet scale 4+2+1 network range), I would then draw a big bold line down inbetween 32 and 16 of the scale and use it as a guide to mark a new scale above |128|64|32|(actual subnet ranges) of |4|2|1| ( number of subnets = 8 with 6 usable)

    I hope this helps someone but it probably just looks like I am talking in riddles to most of you!!!......ah well I know what I mean!
  • james_james_ Member Posts: 97 ■■□□□□□□□□
    Hi Malcybood,

    Please explain how you have 3 usable subnets with a /26 prefix?

    /26 on a default Class C indicates we are borrowing 2 subnet bits, that much I think we can all agree on.

    Now, if Subnet-zero is allowed, number of usable networks is 2^2 = 4
    If Subnet-Zero is not allowed, usable networks = 2^2-2 = 2

    Please explain how you get to the 3 networks as being usable?

    Yes, terrible question indeed! I have seen many posts indicating CISCO will indicate the use of Subnet-Zero or otherwise, so bear in mind for the exam, Odom indicates not using subnet-zero in the CISCO press books, the actual phrase was "discouraged" so personally, if I am faced with a subnetting question on the exam, and subnet-zero is not mentioned, I will assume that it cannot be used.
  • DirtySouthDirtySouth Member Posts: 314 ■□□□□□□□□□
    james_ wrote:
    Hi Malcybood,

    Please explain how you have 3 usable subnets with a /26 prefix?

    /26 on a default Class C indicates we are borrowing 2 subnet bits, that much I think we can all agree on.

    Now, if Subnet-zero is allowed, number of usable networks is 2^2 = 4
    If Subnet-Zero is not allowed, usable networks = 2^2-2 = 2

    Please explain how you get to the 3 networks as being usable?
    I'll jump in on this one since he hasn't gotten back to you yet. According to Malcybood's logic, the reason there would be 3 usable subnets with /26 prefix (255.255.255.192) is...

    You're using the first two bits of the 4th octet: 128 & 64

    Subnet-zero Enabled:
    (2*2) - 1 = 3

    Subnet-zero Disabled:
    (2*2) - 2 = 2

    Assuming subnet-zero is NOT enabled:
    0-63 - 1st (Not Usable)
    64-127 - 2nd (Usable)
    128-191 - 3rd (Usable)
    192 - 255 - 4th (Usable)

    We have all agreed that the original question was worded poorly and isn't very clear. In most cases it is assumed that the "All 1's Subnet" or broadcast IS usable. So, you have 3 usable subnets if subnet zero is NOT enabled. I hope I didn't confuse these anymore. :)
  • loboernestoloboernesto Member Posts: 94 ■■□□□□□□□□
    Subnet-zero Enabled:
    (2*2) - 1 = 3

    Subnet-zero Disabled:
    (2*2) - 2 = 2

    Assuming subnet-zero is NOT enabled:
    0-63 - 1st (Not Usable)
    64-127 - 2nd (Usable)
    128-191 - 3rd (Usable)
    192 - 255 - 4th (Usable)


    I think there's a little contradiction there...first line says subnet-zero enabled = 3
    in the table you says subnet zero not enabled = 3 usable subnets... icon_confused.gif

    But I think that what you tried to say was right.

    this a table from cisco
    that shows a a class c network address with a prefix /26 will give you 4 usable subnets, if subnet-zer0 is not enabled you get only 3 (all-ones subnet is still enabled even if the subnet-zero is not, note there's not command to enable or disable the all-ones subnet)
    Class C Host/Subnet Table
    Class C Subnet Effective Effective Number of Subnet
    Bits Mask Subnets Hosts Mask Bits




    1 255.255.255.128 2 126 /25
    2 255.255.255.192 4 62 /26
    3 255.255.255.224 8 30 /27
    4 255.255.255.240 16 14 /28
    5 255.255.255.248 32 6 /29
    6 255.255.255.252 64 2 /30
    7 255.255.255.254 128 2* /31
  • james_james_ Member Posts: 97 ■■□□□□□□□□
    I think I get it now, thanks so much guys!

    My way of thinking, you absolutely positively cannot use subnet-zero if it is not enabled, but you can still use the all ones subnet, even though traditionally, it was not advised or encouraged - hence the traditional 2^2-2 formula I have seen many a time.

    Incidentally, the CISCO press INTRO indicates that the 2^2-2 formula should still stand for the exam (p. 332), but in this particular question, I can see how we had to assume that the all 1's subnet has been allocated as usable, there's just no other way to get to one of the answers.

    Thanks again for helping me understand!
  • malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
    DirtySouth wrote:
    james_ wrote:
    Hi Malcybood,

    Please explain how you have 3 usable subnets with a /26 prefix?

    /26 on a default Class C indicates we are borrowing 2 subnet bits, that much I think we can all agree on.

    Now, if Subnet-zero is allowed, number of usable networks is 2^2 = 4
    If Subnet-Zero is not allowed, usable networks = 2^2-2 = 2

    Please explain how you get to the 3 networks as being usable?
    I'll jump in on this one since he hasn't gotten back to you yet. According to Malcybood's logic, the reason there would be 3 usable subnets with /26 prefix (255.255.255.192) is...

    You're using the first two bits of the 4th octet: 128 & 64

    Subnet-zero Enabled:
    (2*2) - 1 = 3

    Subnet-zero Disabled:
    (2*2) - 2 = 2

    Assuming subnet-zero is NOT enabled:
    0-63 - 1st (Not Usable)
    64-127 - 2nd (Usable)
    128-191 - 3rd (Usable)
    192 - 255 - 4th (Usable)

    We have all agreed that the original question was worded poorly and isn't very clear. In most cases it is assumed that the "All 1's Subnet" or broadcast IS usable. So, you have 3 usable subnets if subnet zero is NOT enabled. I hope I didn't confuse these anymore. :)

    Hi Guys,

    Been away on business so haven't had time to reply.

    James_ Hopefully DirtySouth cleared up my theory for you. Also the example question I gave and said was a 3 bit borrow was one that I made up to show an example of the same thing with using a different Subnet Mask Required 6 subnets, available 7 with no subnet zero, 8 with (/27, 3 bit borrow, 255.255.255.224) sorry if I confused you!

    I find it interesting seeing how different people approach subnetting as sometimes I feel as if my way is a bit all over the place but at the same time I know I can work out subnetting questions well within 1 minute which is all you really have for each question (excluding sims) in the exam.

    Cheers

    Malc
  • james_james_ Member Posts: 97 ■■□□□□□□□□
    Hey Malc,

    Yeh you and Dirty South cleared things up pretty good. Luckily I'm blessed with being naturally numerate, so subnetting is easy for me also. That's why I was kinda scared when I didn't get this question. It's all to do with what we read and learn. I think the CISCO Press is trying to mold you into a mindset of passing the exam (well hopefully anyway!):

    "IP addressing conventions define that two subnets per network should not be used and that two hosts per subnet should not be used" (p. 332)

    Hence you can see the confusion when people start using the last subnet which a lot of us have read as being unusable. Now I understand, I think it would have been better if the book explained this concept a little further, as it stands, it tells that the broadcast address is "Reserved" and makes it sound like Subnet Zero frees up both the subnet and all 1's address, when in fact the all 1's address can be used anytime regardless of SZ...

    Anyways, thanks again for your help!
  • ebykmebykm Member Posts: 29 ■□□□□□□□□□
    Guy's, when i saw this question somewhere on the net. Since no other details were given, i thought about VLSM.... asuming subnet-zero is in use.

    one thing confuses me, if subnet-zero is disabled,
    first (all zero) and last (all one)subnets are unusable.

    and some say, only the first is unusable....... which is correct.
  • loboernestoloboernesto Member Posts: 94 ■■□□□□□□□□
    It was discouraged to use the Subnet-zero and all-ones subnet, and for the subnet-zero it was even not possible to do it unless the command ip subnet-zero was entered, but it was still possible to use both subnets. The command ip subnet-zero was used to enable the use of the subnet-zero (the all-ones subnet was discouraged but there was no configuration restriction in its use). Simply cisco best practice was to leave those two subnets as unusable. Cisco keeps teaching this "best practice" for some reason though. below is the cisco.com text that i posted previously.
    It should be noted that even though it was discouraged, the entire address space including subnet zero and the all-ones subnet have always been usable. The use of the all-ones subnet was explicitly allowed and the use of subnet zero is explicitly allowed since Cisco IOS Software Release 12.0. Even prior to Cisco IOS Software Release 12.0, subnet zero could be used by entering the ip subnet-zero global configuration command.

    So technically with subnet-zero enabled you can use all the networks, without it you loose the subnet-zero but NOT the all-ones subnet.

    Regarding VLSM, in the question you posted it doesn't say that VLSM is in use and it doesn't imply it neither. I think you may be a little bit confused with the concepts: you can have subnetted network in your network without entering the ip subnet-zero command. using VLSM means you will have subnets of different length as the name implies...you can have /24 for your ethernet segments and /30 for your serial connections for example, all coming from the one single mayor network (ie 192.168.10.0). if subnet-zero is not enabled in vlsm you loose some subnets but you can still do vlsm (but you need to use a classless routing protocol).

    cheers.
Sign In or Register to comment.