Finding end network range when subnetting

JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
Class B Network: 170.50.0.0 (255.255.0.0)

Need: 1000 Networks

2^10 = 1024, so we need 10 network bits for a mask of:

11111111.11111111.11111111.11000000 = 255.255.255.192

The lowest network bit is 64, so that is our increment.

Network Ranges:

170.50.0.0 - 170.50.0.63
170.50.0.64 - 170.50.0.127
170.50.0.128 - 170.50.0.191
170.50.0.192 - 170.50.0.255
170.50.1.0 - 170.50.1.63
(and so on, and so forth)

Number of Networks = 2^10 = 1024
Number of Hosts per Network = 2^6-2=62

My question is if somebody asked me what the last network range was for the last subnet, how would I quickly find that without going through all of the other networks in between as above in the Network Ranges section?

Comments

  • MrRyteMrRyte Member Posts: 347 ■■■■□□□□□□
    Class B Network: 170.50.0.0 (255.255.0.0)

    Need: 1000 Networks

    2^10 = 1024, so we need 10 network bits for a mask of:

    11111111.11111111.11111111.11000000 = 255.255.255.192

    The lowest network bit is 64, so that is our increment.

    Network Ranges:

    170.50.0.0 - 170.50.0.63
    170.50.0.64 - 170.50.0.127
    170.50.0.128 - 170.50.0.191
    170.50.0.192 - 170.50.0.255
    170.50.1.0 - 170.50.1.63
    (and so on, and so forth)

    Number of Networks = 2^10 = 1024
    Number of Hosts per Network = 2^6-2=62

    My question is if somebody asked me what the last network range was for the last subnet, how would I quickly find that without going through all of the other networks in between as above in the Network Ranges section?
    Here's how I would do it:
    Since that address and subnet cover the entire range from 170.50.0.0 to 170.50.255.255 then I would just simply minus 64 from the last octet in the last address (170.50.255.255) and end up with the host range 170.50.255.192 to 170.50.255.255. Kinda like counting increments backwards. :)
    NEXT UP: CompTIA Security+ :study:

    Life is a matter of choice not chance. The path to your destiny will be paved by the decisions that you make every day.
  • JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
    Counting backwards makes a lot of sense.

    So, in general, to find the last subnet range, set all host bits to 1 which inthis case gives us 170.50.255.255. Then, subtract the increment (64 in this case) from the correct octet (may not always be the last octet, right?).........

    Is this the gist?
  • MrRyteMrRyte Member Posts: 347 ■■■■□□□□□□
    Counting backwards makes a lot of sense.

    So, in general, to find the last subnet range, set all host bits to 1 which inthis case gives us 170.50.255.255. Then, subtract the increment (64 in this case) from the correct octet (may not always be the last octet, right?).........

    Is this the gist?
    Pretty much.icon_thumright.gif

    Now applying that general rule of thumb; see how long it takes you to find the 12th network range from the beginning and 7th network range from the end......icon_wink.gif
    NEXT UP: CompTIA Security+ :study:

    Life is a matter of choice not chance. The path to your destiny will be paved by the decisions that you make every day.
  • JJBladesterJJBladester Member Posts: 38 ■■□□□□□□□□
    MrRyte wrote: »
    Now applying that general rule of thumb; see how long it takes you to find the 12th network range from the beginning and 7th network range from the end......icon_wink.gif

    7th Network from Beginning:

    170.50.0.0
    170.50.0.64
    170.50.0.128
    170.50.0.192
    170.50.1.0
    170.50.1.64
    170.50.1.128

    12th Network from End:

    170.50.255.192
    170.50.255.128
    170.50.255.64
    170.50.255.0
    170.50.254.192
    170.50.254.128
    170.50.254.64
    170.50.254.0
    170.50.253.192
    170.50.253.128
    170.50.253.64
    170.50.253.0

    I just realized I gave you the opposite of what you asked, but this should show that I (hopefully) understand the concept. :)
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    That works for things near the beginning or the end of the range, but what if you want to find something in the middle?

    I'd do this another way.

    Let's say I wanted to find the 519th subnet.

    Well, our range increments on the 4th octet, and our range is 64, but our masking also allows us to increment on the 3rd octet for subnetting purposes (not host addressing purposes).

    So then logically thinking, how many increments on the 4th octet does it take to get to increment the 3rd? Answer, 4 - every 4 subnets will increment the 3rd octet by one.

    So if I divide 519 by 4, I get 129.75. So I'm incrementing the 3rd octet 129 times. The .75 = 75% towards another full increment, or 3 increments on the fourth octet

    So the 519th subnet is 170.50.129.128

    Applying this to the earlier question -

    the 7th network from beginning 7 / 4 = 1.75, so one increment on the 3rd octet, 3 on the 4th = 170.50.1.128

    12th network from the end = 1024 - 12, so we're looking for the 1012th network.

    1012 / 4 = 253, so 253 increments on the 3rd octet, none on the 4th = 170.50.253.0

    Note: I just developed this method while reading the problem. Binary math is easy and fun when you understand how it works.
  • MrRyteMrRyte Member Posts: 347 ■■■■□□□□□□
    ^^^^ Interesting...never thought of doing it that way. icon_surprised.gif

    Thanks Forsaken. icon_thumright.gif
    NEXT UP: CompTIA Security+ :study:

    Life is a matter of choice not chance. The path to your destiny will be paved by the decisions that you make every day.
  • wavewave Member Posts: 342
    Know your multiples of 8, 16, 32, 64 up to 256 :] You'll be able to subnet waaaaay faster if you know these.

    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
  • mella060mella060 Member Posts: 198 ■■■□□□□□□□
    wave wrote: »
    Know your multiples of 8, 16, 32, 64 up to 256 :] You'll be able to subnet waaaaay faster if you know these.

    Very sound advice !! Know your multiples. In your example, you know that the value in the 3rd octet will be incrementing by 1 so just jump to 255 and start from there.

    Go up by increments of 64 in the 4th octet.

    255.0
    255.64
    255.128
    255.192

    And there you have it. Last subnet is 170.50.255.192...

    Binary math is easy and fun when you know how
  • 2URGSE2URGSE Member Posts: 220 ■■■□□□□□□□
    Just use the magic # strategy fro Wendel Odom.

    170.50.0.0/26

    170.50.0.0
    255.255.255.192


    If subnet value = 255, then leave the # alone.

    If subnet value = 0, place a zero

    If subnet value =! 0 or 255, that's your magic octet. In this case it's 192.

    256-192 = 64, which is the "magic #"

    You need to get to '0', 64 is too big, so 170.50.0.0 is your first valid subnet.

    Next valid subnet will be 170.50.0.64

    then

    170.50.0.128, etc.

    You don't need to fiddle around with binary for that type of question, it's a waste of time.
    A+
    Network+
    CCENT (formally CCNA certified)
    ICE (Imprivata Certified Engineer)
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    2URGSE wrote: »
    You don't need to fiddle around with binary for that type of question, it's a waste of time.

    You don't have to do any binary conversions, but whether you know it or not, you're still fiddling around with binary, since everything involved is powers of 2.
  • 2URGSE2URGSE Member Posts: 220 ■■■□□□□□□□
    You don't have to do any binary conversions, but whether you know it or not, you're still fiddling around with binary, since everything involved is powers of 2.


    However you want to slice it, after studying for the CCNA last year and taking the exam the first time, I just know the basics of binary, but I don't use it directly to figure these things out.
    A+
    Network+
    CCENT (formally CCNA certified)
    ICE (Imprivata Certified Engineer)
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    2URGSE wrote: »
    However you want to slice it, after studying for the CCNA last year and taking the exam the first time, I just know the basics of binary, but I don't use it directly to figure these things out.

    Binary just means base2, so everything is a power of 2, you know more than you think :)
  • 2URGSE2URGSE Member Posts: 220 ■■■□□□□□□□
    Binary just means base2, so everything is a power of 2, you know more than you think :)


    I will PM you. :)
    A+
    Network+
    CCENT (formally CCNA certified)
    ICE (Imprivata Certified Engineer)
  • andy4techandy4tech Member Posts: 138
    You mean what the host range is for the last subnet?
Sign In or Register to comment.