Find out if the IP address has not been used in the LAN

  

Computer Shop News:

As a network administrator, or find a favorite intranet IP address in your company LAN, or when we solve the DHCP failure of the Windows operating system, sometimes To find out which addresses are not being used within an address range. At this point, you can open a command prompt window and call the ping command in the For…in…Do loop. For example, to find out which addresses are not used in the address range 192.168.1.1 to 192.168.1.100, you can use this command: For /L %f in (1,1,100) Do Ping.exe -n 2 192.168.1.% f

This command reports all IP addresses in the specified range. Whether it is used or not, the user has to scroll through a large amount of content in the command line window.

In fact, we can avoid these troubles, just create a batch file, ask it to return only those unused IP addresses, and then enter the results of the command into a text file. Here's how to do it:

Open Notepad and type the following command in the window:

@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

Copyright © Windows knowledge All Rights Reserved