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
Solved

Find open IP in IP Range

Posted on 2009-05-14
8
966 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RRAS AND DNS 15 61
Samba Question 11 75
Home lab datacenter 9 101
How do i de-activate my Visual Studio 2012 Professional license 3 33
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

856 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