So we have one task which is to calculate the subnet mask for 310 subnets. The IP of the company is 102.0.0.0
.
I think the right approach would be to solve this equation 310 < 2^x
which gives me approximately 8.27
so I would need 9 bits
, which would make the subnet mask like this 255.255.128.0
.
The question is that if this is correct, which would be the first subnet and which IP Addresses would be assigned to the first and the last of the subnet?
I am asking this because I am not sure how to get all the 310 subnets. If I look at the subnet mask on a bit level I get :
1111 1111 1111 1111 1000 0000 0000 0000
--------- -----------|----------------|
net id host id
Our teacher explained that the first subnet would be as the following :
1111 1111 0000 0000 1000 0000 0000 0000
The second would be :
1111 1111 0000 0001 0000 0000 0000 0000
And the third would be :
1111 1111 0000 0001 1000 0000 0000 0000
Is that correct?
If yes so, I calculated the following for the first and the second subnet :
102. 0. 0. 0
255.255.128. 0
IP 0110 0110 0000 0000 0000 0000 0000 0000
SN 1111 1111 1111 1111 1000 0000 0000 0000
IP 1111 0000 0000 0000 1000 0000 0000 0000
IP 1111 0000 0000 0000 1111 1111 1111 1111
102.0.128.0
102.0.255.255
IP 1111 0000 0000 0001 0000 0000 0000 0000
IP 1111 0000 0000 0001 0111 1111 1111 1111
102.1.0.0
102.1.127.255
Please let me know if anything is wrong.