PDA

View Full Version : Apply the 2^n-2 formula


gopal
04-02-2012, 10:33 PM
Hi everyone,

Hope you are fine. I have a question. Not sure why I am not getting this. It looks easy but seems i missed inside he chapter.

In exam essentials part at the end of ch 4 (easy subnetting), seventh edition, one line has been mentioned as Understand and apply 2^-2 formula: use this formula to determine the proper subnet mask for a particular size network given the application of that subnet mask to a particular classful network.

I saw a formula of this sort in order to calculate no. of hosts per subnet. But never knew that i can calculate a subnet mask using this formula:confused: :???:

crissa
04-02-2012, 11:56 PM
Hello,
with subnet mask formula 32 - n and host formula 2^n - 2:

n=0; 32-0 = 32; 2^0 => 1 (no - 2 for only one host)
n=1; 32-1 = 31; 2^1 - 2 => 2 - 2 => 0

n=2; 32-2 = 30; 2^2 - 2 => 2*2 - 2 => 4 - 2 => 2
n=3; 32-3 = 29; 2^3 - 2 => 2*2*2 - 2 => 8 - 2 => 6
n=4; 32-4 = 28; 2^4 - 2 => 2*2*2*2 - 2 => 16 - 2 => 14

Maybe not a good explanation for n=0 and n=1, but it works great for the rest!

HTH!
Bye, Tore