My apologies, I made an error in my explanation. Let me clarify:
First of all, yes the binary I showed was incorrect. It should be
So going back to the original question, you are given an IP address of 172.30.0.0 as your starting address and you want to create equal subnets with a subnet mask of 255.255.255.240. Now what’s confusing here is that we have three different ways of describing the IP address ranges involved. We have:
- The mask bits of the class B private IP address range which is /12
- The classful mask of the private IP address range which is /16
- The subnet size we want to obtain using the subnet mask we are given which is /28 (same as 255.255.255.240)
The first of the three describes the full range of private Class B IP addresses. So 172.16.0.0/12 is the same as saying 172.16.0.0 - 172.31.255.255. This describes the whole range. There is only one such range.
The second gives us the subnet mask to be used if CLASSFUL addressing will be used which is /16 or 255.255.0.0. Here we can say that in the whole range of class B private addresses, there are multiple Classful subnets we can create. Namely:
The third is what we want to end up with, which is small subnets of /28 which is the same as a subnet mask of 255.255.255.240. These were described in a previous post.
So, if you are originally given 172.30.0.0 and you are told that this is a class B private range, and you want to separate this into subnets of /28 then:
You are starting with 172.30.0.0/16 (class B) which means addresses from 172.30.0.0 to 172.30.255.255. Going to binary, we have:
where once again, the italics are the subnet and the bold are the host. The italics are 12 bits, so 2^12 = 4096. We have 4096 subnets each containing 16 (14 without network and broadcast) hosts.
Note that in your image of the IP subnet calculator above, you are using a subnet mask of 255.255.255.248 rather than 255.255.255.240 and this is why you get a value of 8192 and not 4096 for the maximum number of subnets.
I hope this has been helpful!