Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

I'm working with subnet masking and I'm getting re...

I'm working with subnet masking and I'm getting really confused. With the IP address of 192.168.1.0 and a subnet mask of 255.255.255.224, how do they get 8 potential networks and 30 hosts per network? I know that the 255's allow the top number to come down so 192 with a subnet of 255 is 192 because the ones from the subnet have no effect on the IP. But the last part is 224 from 0 so 00000000 with a subnet octet of 11100000 is still 00000000, correct? The 1's bring down the number from the IP (in this case 0's) and where there is a 0 in the subnet, nothing is brought down which is still a 0. Where is the 8 networks coming from? Where are the 30 hosts from? Even if you say the networks come from the open zeros at the end of the IP address, the most significant zero is in the 16 slot.
 
Last edited:
OK, I get where the 30 hosts are coming from. The last five places in the last subnet mask octet (224 dec = 11100000 bin) are zeros so that's 16+8+4+2+0=30. That could also be written as 2 to the 5th power minus 2, correct? I still don't know how or where the 8 networks are coming from.

I think I've got it. My problem is that I'm too used to dotted decimal and not binary. This subnet mask can also be written as 192.168.1.0/27. This shorthand means that there are 27 '1's in the subnet mask. Since the mask always starts from the left, that means the first three octets are 255.255.255. The final octet has 3 '1's in the MSB area which means the octet is 128+64+32=224. Converted to binary, this means we can have 000, 001, 010, 011, 100, 101, 110 and 111 or eight networks with 30 computers on each one. so that's
192.168.1.0/27 (192.168.1.1 - 192.168.1.30),
192.168.1.32/27 (192.168.1.33 - 192.168.1.62),
192.168.1.64/27 (192.168.1.65 - 192.168.1.94),
192.168.1.96/27 (192.168.1.97 - 192.168.1.126),
192.168.1.128/27 (192.168.1.129 - 192.168.1.158),
192.168.1.160/27 (192.168.1.161 - 192.168.1.190),
192.168.1.192/27 (192.168.1.193 - 192.168.1.222),
192.168.1.224/27 (192.168.1.225 - 192.168.1.254)

Is this correct?

Sorry to be long winded about it but I was taught if you can't explain it fully, you don't understand it.
 
Last edited:
Top