Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know what the magic number of a network is. I know how to compute it - 2 ^ ((32 - n) % 8). I know what it's used for and how to use it.

I don't how how to define it formally. In a recent interview I was left speechless after being asked to deliver a one line definition of the magic number of a network, which made me feel rather stupid.

share|improve this question
    
You didn't want to work for them anyway. –  Tom O'Connor Mar 9 '13 at 16:15
add comment

closed as not constructive by MadHatter, Dave M, mgorven, Khaled, Tom O'Connor Mar 9 '13 at 16:15

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

up vote 5 down vote accepted

No need to feel stupid, it is the sort of term that only comes from a text book and not the real world. Everything is derivable from just the IP and subnet mask, you can quite happily be an expert in subnetting without even having heard of it.

It is basically the number not covered by the mask, ie. the number of IP addresses in each subnet. (although remember from that you then lose the network and broadcast addresses)

If you don't want to simply AND the IP with the mask, then you can work out the start of the subnet by writing down multiples of this number. Personaly I find that a long way round.

share|improve this answer
    
The magic number is the number of IP addresses in each subnet if and only if the number of bits for the network id is greater than 24 right? –  Aadit M Shah Mar 9 '13 at 1:49
    
For larger networks you simply apply the same technique to the 'interesting' (ie. not 0 or 255) octet. So if it was the 3rd octet then it would be the number of IP addresses divided by 256. –  JamesRyan Mar 10 '13 at 1:27
add comment

For a one sentence answer, I would say: "The magic number is a number used to help determine the network and broadcast addresses for a network, when given just an IP and netmask."

share|improve this answer
add comment

The magic number is the number of IP addresses in each subnet.

share|improve this answer
add comment

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