Solved

Find open IP in IP Range

Posted on 2009-05-14
8
951 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
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 95

Accepted Solution

by:
Lee W, MVP earned 200 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 100 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
 
LVL 32

Expert Comment

by:Kamran Arshad
ID: 24392703
Hi,

Try out AngryIP Scanner;

www.angryziber.com
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 3

Assisted Solution

by:Johneil1
Johneil1 earned 200 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now