A simple way to calculate the Hosts of a subnet:

- Observe the prefix ( for example /27 )

11111111.11111111.11111111.111 00000
-------------network----------------- --hosts--

.1 1 1 0 0 0 0 0
.128 64 32 16 8 4 2 1

- So, the five hosts binary digits changed from 0 to 31 for each subnet .

- 0 and 31 are invalid, why? the first IP is the ID and last IP is Broadcast.

- So, the valid IP's are from 1 - to - 30 ( for each subnet ).

- The subnets will be from 001 -to- 111 ( if subnet zero is permitted )
which means = 32 -to- 224 ( 8 subnets )


- Examle :

- Specify the valid Hosts of this subnet : 192.168.20.19/28

- Answer :

/28 = 11111111.11111111.11111111.1111 0000

- 19 = 0001 0011 --- so the network id=0001 = 16

- hosts= from 192.168.20.17 - to - 192.168.20.30 ----and 192.168.20.31 is broadcast


أسألكم الدعاء لي ولوالدي