Solved

subnetting question

Posted on 2013-11-30
7
1,611 Views
Last Modified: 2013-12-01
I have a practice lab where its asking me to take an IP address and find the ranges for it with the required number of hosts.

200.1.1.0 (Class C) and requires 40 hosts. I only know the long way to do this but my answer keeps coming out different than answer from the lab.

Lab Answer:
200.1.1.0, break into networks of 40 hosts each
40 hosts = 00101000 (6 bits) Subnet Mask = 255.255.255.192 Increment = 64
Ranges:
200.1.1.0 – 200.1.1.63
200.1.1.64 – 200.1.1.127
200.1.1.128 – 200.1.1.191
200.1.1.192 – 200.1.1.255

My answer (I hope you know the long way):

200.1.1.0, break into networks of 40 hosts each
40 hosts = 00101000 (6 bits)
255.255.255.0 = 11111111.11111111.11111111.00000000
255.255.255.252 = 11111111.11111111.11111111.11111100
                                                                                   (6 bits=252)
Since the last bit used in the last octet above converted from binary is 4, I add the 4th octet in increments of 4 for the results below. Where is my math wrong?
Ranges:
200.1.1.0 - 200.1.1.3
200.1.1.4 - 200.1.1.7
200.1.1.8 - 200.1.1.11


Thanks.
0
Comment
Question by:tolinrome
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 21

Accepted Solution

by:
CompProbSolv earned 167 total points
ID: 39687658
If you are going to need 40 unique addresses (hosts) on each subnet, you will have to round that up to 64 and use a mask of 255.255.255.192 (1111111.11111111.1111111.1100000).  The remaining 6 bits (.xx111111) have a range of 0-63.

Using your (public) addresses, this would allow such subnets as:
200.1.1.0-200.1.1.63
200.1.1.64-200.1.1.127
200.1.1.128-200.1.1.191
200.1.1.192-200.1.1.255

Of course, you have to leave out the addresses on either end as they are reserved.

Technically, you could use a netmask with non-consecutive zeroes to hit the 40 hosts more precisely, but my understanding is that this is no longer supported.
0
 
LVL 7

Author Comment

by:tolinrome
ID: 39687690
Could it be that my results were mistakenly based on requiring 40 networks, instead of hosts?
0
 
LVL 12

Assisted Solution

by:Infamus
Infamus earned 167 total points
ID: 39687743
In addition to CompProbSolv's explanation, I think this should help understand better.

Since you need 40 hosts, below is the increment of number of hosts.

128 64 32 16 8 4 2 1
 1     1   0    0  0 0 0 0

Since 40 will be under 64, the subnet will look like below.

11111111.11111111.11111111.11000000

So it will be 200.1.1.1/26 which is 255.255.255.192

And the useable IP should be 200.1.1.1 - 200.1.1.62.

200.1.1.0 is subnet ID and 200.1.1.63 will be broadcast address.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 25

Assisted Solution

by:masnrock
masnrock earned 166 total points
ID: 39687984
Could it be that my results were mistakenly based on requiring 40 networks, instead of hosts?
Yes. Your answer would be correct had the request been for 40 networks, instead of networks with 40 hosts.

Your error came into trying to build the subnet mask. You got the fact that 6 bits being necessary correct, but your subnet mask reflected the usage of only 2. Rather than having subnets of 64 addresses, you created subnets of 4 addresses.


Here is a way to make it a bit easier...

The number of 1s in a subnet mask = 32 - number of bits necessary for hosts required

So in your case, you need 6 bits for 40 hosts, which leads to this:  32 - 6

The answer to that is 26, meaning that the first 26 bits in your subnet mask should be 1, while the others would be 0.

In binary, this would be your subnet mask: 11111111.11111111.11111111.11000000

Once translated to decimal, the subnet mask would be 255.255.255.252


increment = 2 ^ number of bits needed for number of hosts

6 bits needed for 40 hosts --> 2 ^ 6 = 64

Hosts per network = increment - 2

64 - 2 = 62 (remember that the 2 addresses are subtracted because of subnet ID and broadcast address)
0
 
LVL 7

Author Comment

by:tolinrome
ID: 39688897
Sorry, in my question I wrote that I needed the required number of hosts, but I really needed the required number of networks as per the instructions.

As per the instructions in the lab, the question says:
C - 200.1.1.0 Break into 40 networks

Instructors answer to that question:
200.1.1.0, break into networks of 40 hosts each
40 hosts = 00101000 (6 bits) Subnet Mask = 255.255.255.192 Increment = 64
Ranges:
200.1.1.0 – 200.1.1.63
200.1.1.64 – 200.1.1.127
200.1.1.128 – 200.1.1.191
200.1.1.192 – 200.1.1.255


I still come up with

So with the IP of 200.1.1.0 (40 required networks), I still come up with
200.1.1.0 - 200.1.1.3
200.1.1.4 - 200.1.1.7
200.1.1.8 - 200.1.1.11

The video didn't even get into yet doing subnetting with the required number of hosts, that's the next video actually.

So, either the instructor mistakenly wrote hosts and might have meant networks. Or I'm still confused at this point?

Really all I care about is that I did the formula in the correct way depending on the requirement being the numbers of networks and not hosts.
0
 
LVL 25

Expert Comment

by:masnrock
ID: 39688918
Something is very wrong....

The lab answer you're showing reflect the scenario of needing 40 hosts per subnet. Your answer reflects needing 40 subnets.

Which means either the instructor answered the wrong question or wrote the wrong problem. Or you're looking at the wrong part of the problem.

I normally do not like asking, but could you copy and paste the actual problem?
0
 
LVL 21

Expert Comment

by:CompProbSolv
ID: 39688988
If it really is Class C (first three octets remain constant) and you need 40 networks, then your proposed example is correct.

The approach is similar to what was given above.  You will need 6 consecutive bits (.11111100) to hold the varying part of the network address, which only leaves the last two bits for hosts.  Mixing up decimal and binary for simplicity, it looks like this:

200.1.1.nnnnnnhh  (where "n" is a bit used for the network address and "hh" is the two-bit host address)

The first network would have nnnnnn=000000 so it will range from:
200.1.1.0-200.1.1.3

The second network would have nnnnnn=000001:
200.1.1.4-200.1.1.7

And so on as you listed above.

Keep in mind that this will allow only two hosts because of the exclusions of all 0 and all 1 host addresses.

mansrock is correct about the instructor having made an error if it is as you described.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Building small business network 4 89
Import AD groups from one domain to another 9 32
Bandwidth issues? 5 41
Draytek (Site to Site VPN using IPSec) 6 35
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question