Use this table to help you calculate Subnet Masks, available hosts per subnet or number of subnets per class. The table deals with Subnetting of only one octet.
|# of Masked bits||# of Non-masked bits||Bit pattern||# of subnets =2^M||What will the new subnet mask be?||# of hosts per subnet (C Class) =[(2^N)-2]||# of hosts per subnet (B Class) =[(2^N)-2]||# of hosts per subnet (A Class) =[(2^N)-2]|
M=Number of Masked bits
N=Number of Non-masked bits – Remember that in Class A and B networks you have other octets besides the one you’re subnetting. Therefore in a Class A network instead of saying 7 (for example) you must say 7+8+8. In a Class B network instead of saying 5 (for example again, duh!) you must say 5+8. Only in Class C networks does the N value remain the same.
|Starting bits for the first octet||How many networks per Class?||How many hosts per network?||Range of the first octet|
|Class A||0||126||(2^24)-2=~16 Million||1-126||127=Loopback|
|Class C||110||2^21=~2 Million||(2^8)-2=254||192-223|
How many potential IP addresses do we have?
126 networks of 16,777,214 hosts each = 2,113,928,964
16,384 networks of 65,534 hosts each = 1,073,709,056
2,097,152 networks of 254 hosts each = 532,676,608
Total number of hosts = 3,720,314,628
Note: In Windows NT 4.0 you had to subtract 2 from the total number of available subnets. For example, if you wanted 2 subnets, you had to figure the number you wanted plus 2 – calculate like you wanted 4, i.e. the result would have been 192. If you wanted 8 subnets, you had to calculate like you wanted 10, i.e. the result would have been 240 instead of 224. With Windows 2000 and beyond Subnetting you do not have to do that anymore.
BTW, if you need to calculate Subnet Masks and Network IDs and you can’t do it yourself (Duh, “Paper MCSE” or not?) you should try this fantastic Subnet Calculator right here:
It not only calculates the required fields but also pops out a window that draws the bit pattern and explains the results. Great resource!