This command will report all the IP addresses, whether in use or not; you'll also have to scroll through a vast number of entries on the command line. You can avoid these inconveniences with a short batch file that returns only those IP addresses that aren't in use, and then compiles the results in a text file. Here's how:
- Launch Notepad and type the following commands:
@Echo off
date /t > IPList.txt
time /t >> IPList.txt
echo =========== >> IPList.txt
For /L %%f in (1,1,100) Do Ping.exe -n 2 192.168.1.%%f Find
"Request timed out." && echo 192.168.1.%%f Timed Out >>
IPList.txt && echo off
cls
Echo Finished!
@Echo on
Notepad.exe IPList.txt - Save the file as IPTracker.bat and close Notepad.
Keep in mind that the entire For…In…Do command consists of several commands strung together with &&s. The command begins with the word For and ends with the word off, and the entire command must be on one line. Also, be sure to replace the example numbers with numbers from the IP addresses you wish to track.
Now when you troubleshoot a DHCP problem, you can locate and double-click the IPTracker.bat file in Windows Explorer, and then launch an IP address tracking tool batch that will find only those addresses that aren't in use and then display the results in Notepad. (In this case, the saved batch file becomes an IP address tracking tool that can be created once and used over and over.)
Note: This tip applies only to Windows XP Professional.
0 comments:
Post a Comment