Subnetting in Decimal (Fast Way)

Palani,
Short answer: Everything you have is correct. For any given subnet mask, the block size is always the same.

People do subnetting many different ways. I haven’t heard of others doing it my way, but it works for me. I thought I might share with you how I can do subnetting very fast in my head–no calculators or even pencil and paper required.

I use the formula 2^X >= Y, which reads as 2 to the Xth power is greater than or equal to Y. Y is the number of hosts (or subnets) you are trying to figure out, and X is the variable you are trying to solve for. Let’s walk through one of your examples: 47 hosts. In this case we know that Y = 47. So now we have to figure out what power of 2 is as close to 47 as possible, but cannot be less. Two to the fifth power is 32, so that’s too small. How about 6? Two to the sixth power is 64–so that’s our answer: X = 6.

So what does X do for you? A lot! Once you solve for X, you can easily figure out two things:

  1. The network block size (the range of each subnet): This is simply 2^X, which in our case is 64. This means that your subnet ranges would be…
    0 - 63
    64 - 127
    128 - 191
    192 - 255
    Notice how on the left column above, I just increase the number by the block size? Easy!

  2. The subnet mask. You will have to know which octet you are trying to figure out (in this case it is the last octet). To figure out the mask, simply subtract 2^X from 256–so in this case it would be: 256 - (2^6) = 256 - 64 = 192. Now you know the subnet mask will be 255.255.255.192. Easy!

1 Like