Strange VLSM question

oxzganoxzgan Member Posts: 44 ■■□□□□□□□□
In my LAB one professor asked me for a VLSM question,
It s vlsm subnetting , i thought it would be simple.
the question was
network 20.15.1.0/8

he need me to VLSM subnetting for
a hosts : 600
b hosts : 290
c hosts : 37
d hosts: 1011

May be because of my poor knowledge . i only know subnetting up to 254 hosts( block size ) , for incremnting while subnetting like 126,62,30,14 etc.
How should i solve this question if big numbers came like 600, 1011 in above question ,,,
Plz help me with explanations ..

Comments

  • bermovickbermovick Member Posts: 1,135 ■■■■□□□□□□
    I'm guessing you think you can't go beyond the end of 1 octet and into another, which is why you're stuck at 254 (256-2), but you can. Add another 'host bit' into octet 3 (so you have 11111110 00000000), and you now have 510 hosts (512-2) for netmask 255.255.254.0 or /23 CIDR. Another host bit (11111100 00000000) gives you 1022 hosts (1024-2) for netmask 255.255.252.0 or /22 CIDR.
    Latest Completed: CISSP

    Current goal: Dunno
  • docricedocrice Member Posts: 1,706 ■■■■■■■■■■
    When you borrow a bit from the network side of an address (for example, going from a /24 to a /23), you practically double the net space. Going the other direction, if you borrow a bit from the host side of the address (for example, going from a /24 to a /25), you practically halve the net space.

    /22 = 1024 (and minus 2 to account for the network address and broadcast = 1022 hosts possible)
    /23 = 512 (and minus 2 to account for the network address and broadcast = 510 hosts possible)
    /24 = 256 (and minus 2 to account for the network address and broadcast = 254 hosts possible)
    /25 = 128 (and minus 2 to account for the network address and broadcast = 126 hosts possible)
    /26 = 64 (and minus 2 to account for the network address and broadcast = 62 hosts possible)
    /27 = 32 (and minus 2 to account for the network address and broadcast = 30 hosts possible)

    If you visualize these in terms of Lego block sizes that either double or halve depending on which direction you go, it might make it easier. This is one way I teach subnetting in a casual workshop I set up at work.

    You have to stop looking at subnet masks as four discreet pieces separated by a dot and represented in decimal ... and instead look at it from a binary point of view as a continuous string up to 32 number places.

    So a /24 uses 24 bits for the network portion, which leaves 8 bits for the host side. 2 to the power of 8 is 256 (and the rule is you have to set aside the first value for the network identifier and the last for the broadcast). A /23 has 9 bits for the host side, and 2 to the power of 9 is 512. Then you minus 2. And on and on...

    Your exercise is exactly what I had a couple of people do last week. Provided a block size (say, a 10.1.1.0/25) and a router with 4 interfaces and each network is connects to has x number of hosts, divide that block into the most efficient size possible.

    Once you get it, you get it. Make a chart with all the masks, number of hosts, and slash-notations and stand back and look at it. You might eventually reach that epiphany.
    Hopefully-useful stuff I've written: http://kimiushida.com/bitsandpieces/articles/
  • Forsaken_GAForsaken_GA Member Posts: 4,024
    That's actually pretty easy with a /8 to work with.

    Ok, the first thing is to identify the largest subnet(s) you need.

    You need a /22 for the a hosts, a /23 for the b hosts, a /26 for the c hosts, and another /22 for the d hosts.

    So subtract one from the shortest prefix - that would be a /21. A /21 can be split into 2 /22's. That won't cover your needs, so you need to go up one more, to a /20.

    The /20 can be split into two /21's. The first /21 can be split into 2 /22's. That covers your a and d host (the second /21 will be pretty much ignored, use it for future growth)

    The second /21 can also be split into 2 /22's, so we'll do that. Then the first /22 can be split into 2 /23's, so we'll do that. The first /23 covers your b hosts. The second /23 can be split into two /24's, so we'll do that. Then the first /24 can be split into two /25's. Then the first /25 can be split into two /26's, and there your c hosts are covered.

    And that probably made absolutely no sense :) I can do the full on subnet math if you want to show you what the actual subnets would be, but the concept is basically, as you move right and borrow another bit, you're creating two subnets of the next longest prefix. Ie, if I want to break a /21 down, if I borrow one bit, I create two /22's (binary, everything is a power of 2). Two /22's have the exact same number of IP's in them as a /21, they're just categorized differently.

    You don't have to follow my method above, you could just randomnly pick subnets willy nilly from the IP space, and it'd work as long as you didn't overlap. But if you do follow my method, it's the most efficient way to do it, as it's subnetting to meet your needs, but also keeps the most contigous amount of IP space available as possible in order to meet future addressing needs.
  • oxzganoxzgan Member Posts: 44 ■■□□□□□□□□
    docrice wrote: »

    You have to stop looking at subnet masks as four discreet pieces separated by a dot and represented in decimal ... and instead look at it from a binary point of view as a continuous string up to 32 number places.


    Once you get it, you get it. Make a chart with all the masks, number of hosts, and slash-notations and stand back and look at it. You might eventually reach that epiphany.

    Yes i got it..Your explanation is really helpful.
    Now i got the concept.Your students are lucky to get a teacher like you .

    As per your suggestion i just worked to make a table for masks

    here is my table

    mask block size hosts number
    /16 65536 65534
    /17 32768 32766
    /18 16384 16382
    /19 8192 8190
    /20 4096 4094
    /21 2048 2046
    /22 1024 1022
    /23 512 510
    /24 256 254
    /25 128 126
    /26 64 62
    /27 32 30
    /28 16 14
    /29 8 6
    /30 4 2

    Can you correct me if i am wrong again.

    Thanks You guys
Sign In or Register to comment.