subnet calculation

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. Could someone please help me out with the calculations.

Thanks for any help.

Reply to
w00
Loading thread data ...

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.

Reply to
telecom-gear.com

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.

Reply to
Scooby

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.

Your subnet mask will be /26 or (11111111 11111111 11111111 11000000) 255 . 255 . 255 . (128+64)

Reply to
Drake

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.