Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Suppose that I am in a LAN with the following parameters:

IP:      172.16.20.X
NETMASK: 255.255.252.0
GATEWAY: 172.16.20.1
DNS:     172.16.20.1

In order to connect to my LAN, I have to find, quickly, the first IP available, this means find a value for X which is NOT ALREADY TAKEN by another user of the same LAN.

Which method do you suggest to use?

Assumption: I am using WINDOWS 7 Operating System.

share|improve this question
2  
This is normally done by the DHCP server. Is there some reason you can't use DHCP? –  Flimzy Jun 30 '11 at 8:45
2  
I would post a question about fixing DHCP then :) –  Flimzy Jun 30 '11 at 8:55
1  
Then ask your system administrator which static IP you should use. –  Flimzy Jun 30 '11 at 8:59
1  
The problem with that approach is that to send a ping, you have to already have an IP address that works. –  Flimzy Jun 30 '11 at 9:01
1  
Short of re-inventing DHCP, there's really not an automatic way. I think you're stuck with trial-and-error until your admin returns to fix your DHCP server. –  Flimzy Jun 30 '11 at 9:04
show 7 more comments

5 Answers

up vote 2 down vote accepted

As per our discussion in comments, this is normally done via DHCP. But since you say DHCP isn't working, and your administrator is on vacation, I'm afraid you'll be stuck with some trial and error, as you've already been doing. My advice is to find an IP that works, and keep it, until your admin returns to fix DHCP and/or to assign you a permanent static IP.

share|improve this answer
    
OK, accepted answer. I am stupidly trying to reinvent DHCP ;-) –  UltraCommit Jun 30 '11 at 9:08
1  
for a temp solution, nmap -sP 172.16.20.0/22 | grep scan and pick an unused number –  Sirex Jun 30 '11 at 11:48
    
'nmap' is not recognized as an internal or external command, operable program or batch file. –  UltraCommit Jun 30 '11 at 14:18
    
Assumption: I am using WINDOWS 7 Operating System. –  UltraCommit Jun 30 '11 at 14:18
add comment

Well, that's the whole point of DHCP - which is what you should be using. Considering there's a gateway and presumably a network. Else, its pretty much trying IP addresses till one sticks.

After all, standards are around so we don't have to reinvent things in new, and painful ways.

share|improve this answer
    
Ok, but please describe a method you would use in case of DHCP not working. –  UltraCommit Jun 30 '11 at 8:56
2  
pick a random number between 2 and 255. I'd suggest something in the middle - people tend to pick high or low numbers. –  Journeyman Geek Jun 30 '11 at 9:05
add comment

So quickly find a static ip available, use colasoft's free mac address scanner.

To scan a subnet outside your local one, use lizard systems network scanner or nmap.

share|improve this answer
add comment

Use network inventory advisor trial version or perhaps newt trial version, run a scan of the IP range and whichever IP addresses don't respond - you'll have a good chance that that IP address is not taken :)

share|improve this answer
add comment

Again, everyone is right that you should use DHCP if it is available, but since you asked, here is the range you have available for hosts on that network: 172.16.20.1-172.16.23.254. If you do have to, just find a machine that already has an IP address, and ping something in middle. You are bound to hit a free IP address with 1022 potential host IP addresses on the subnet.

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.