Options

Subnetting question

earweedearweed Member Posts: 5,192 ■■■■■■■■■□
What's the easiest way to sove this question and what do the subnets look like.
IP Address 192.168.10.0
You need 5 subnets:
150 hosts
90 hosts
30 hosts
20 hosts
10 hosts
This is a general question. If it can't be done with the number of hosts given adjust them. I just want to understand how to do this sort of problem.
No longer work in IT. Play around with stuff sometimes still and fix stuff for friends and relatives.

Comments

  • Options
    chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    earweed wrote: »
    What's the easiest way to sove this question and what do the subnets look like.
    IP Address 192.168.10.0
    You need 5 subnets:
    150 hosts
    90 hosts
    30 hosts
    20 hosts
    10 hosts
    This is a general question. If it can't be done with the number of hosts given adjust them. I just want to understand how to do this sort of problem.

    I'm a little peeved because I had a long explanation for you and accidentally closed out of the tab. I'll try and write out another one for you.

    Because of the amount of hosts you need (more than 254 and less than 510) I would suggest using 192.168.10.0/23 as your major network. You need to use VLSM to narrow it further.

    The process is to first organize the hosts needed from smallest to largest. Sometimes the numbers will have a label with them, eg Network B. It is important to keep this lable with you while you subnet, as Network B might not be second on the list. In this case, it wont matter:

    A: 150 hosts
    B: 90 hosts
    C: 30 hosts
    D: 20 hosts
    E: 10 hosts

    Take the highest host you have, and figure out how many bits you need to borrow to have the least amount of waste. 150 is more than 128, and less than 256. So /24 is the best option:

    192.168.10.0/24 |192.168.10.1 - 192.168.10.254 |192.168.10.255

    From there we take 90:, which is more than 64 and less than 128. So /25 is the best option:

    192.168.11.0/25 |192.168.11.1 - 192.168.11.126 |192.168.11.127

    Next is 30, which is more than 16 and less than 32. It should be noted that 30 is the most usable hosts a /27 mask can hold, since it has 32 addresses and one needs to be used for the network and one needs to be used for the broadcast. You should keep this in mind since cisco always wants you to think about scalability.

    192.168.11.128/27 |192.168.11.129 - 192.168.11.158 |192.168.11.159

    Then 20, which falls in the same range as 30:

    192.168.11.160 /27 |192.168.11.161 - 192.168.11.190 |192.168.11.191

    And last but not least 10, which is more than 8 and less than 16. So we use the /28 mask.

    192.168.11.192 /28 |192.168.11.193 - 192.168.11.206 |192.168.11.207

    So we end up with:

    A:192.168.10.0/24|192.168.10.1 - 192.168.10.254 |192.168.10.255
    B:192.168.11.0/25 |192.168.11.1 - 192.168.11.126 |192.168.11.127
    C:192.168.11.128/27 |192.168.11.129 - 192.168.11.158 |192.168.11.159
    D:192.168.11.160/27 |192.168.11.161 - 192.168.11.190 |192.168.11.191
    E:192.168.11.192/28 |192.168.11.193 - 192.168.11.206 |192.168.11.207
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • Options
    alan2308alan2308 Member Posts: 1,854 ■■■■■■■■□□
    I'll walk you though this because I haven't done enough subnetting lately and I can use the practice. icon_mrgreen.gif

    Is there a subnet mask with the 192.168.10.0 that we have to work with? For example, if it's 192.168.10.0/24, its not big enough as you'll soon see with the very first subent. But we can still go through this if we assume we have a big enough chunk to work with.

    Start with the largest number of hosts, 150 and figure out the smallest subnet that will accommodate that. If we pick a /24, that gives us room for 254 hosts, and if we pick a /25 we have enough room for 126 hosts, so we have to go with the /24 here (150 is bigger than 126 and won't fit). So our first subnet is 191.168.10.0/24.

    The second subnet is 90 hosts, so again we have to look at what that will fit in. A /25 is 126 hosts, a /26 is 62 hosts so we go with the /25 and our second subent is 192.168.11.0/25 (remember that our first subnet took the entire 192.168.10.0 so we have to go up to 11 now).

    The third calls for 30 hosts, which will fit into a /27 exactly. Now here's where it gets interesting. The second subnet, 192.168.11.0/25 goes from 192.168.11.0 through 192.168.11.127 (for 128 total addresses) so we need to start this subnet at 128. So the subnet is 192.168.11.128/27. This subnet covers 192.168.11.128 - 192.168.11.159, so the fourth subnet will start at 160, but I'm going to leave something for you to try. So here's the first three subnets:

    192.168.10.0/24
    192.168.11.0/25
    192.168.11.128/27



    This is a very basic exercise, and working with subnets gets a lot more interesting, to say the least. And like anything mathematical, there's many different ways to attack subnetting. All the different CCNA book authors have their preferred method, the CBT nuggets videos have their preferred method, and a lot of people like the way its presented on learntosubnet.com. Look at a couple different ways of doing it and figure out what makes the most sense to you. Then practice, practice, practice and then practice some more.



    Edit: and chmorin beats me to the punch again. :)
  • Options
    chmorinchmorin Member Posts: 1,446 ■■■■■□□□□□
    alan2308 wrote: »
    but I'm going to leave something for you to try. So here's the first three subnets:

    192.168.10.0/24
    192.168.11.0/25
    192.168.11.128/27

    Haha well I like your idea of giving him something to try:

    I am given 172.16.0.0/16 to work with. I have the following hosts needed:

    A:500
    B:70
    C:780
    D:210
    E:118

    Keep the same logic as described above, but keep in mind that the larger the number, the more room you need in the subnet. I'll get you started:

    Organize:

    C: 780
    A: 500
    D: 210
    E: 118
    B: 70

    For network C, it is larger than 512 and less than 1024, so we need a /22 subnet mask:

    C: 172.16.0.0/22 | 172.16.0.1 - 172.16.3.254 | 172.16.3.255

    That should be enough to get you going. Have at it!
    Currently Pursuing
    WGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)
    mikej412 wrote:
    Cisco Networking isn't just a job, it's a Lifestyle.
  • Options
    alan2308alan2308 Member Posts: 1,854 ■■■■■■■■□□
    I also highly recommend Stretch's subnetting **** sheet while you're learning. Well, all of his **** sheets actually. I had them all printed out while I was taking the CCNA Exploration classes, and I referred back to them a lot more than anything else.

    **** Sheets - Packet Life
  • Options
    earweedearweed Member Posts: 5,192 ■■■■■■■■■□
    Just had a question just like this on a measure up test and missed it. wrote it down and figured the right answer after I was done with the test. This was on a measure up for the MCTS 70-642. Just different address and # of hosts.
    Came back here to see if I had done it right the second try.
    No longer work in IT. Play around with stuff sometimes still and fix stuff for friends and relatives.
  • Options
    earweedearweed Member Posts: 5,192 ■■■■■■■■■□
    I've done several of these type questions now and the flash cards I've used and the **** sheet have been a great help. Some of the easier questions I can now do in my head (though I still write them down) and verify.
    No longer work in IT. Play around with stuff sometimes still and fix stuff for friends and relatives.
  • Options
    zerglingszerglings Member Posts: 295 ■■■□□□□□□□
    I learned this technique from my CNAP instructor so I don't take credit from this. You probably already know this technique so I apologize. But, I'll post it anyway just in case someone may need this.

    When I took my CCNA, I wrote this down to my scratch paper right before my exam. I have more actually but this was helpful during subnetting questions.

    2048 1024 512 256 128 64 32 16 8 4 2 1

    Now, you can use these numbers to find out the available hosts by looking at the number that is close to the given number and the number right next to it. From your example, 90 hosts needed. 90 is pretty close to 64 and 128 so which one do we actually use? Well, we know that if we use 128 you'll end up 256 addresses so you're wasting IP addresses. If you use the 64, you'll get 128 addresses that said this is the magic number. If you noticed, each time I picked the number like (12icon_cool.gif right next to is 256 right? That is actually the sum of all the numbers including 128 right down to 1. Well, actually it isn't because it is missing one number which is 0. You need to include 0 in the count.

    Let's pick another number from your example which is 30. The given number is close to 32 but as what you've previously read picking the 32 value is actually a total of 64 addresses (of course, you need to deduct two for the network and broadcast address). The right number is actually 16 because of the fact that the sum of all number from 16 to 1 is 31 (as mentioned, you need to add the 0 to make it 32).

    Now, if the question is asking for the slash value then what you need to do is add all the given numbers and use the numbers above to find out the answer. So, 150 + 90 + 30 + 20 + 10 = 300. Use the same technique in finding out the answer. In this case, you'll pick the 256 value because of the fact that it'll give you 512 addresses and so the slash value for this is /23.

    HTH
    :study: Life+
  • Options
    phobophilephobophile Member Posts: 34 ■■□□□□□□□□
    chmorin wrote: »
    Haha well I like your idea of giving him something to try:

    I am given 172.16.0.0/16 to work with. I have the following hosts needed:

    A:500
    B:70
    C:780
    D:210
    E:118

    Keep the same logic as described above, but keep in mind that the larger the number, the more room you need in the subnet. I'll get you started:

    Organize:

    C: 780
    A: 500
    D: 210
    E: 118
    B: 70

    For network C, it is larger than 512 and less than 1024, so we need a /22 subnet mask:

    C: 172.16.0.0/22 | 172.16.0.1 - 172.16.3.254 | 172.16.3.255

    That should be enough to get you going. Have at it!

    Oooh oooh! I just learned subnetting today from CCENT CBT Nuggets. I was quite intimidated by everything I heard from other people, but I believe to find it quite easy?

    I'll continue from where you left off.

    C: 172.16.0.0/22 | 172.16.0.1 - 172.16.3.254 | 172.16.3.255

    The next network is A (500 hosts). 500 is more than 256, but less than 512, so it has a /23 subnet mask. The lowest increment is 2, in the 3rd octet.

    A: 172.16.4.0/23 | 172.16.4.1 - 172.16.5.254 | 172.16.5.255

    Network D (210 hosts) is up next. 210 is more than 128, less than 256. Has a /24 Subnet mask. The increment is 1, in the 3rd octet.

    D: 172.16.6.0/24 | 172.16.6.1 - 172.16.6.254 | 172.16.6.255

    Network E has 118 hosts. 118 is more than 64, but less than 128. Has a /25 Subnet Mask. The increment is 128, in the last octet.

    E: 172.16.7.0/25 | 172.16.7.1 - 172.16.7.126 | 172.16.6.127

    Finally, Network B has 70 hosts. 70 is more than 64, but less than 128. This also has a /25 Subnet Mask. The increment is again 128, in the last octet.

    B: 172.16.7.128 | 172.16.7.129 - 172.16.7.254 | 172.16.7.255

    So in summary:

    C: 172.16.0.0/22 | 172.16.0.1 - 172.16.3.254 | 172.16.3.255
    A: 172.16.4.0/23 | 172.16.4.1 - 172.16.5.254 | 172.16.5.255
    D: 172.16.6.0/24 | 172.16.6.1 - 172.16.6.254 | 172.16.6.255
    E: 172.16.7.0/25 | 172.16.7.1 - 172.16.7.126 | 172.16.6.127
    B: 172.16.7.128/25 | 172.16.7.129 - 172.16.7.254 | 172.16.7.255

    I hope I'm right :D
Sign In or Register to comment.