Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How does IPv4 Subnetting Work?

The largest subnet has 300 hosts so I am trying to workout the number of host_id bits I require for the mask but I am confused as each octet goes to 255 max? So do I carry on in the next octet starting from one. This way I have come to the following subnet mask please check it is correct: Subnet Mask:

The supernet mask is then straight forward I assume I have used 14 bits for host_id I have 10 subnets on the intranet including leased lines but I did not include the ATM switch as I believe it is just a switch forwarding packets so not separate subnet is that correct?

OK so 10 subnets that means I need 4 bits, so add 4 + 14 host_id bits = 18

32-18 = 14 subnet_id bits, 2^(32-14)= 262144 possible address

So I have Subnet Mask = and Supernet Mask = /14

Is this calculation accurate? I am confused. Thanks

share|improve this question

marked as duplicate by MadHatter, Evan Anderson, longneck, Michael Hampton, kce Jan 14 '13 at 17:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

You should learn to count in binary. It's fun. – Evan Anderson Jan 14 '13 at 17:06
Yeah its great fun thanks a lot the the help. Real useful, wise guy. – Jatinder Singh Jan 14 '13 at 17:51
I was being serious. You need to learn how to count in binary. Then you can solve arbitrary subnetting problems (and lots of other computer-related problems) versus treating it as a black box and just asking for help. It's all addition and subtraction of whole numbers. – Evan Anderson Jan 14 '13 at 17:53
Yay! @EvanAnderson 's back! Answer a bunch of questions, man, you've deprived us too long! – Ward Jan 14 '13 at 22:10
@Ward: You flatter me... I stopped by briefly today to answer some questions to blow off steam. Unfortunately work has me absolutely hammered, and where work doesn't soak up all my time increasing personal obligations do. I miss Server Fault, and I think about it frequently. >smile< I keep telling my wife "I gotta get some time to work on Server Fault or I'm gonna lose!" – Evan Anderson Jan 15 '13 at 0:00

For your 300-host network, it appears to me that you need or a /23 . That would give you approx 510 IP addresses.

I can't follow the paragraph about the "supernet mask", so I can't answer that question.

share|improve this answer
Please can you explain how you only got I assume you are starting from 2^8 for the first octet and then doubling that with the first bit in the next octet. OK that makes sense I think you are correct so that makes my supernet bit incorrect as I only need 9 host_id bits – Jatinder Singh Jan 14 '13 at 17:42
This forum is useless I want simple straight answers and you close it and say it is exact duplicate of some random FAQ talking about IPV4 sub-netting seriously? Just help a person out please. – Jatinder Singh Jan 14 '13 at 17:50
As others have said, you need to learn binary. An IP address has 32 bits. If you have 300 hosts, you require 9 bits to uniquely address them all. 32-9 is 23. A 23-bit netmask is – hymie Jan 14 '13 at 18:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.