1

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.

Pascal
  • 131
  • 1
  • 7
  • Your question is still a specific version of the more general dupe. But, it can serve as an example solution, thus I vote for reopen (although I think probably it won't be enough). – peterh Mar 25 '17 at 12:09
  • Would be nice if the question would be reopened. – Pascal Mar 25 '17 at 13:44
  • Yes. Unfortunately, it is not my decision, instead the community decides with votes. On my reopen review history, around 10% of the reopen votes resulted a reopened question, thus the chances aren't really good. I suggest to re-ask it on the Unix SE (http://unix.stackexchange.com) or on http://networkengineering.stackexchange.com . Although I think the chances are the best on the http://superuser.com . – peterh Mar 25 '17 at 13:56
  • ok I'll give it some time. Because it's an assignment and im not sure if we get good solution, I wanted to ask it here. – Pascal Mar 25 '17 at 13:59
  • Note, your question seems to mix the "host" with the "subnet". You don't want a 310 subnets, you want a mask for a single subnet with 310 hosts. This makes your question unclear. Although a fair answer would make this clear. And yes, a 255.255.254.0 subnet is enough, although it may be better to use a 255.255.252.0 as a precaution for a network growth in the future. – peterh Mar 25 '17 at 14:10
  • The question states, that the "company" wants 310 subnets and not 310 hosts in one subnet. I hope I understood your comment correctly? – Pascal Mar 25 '17 at 14:54
  • Well, the title of the question is wrong then. – Tero Kilkanen Mar 25 '17 at 15:32
  • Oh, sorry. My bad – Pascal Mar 25 '17 at 15:33

0 Answers0