I'd like to share with you a method that I use to find how many subnets
and hosts per subnet you can get from a given mask. This is the fastest
way of calculating and mostly you should be able to do it in your head!
How many subnets?
2^(Total bits - Network bits) = Number of subnets
How many hosts per subnet?
2^(32-Total bits) - 2 = Number of hosts per subnet
Best way of explaining anything is with an example, so let's begin.
Example: How many subnets and hosts per subnet can you get from the network 172.20.0.0/23?
Here's what you do -
Total number of bits = 23 (we know this from /23)
Network bits = 16 (since this is a class B address)
so, 2^ (23-16) = 2^7 = 128 subnets
and now for the Hosts -
2^ (32 - 23) - 2 = 2^ 9 -2 = 512-2 = 510 hosts per subnet
Easy.
Let's try another example, where you're given the subnet in decimal:
How many subnets and hosts per subnet can you get from the network 172.20.0.0 255.255.254.0?
First of all we convert the subnet -
255.255.254.0 corresponds to 8.8.7.0 (you should know the binary to decimal conversion techniques if you're reading this post).
Add them all up 8+8+7+0 and you get 23
So here's what the subnet mask should look like:
172.20.0.0/23
which is exactly the same as the one in the first example! Carry on from
here, without looking above and see if can get it right. Practice more
questions after this and in a few minutes you'll get the hang of it.
Cheers!
Tuesday, December 11, 2012
5
RakshaTec: Number of subnets and hosts
I'd like to share with you a method that I use to find how many subnets and hosts per subnet you can get from a given mask. This is the...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment