?
Solved

Find open IP in IP Range

Posted on 2009-05-14
8
Medium Priority
?
977 Views
Last Modified: 2012-05-07
Where I work we add new computers to the domain and for a unique computer name we use the last octet of the IP as the last three digits in the computer name. We have different IP ranges for each department. Unfortunately, not much documentation is kept so there is no way of telling which IP is open in any particular range. The lack of documentation makes it extremely difficult to say the least. I'm trying to document the Computer names and IP addresses of the IP ranges I administer so there won't be any IP or AD conflicts. It's busting my rear end but it will save me headaches in the future. I had a former coworker (who I have lost contact) show me how to scan a range of IPs on the network from the CMD line to see which are being used. Using that and looking at my OU in AD I can deduce what IP is open that I can use for a new system I want to put on the network. I had written down the command but I cannot find it. I tore apart my desk at work and home and googled for hours but still have not found anything. If someone can help me out I would really appreciate anything, please. Thanks.

Please keep in mind I cannot use any type of port scanner or third party program on my network.

I really think it was one of these:

nbtstat
nslookup
netsh

Thanks for any assistance you can provide.
0
Comment
Question by:RfromP
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 6

Expert Comment

by:mattyfonz
ID: 24392096
is there any particular reason why you name machines like that? because im sorry to say that is a horrible way to manage computer IPs on the network what happens if the client machine get a different IP address from DHCP? or you change IP ranges for a department?. You mentioned its a domain so im assuming you have DHCP on the server which hands out IP addresses to machines connected to the network. why dont you just open up the DHCP console click on the the DHCP server in the list and look under the address leases tab for spare addresses.
Still, i strongly recommend you change the current way of naming machines, it will cause you massive headaches and overhead in the long run.
0
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 600 total points
ID: 24392099
Question - why aren't you using DHCP?  Maintaining static IPs can be difficult - Also, why can't you check DNS?

Any command line tool will not give a reliable answer because the machines MAY be off or have a firewall... thus it's better to use DHCP or DNS to look up this information.

Now, that said, you can find out which addresses are in use using the command line and a small batch file.  For example, assuming your network range is 192.168.2.50 through 192.168.2.70, you would execute the following command:

for /l %a in (50,1,70) do @ping -n 1 -w 100 192.168.2.%a | find /i "reply"

To break it down, we are saying to loop - (50,1,70) means (start at 50, increment by 1, end at 70) do the ping command, sending one packet (n 1), waiting 100 ms (.1 seconds, -w 100), to the IP address 192.168.2.x, where x is filled in automatically with the numbers from 50 to 70).  Then find in the output of the ping command (while ignoring case - /i) the word "reply".

0
 
LVL 32

Assisted Solution

by:_
_ earned 300 total points
ID: 24392360
You can try NET VIEW
with the /? after it, you can get a couple of  switches if you need them
0
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 32

Expert Comment

by:Kamran Arshad
ID: 24392703
Hi,

Try out AngryIP Scanner;

www.angryziber.com
0
 
LVL 3

Assisted Solution

by:Johneil1
Johneil1 earned 600 total points
ID: 24398264
Try this!!!!

Open Command Prompt and type:

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.0.%i | FIND /i "Reply">>c:\ipaddresses.txt

The "-n 1" is for only 1 ping packet to be sent to each computer.

Change 192.168.0 to match you own Network ID.

This will ping all IP addresses on the 192.168.0.0 network segment and create a text file called IPADDRESSES.TXT in C:\, where it will list only the IP addresses that gave a reply.

You can also add a -a to the PING command to resolve all the responding IP addresses to HOST names, but doing so will cause the script to take a considerable time to finish:

FOR /L %i IN (1,1,254) DO ping -a -n 1 192.168.0.%i | FIND /i "Reply">>c:\ipaddresses.txt

don't forget to type the command in 1 line.
0
 

Author Comment

by:RfromP
ID: 24400619
To mattyfonz:

No where in your post did you offer up a solution, only criticism. I don't own the network so I can only play the hand I'm dealt and I was looking for a solution to my problem, not a critique of the way the network is managed.

To uetian1707:

I don't know what qualifies you as a "Guru" if you can't comprehend what I clearly stated in my question which is that I cannot use any port scanner or third party program on my network.
 
 Thanks to leew, coral47, and Johneil1 for offering real help instead of criticism and a flippant recommendation.
0
 
LVL 32

Expert Comment

by:_
ID: 24400707
Thank you much.   : )
0
 
LVL 6

Expert Comment

by:mattyfonz
ID: 24401114
"open up the DHCP console click on the the DHCP server in the list and look under the address leases tab for spare addresses"
That was the solution i suggested, i wasnt criticizing you just pointing out that the current way of doing things is quite difficult. also if your the administrator of the network now then you do in fact own it in the sense that you can generally make improvements as you see fit. But each to their own, good luck with it all.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
An article on effective troubleshooting
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question