Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Windows Vista系統教程 >> Windows Vista教程 >> 找出局域網中還沒被使用IP地址

找出局域網中還沒被使用IP地址

日期:2017/1/25 11:57:57      編輯:Windows Vista教程

電腦店訊:

作為網管員也好,或者在你的公司局域網裡面找個喜歡的內網ip地址也好,或者在我們解決Windows 操作系統的DHCP故障時,有時要找出某個地址范圍內有哪些地址沒有被使用。這時,大家可以打開命令提示窗口,在For…in…Do循環中調用 ping命令。例如,為了找出在地址范圍192.168.1.1 到 192.168.1.100有哪些地址沒有被使用,可以使用這個命令:For /L %f in (1,1,100) Do Ping.exe -n 2 192.168.1.%f

該命令會報告指定范圍內的所有IP地址,不管是在用的還是未用的,用戶都不得不在命令行窗口中翻看大量的內容。

其實,我們完全可以避免這些麻煩,只需建立一個批處理文件,要求它只返回那些未用的IP地址,然後再將命令的結果輸入到一個文本文件中。下面介紹方法:

打開記事本,在窗口中輸入如下的命令:

@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

恩,看看,是不是都給你揪出來了?這個辦法適合於Windows Vista、Windows 7、XP等Windows系統。

Copyright © Windows教程網 All Rights Reserved