Subnetting question

phfatyphfaty Member Posts: 7 ■□□□□□□□□□
I came across this question in an online subnetting tutorial and was really confused on how to figure it out.

Given an IP address of 131.107.2.160 and a subnet mask of 255.255.255.192, to which subnet class does the host belong?

A. 131.107.2.32
B. 131.107.2.64
C. 131.107.2.96
D. 131.107.2.128
E. 131.107.2.192

How do you calculate this? What formula is used? Can you calculate using

(2^n-2) where n=the number of masked bits in subnet field. n is the number of 1s in the octet for the class that is available for subnetting

(2^y-2) where y=number of off bits in host field. y is bits available for subnetting - n

thanksicon_confused.gif:
A+ IT:03/09
Network+:WIP

Comments

  • dynamikdynamik Banned Posts: 12,314 ■■■■■■■■□□
    Since 2 of the 8 bits are used in the last octet for the subnets, you have 6 remaining for the hosts. Using that you can figure out the ranges.

    131.107.2.0-63
    131.107.2.64-127
    131.107.2.128-191
    131.107.2.192-255

    Once you have those, it's obvious where it fits.

    If you want to learn about the math behind it, research binary ANDing. I have an example here: http://www.techexams.net/forums/ccna-ccent/723-how-do-i-find-valid-host-addresses-subnet-mask.html#post272846 (Just be sure to read the next couple posts for the corrections! icon_lol.gif)
  • phfatyphfaty Member Posts: 7 ■□□□□□□□□□
    Thanks very much for the explanation and the link. This cleared it up for me.
    :)
    A+ IT:03/09
    Network+:WIP
  • DerekAustin26DerekAustin26 Member Posts: 275
    I find it really simple to take the mask "192" and subtract it from 256.
    256-192 = 64 (the difference will always be your block for the octect the mask is in)

    so 0, 64, 128, & 192 will be the subnets

    The block size is 64 so subtract 2 and you get your hosts.
    62

    Subnet 0 Hosts are 1-62 Broadcast 63
    Subnet 64 Hosts are 65-126 Broadcast 127
    Subnet 128 Hosts are 129-190 Broadcast 191

    Subtracting the "mask" from 256 will always give you your block and once you find your block for the octet in question, you should be able to find everything else out from there.

    Good luck
  • nevolvednevolved Member Posts: 131
    I came across this question in an online subnetting tutorial and was really confused on how to figure it out.

    Given an IP address of 131.107.2.160 and a subnet mask of 255.255.255.192, to which subnet class does the host belong?

    A. 131.107.2.32
    B. 131.107.2.64
    C. 131.107.2.96
    D. 131.107.2.128
    E. 131.107.2.192

    255.255.255.192(4th octet is interesting, ie: != 255)
    so
    256-192=64(Block size/increment size)

    131.107.2.128 = subnet
    usable addresses
    131.107.2.129-190
    131.107.2.191 = broadcast


    block size explained:
    so you have 64 with this problem, that means you can have the following subnets:

    0,64,128,192

    you start at 0 and add on the block size to find the subnets

    131.107.2.0
    131.107.2.64
    131.107.2.128
    131.107.2.192
Sign In or Register to comment.