my query is that what is the maximum no of host's are possible for Private network in class wise. i.e i want to know No of Private host's in CLASS A,B,C? how to calculate these no?
1 Answer
For classful networks, the available addresses are given by the Wikipedia page on Classful Networks.
Class A = 16,777,214
Class B = 65534
Class C = 254
The Wikipedia page also discusses the calculation:
The number of addresses usable for addressing specific hosts in each network is always 2N - 2, where N is the number of rest field bits, and the subtraction of 2 adjusts for the use of the all-bits-zero host portion for network address and the all-bits-one host portion as a broadcast address. Thus, for a Class C address with 8 bits available in the host field, the number of hosts is 254.
As Zac67 points out in the comments, /31 subnets differ in the calculation as there is no network and broadcast address. With /32 a single host is defined. These subnets are not available in classful networks but I'm adding them here for completeness.
It's worth noting that nobody uses classful networks anymore.
-
it's 2^n-2 for /0 to /30. /31 has no subnet and broadcast addresses, leaving 2 usable host addresses– Zac67 ♦Commented Apr 19, 2018 at 11:20
-
@Zac67 You are correct; however, the question and the Wikipedia page talk about classful addressing in which /31 subnets are not possible. Classful addressing is useless and shouldn't be taught anywhere outside history lessons. Commented Apr 19, 2018 at 19:54