Wednesday, March 9, 2011

Easy Subneting

128      64        32        16        8          4          2          1

To calculate the number of hosts or the number of networks for a given subnet mask, use the following formula:
2^(number of bits used) - 2 = number of networks/hosts (The ‘^’ means ‘raised to the power of’.)
So, given the fact that we have borrowed 2 bits to extend our network, we have 2^2 - 2 = 2 networks (remember, we are excluding the all 1 and all 0 networks).
We have 14 bits left to describe the hosts on each network; therefore we have 2^14 - 2 = 16,382 hosts per network (remember we are excluding host addresses with all 0s or all 1s).

The value of the lowest order bit in the subnet mask tells you two things: a) it tells you the first network ID for the subnets created by the extended subnet mask, b) it tells you the value that you can add to one network ID to arrive at the next possible network ID.
Let’s take our example extended subnet mask of 255.255.192.0. The 3rd octet expressed in binary with the decimal equivalents is:
128 64 32 16 8 4 2 1
1 1 0 0 0 0 0 0
The value of the lowest order bit is 64. Therefore, our first network ID is 172.16.64.0/18. The next and last network ID is 172.16.128.0/18 (64 + 64 = 128)

No comments:

Post a Comment