How to find Subnets and Hosts from given IP


I have been learning subnetting for my exam and I came through this question.
enter image description here

but why it this? I first thought: can have 254 subnets and 254 Hosts per each subnet. I obviously was wrong. can you please explain me how to get this?

thanks guys

Best Solution

The netmask has 10 zero bits at the end.
2 ^ 10 = 1024, minus a broadcast and a network address = 1022.

If you're using the classful way of dividing your network, 172.20.* is a B network, with a 16 bit size of the network part. That gives 16-10 = 6 bits to spare, that can be split into 2 ^ 6 = 64 networks.

Related Question