Subnetting/Masking Question

tmharkinstmharkins Member Posts: 2 ■□□□□□□□□□
I had these two questions on a practice test, but I don't understand how they came to the answers. Any explanations would be greatly appreciated.

1. Which mask, when used on a Class C address will yield 5 subnets w/ 18 hosts on each?
A. 255.255.240.0
B. 255.255.255.248
C. 255.255.255.224 This was listed as correct answer.
D. 255.255.224.0
E. 255.255.255.240

2. What are the first and last usable host IP addresses on network 192.168.1.24/29?
A. 192.168.1.25 and 192.168.1.31
B. 192.168.1.17 and 192.168.1.30 This was listed as correct answer.
C. 192.168.1.24 and 192.168.1.254
D. 192.168.1.1 and 192.168.1.254
E. 192.168.1.17 and 192.168.1.32

Comments

  • dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    224 = 3 bits for the subnet mask. 2^3 = 8 subnets. You have five bits remaining for hosts, so 2^5-2 = 30 hosts. No other combination will satisfy the requirements.

    /29 will leave you three bits for the hosts, so your networks are going to increment by 8 (2^3) each time. Therefore your networks are:

    192.168.1.0-7
    192.168.1.8-15
    192.168.1.16-23
    192.168.1.24-31
    192.168.1.32-39
    etc.

    So, um, either it's too late for me to be subnetting, or the question is messed up. I'd say the answer is 25 and 30. Maybe the info should have been 192.168.1.16/28; that would have made B the correct answer. Check the errata.
  • Jason0352Jason0352 Member Posts: 59 ■■□□□□□□□□
    A CIDR of /29 = a 240 mask with the smallest bit of 16 being the increment.
    So start at 0 then increment by 16 each time to get your network IDs

    192.168.1.0
    192.168.1.16
    192.168.1.32
    You can stop now because your node address of 192.168.1.24 has to be between 192.168.1.16 and .32. You know that network IDs cant be used for hosts so 192.168.1.17 is the 1st host and 192.168.1.30 is the last host. Broadcast address is always the address before the next subnet in the increment. IE: 192.168.1.31 = broadcast
  • captobviouscaptobvious Member Posts: 648
    Jason0352 wrote: »
    A CIDR of /29 = a 240 mask with the smallest bit of 16 being the increment.
    So start at 0 then increment by 16 each time to get your network IDs

    192.168.1.0
    192.168.1.16
    192.168.1.32
    You can stop now because your node address of 192.168.1.24 has to be between 192.168.1.16 and .32. You know that network IDs cant be used for hosts so 192.168.1.17 is the 1st host and 192.168.1.30 is the last host. Broadcast address is always the address before the next subnet in the increment. IE: 192.168.1.31 = broadcast
    Except /29 is a 248 mask, like Dynamik stated. I think it was a typo! icon_scratch.gif
  • tmharkinstmharkins Member Posts: 2 ■□□□□□□□□□
    Thanks for the help guys. I thought there was a problem somewhere!
  • WillTech105WillTech105 Member Posts: 216
    Since we're on the topic of subnetting i have a very BASIC question.

    I understand how to subnet, find hosts, subnets, ranges, ect. Theres one SMALL easy math concept that I simply cant get (BTW -- math was my worst subject in HS! :)

    When finding the # of networks or hosts, usually you'll take the 128 64 32, ect. and then find the bit necessary to let you gain how many networks/hosts you'd like.

    Example

    170.50.0.0/16 client wants 1000 hosts.

    The answer was listed as 10 bits (1024) but why cant it be 9 or 8 bits?

    1000
    1024
    -24

    Thats a negative number so wouldn't the correct answer be 11 bits?

    Another example is

    199.9.10.0 client wants 12 hosts

    This is simple...4 bits since

    12
    8
    ----
    4 (not a negative number)

    So i can see the math there works out but not for the other answer above. And no I didnt conclude 4 bits for the above because it 12-8 happens to be 4. I am saying 1000-1024 would result in a negative number so wouldnt it be 11 bits? Did the Dec > Bin calculator and it did give me 10 bits but I dont see the math logic if 1000-1024 gives you a negative number.

    EDIT: I think I solved my problem -- i was going about it the wrong way. Its not a matter of subtraction but a matter of "1024 is higher than 1000 and 512 isnt so the answer is 10 bits". Anyone please let me know if this is the "right" way of going about this -- thanks!
    In Progress: CCNP ROUTE
  • dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    Since we're on the topic of subnetting i have a very BASIC question.

    I understand how to subnet, find hosts, subnets, ranges, ect. Theres one SMALL easy math concept that I simply cant get (BTW -- math was my worst subject in HS! :)

    When finding the # of networks or hosts, usually you'll take the 128 64 32, ect. and then find the bit necessary to let you gain how many networks/hosts you'd like.

    Example

    170.50.0.0/16 client wants 1000 hosts.

    The answer was listed as 10 bits (1024) but why cant it be 9 or 8 bits?

    1000
    1024
    -24

    Thats a negative number so wouldn't the correct answer be 11 bits?

    You'd have 24 (22 if they're asking about usable addresses), not -24. You need to subtract 1000 from 1024; you have it backwards.

    Also, 9 bits will only give you 512 (510), and 8 will only give you 256 (254). I'm not sure why you brought those up since it seems like you have a good enough handle on things to know that.
    Another example is

    199.9.10.0 client wants 12 hosts

    This is simple...4 bits since

    12
    8
    ----
    4 (not a negative number)

    So i can see the math there works out but not for the other answer above. I know it is very basic but if anyone could shed some light on this I'd appreciate it!

    EDIT: And no I didnt conclude 4 bits for the above because it 12-8 happens to be 4. I am saying 1000-1024 would result in a negative number so wouldnt it be 11 bits? Did the Dec > Bin calculator and it did give me 10 bits but I dont see the math logic if 1000-1024 gives you a negative number.

    Where did you get 8 from? I'm not sure what this subtraction strategy is for.

    3 bits will give you 8 (6) hosts, and 4 will give you 16 (14), so 4 is the obvious choice. There's really no need for any other math.
  • WillTech105WillTech105 Member Posts: 216
    ^
    Yeah I think I was going about it the wrong way -- I dont need to subtract to find usable hosts/subnets. I was probably bringing in Dec > Bin conversion which threw me off.
    Thanks
    In Progress: CCNP ROUTE
  • miller811miller811 Member Posts: 897
    ^
    Yeah I think I was going about it the wrong way -- I dont need to subtract to find usable hosts/subnets. I was probably bringing in Dec > Bin conversion which threw me off.
    Thanks

    Please take a look at this subnetting tutorial, if you have not already.

    http://www.techexams.net/forums/ccna-ccent/38772-subnetting-made-easy.html
    I don't claim to be an expert, but I sure would like to become one someday.

    Quest for 11K pages read in 2011
    Page Count total to date - 1283
  • WillTech105WillTech105 Member Posts: 216
    Gotcha -- thanks Miller811.
    In Progress: CCNP ROUTE
Sign In or Register to comment.