-1

I have around 500 IP addresses. 172.45.67.1 - 172.45.67.200. How do I find the Wifi subnet for these IP addresses? If I could use a java API, that would be great. If not, any other technique to determine the subnet?

rickygrimes
  • 2,637
  • 9
  • 46
  • 69
  • 3
    You cannot have an address 172.45.67.500 as the highest permitted value for an octet is 255 – Eric J. Sep 03 '13 at 16:40
  • Are they guaranteed to all be on the same subnet? Or are you trying to determine that? And if they all look like `172.45.67.x` then you already have the answer (unless the subnet mask is "tighter" than `255.255.255.0`). :) – lurker Sep 03 '13 at 16:40
  • Eric - Sorry it is 172.45.67.200. I will edit my question. mbratch - All these Ip addresses are from the same building. I am not sure if that would mean they will all be on the same subnet. – rickygrimes Sep 03 '13 at 16:44
  • Are there also 500 IP addresses, or 200? If 500, you would need a broader subnet mask to cover them all. – Eric J. Sep 03 '13 at 16:49
  • I would honestly not know that. Can you give me the solution for both 200 and 500? – rickygrimes Sep 03 '13 at 16:51
  • There is no programmatic way to discover how the network administrator decided to set up this network. For all we know, he could put the odd numbers between 77 and 89 on Wifi on Wednesdays only. – tripleee Sep 03 '13 at 17:34
  • take a look here: http://stackoverflow.com/questions/1221517/how-to-get-subnet-mask-using-java should be able to give you the subnet mask. – Doon Sep 03 '13 at 17:37
  • And your question isn't 100% clear. Do you want to find out what has been assigned. or would you like to find out how to subnet a give segment to support 500 IPS? – Doon Sep 03 '13 at 17:38

1 Answers1

0

Your IP range appears to be part of a Class B IPv4 subnet based on the starting octet value 172.

http://en.wikipedia.org/wiki/IP_address#IPv4_subnetting

As such the subnet mask would be 255.255.0.0.

http://www.subnet-calculator.com/subnet.php?net_class=B

A Class B subnet allows for a maximum of 65,536 addresses.

Your building may be allocated just a slice of that subnet by the people administering that subnet. However, there is no way of knowing how much of that subnet is allocated to the building without further information (if there are 500 addresses, they cannot all be allocated from 172.45.67.* as there are only 255 addresses in that range).

Eric J.
  • 147,927
  • 63
  • 340
  • 553