I appreciate the subnetting advice, but I understand how to convert subnet masks from decimal to binary. I just don't understand how to find out how many hosts I will get when I subnet Class A and Class B addresses.
Class C:
192.168.0.0/255.255.255.0
Convert to binary to get number of bits in subnet:
255.255.255.0 = 11111111.11111111.11111111.00000000 (The 1's represents the subnet and the 0's represents the host but you already knew that so let's continue)
Count the number of 1's in the subnet: There are twenty-four(24) 1's in this subnet. Ok so now we go back to our formula. Remember what it was? Sure you do because its right above you. But before we do let's break down our formula.
Why 2^32? ...... Well, binary digits consist of ONLY 1's and 0's hence the phase base 2 when dealing with binary digits. Now here is another question for you. Why is it to the power of 32? ... Let me give you a hint: It has something to do with IPv4. If you answer somewhere along the lines that an IPv4 address is 32-bits then you are correct. 32-bits is the maximum that you can have in a IPv4 address so if you want to subnet your network you would have subtract from that number.
So why "-2"? Every subnet/network has a Network address and a Broadcast address so you have to minus 2 because two of the IPv4 address are reserved and can't be used.
That was long. So here we go. Let's just plug into the formula and go from there.
So we had a class C address of 192.168.0.0 and a subnet of 255.255.255.0 or 24-bits. The formula says to do:
2^32 - 2^24 = 2^8 = 256 (Number of Host) - 2 = 254 (Number of available Host)
If you are wondering how I got 2^8 I used basic math that says whenever the base are the same in this case, 2, you just add or subtract the exponent. Since the base are the same I just subtract 24 from 32 which gives me 8 then just do 2 to that power which gives me 256.
Let's try another one.
172.16.0.0/ 255.255.0.0
255.255.0.0 = 16 bits
2^32 - 2^16 = 2^16 = 65536 (Number of Host) - 2 = 65534 (Number of available Host)
Another one:
175.24.206.0/ 29 (This is easier since the subnet is already converted into bits for us)
2^32 - 2^29 = 2^3 = 8 (Number of Host) - 2 = 6 (Number of available Host)
Note:
When I took my exam in 2010 I actually used Professor Messer's online tutorial found at: http://www.professormesser.com/n10-005/free-network-plu.... Also you can visit my website at: http://www.akITs.net/.