subnet calculation

Discussion in 'Cisco' started by w00, Feb 3, 2007.

1. w00Guest

Hey, i'm making a test for cisco (CCNA01), but im at a question where
i have to calculate subnets.
But im not sure how to do this.

The question is as follows:
A company with a Class B license needs to have a minimum of 1000
subnets with each subnet capable of accommodating 50 hosts. Which mask
below is the appropriate one?

A - 255.255.0.0
B - 255.255.240.0
C - 255.255.255.0
D - 255.255.255.192
E - 255.255.255.224

I know the answer is D (255.255.255.192), but i would really like to
know how i could find out why D is the correct answer.

Thanks for any help.

w00, Feb 3, 2007

2. telecom-gear.comGuest

w00 wrote:

because you need at least all the third octet (255) times 4 (the borrowed
two bits of the fourth one) to accommodate for at least the 1000 subnets
you need. 255.255.255.192 leaves you with 62 useable hosts which is more
than you need.

--

Cheers!
D~
http://www.telecom-gear.com

##-----------------------------------------------#
Retention measured in years a
http://www.telecom-gear.com
comp.dcom.sys.cisco - 33937 messages and counting
##-----------------------------------------------##

telecom-gear.com, Feb 3, 2007

3. ScoobyGuest

FYI....

While 2^n-2 still applies for number of hosts, that is incorrect to use that
formula for the number of subnets. With ip subnet-zero enabled (the
default), you can use the lower and upper subnets, which gives you 2^n. You
may have pulled that information from some older Cisco documentation, as
that used to be the correct answer. Go figure.

Scooby, Feb 3, 2007
4. DrakeGuest

You have a class B address or /16 address so you have
16 bits available for subnetting. a simple formula to help
you determine how many bits to use for subnets and hosts
is:
2^n -2

This implies you need 10 bits for 1000 subnets (2^10 - 2 = 1022)
and the remaining 6 bits will give you enough hosts (2^6 -2 =62)
to cover the stated requirement.