@brandon-finlay said in Finding out how to find the # of host's available under subnet mask:
I am a little stumped on the whole equation for finding the amount of host's available on a subnet mask. lets say I have a subnet mask of 255.255.0.0, how would I calculate that if the portion of the host i.d is all 0's? (I am basing this on the fact that if you have a 255.255.0.0 subnet mask the number for X in the equation is 0, which doesn't seem to be correct or is wrong I am uncertain) or if the subnet mask was 255.255.240.0, then it is a classless subnet correct? so How would you determine that as well? thank you in advance :)
The key is understanding what a subnet mask does. The subnet mask helps to identify which portion of the IP address is the NETWORK ID in 32-bit binary numbering. So that means 2 things you need to know...if you do not, you will not understand how to arrive at your question.
Can you convert an IP address into a 32-bit binary number and the subnet mask into a 32-bit binary number?
e.g. Convert 192.168.10.1 into binary = 11000000.10101000.00001010.00000001
e.g. Convert 255.255.0.0 into binary = 11111111.11111111.00000000.00000000
If this is confusing you, then you need to learn to do some decimal to binary conversion training.
Do you know how to do binary ANDing?
e.g., Using a binary ANDing truth table as below.
1100
1010
------
1000
You want to apply that to the given IP address and Subnet mask in the same manner
11000000.10101000.00001010.00000001
11111111.11111111.00000000.00000000
--------------------------------------------------
11000000.10101000.00000000.00000000 = result of binary ANDing shows you that the subnet mask reveals the NETWORK ID = 1st 16bits
The remaining 16-bits are the number of HOST IDs possible = 2^16 = 65,536 -2 = 65,534.
Do not get me wrong, you can know the answer without knowing how to get the answer but that doesn't mean you know what will help you.
If any of the above has confused you. You many want to check out, this older series but explains in detail how to this and why: https://app.acilearning.com/course/ccent-updated-2018/understandapply-ipv4-addressing3