Calculation of the number of hosts per subnet in Class B network
Solution 1
I think a picture of the mask would help... given your example, the bits for the mask 255.255.248.0 would be:
11111111 11111111 11111000 00000000
Which would leave 11 bits for host addressing, hence 2 ^ 11, or 2048. That said, I was unaware until I read a little more on wikipedia that the usage of the zero subnet or all-ones subnet was discouraged initially. So the answer will depend on whether you are reserving those addresses or not.
Solution 2
11111111 11111111 11111000 00000000
is binary representation of 255.255.248.0.
So the formula is the remaining zero is:
The power of 2
minus 2
=maximum number of host per subnet
Our case: 2^11-2=2046
Solution 3
Taking into account the knowledge of subnetting, the bits for the mask would be
11111111 11111111 11111000 00000000
and on the question of maximum number of hosts then one must subtract the network ID from the local Broadcast address.
Using the formula (2^11)-2
then we shall get 2046
to be the maximum number of hosts.
gogo
Updated on July 13, 2022Comments
-
gogo almost 2 years
If a class B network on the Internet has a subnet mask of 255.255.248.0, what is the maximum number of hosts per subnet? (A) 1022 (B) 1023 (C) 2046 (D) 2047
Can anybody pls tell me the logic of how this problem can be solved?
-
gogo over 12 years@ Hoons-Thank you for your reply.The concept is clear now. :)
-
Djizeus over 8 yearsI understand that the accepted answer does not mention explicitly the 2046 solution, but it does say that there is +/-2 difference depending on whether all-zero and all-ones subnets are allowed. Did I miss something?