当前位置:网站首页>How to check whether an IP address is occupied
How to check whether an IP address is occupied
2022-06-10 05:51:00 【Huang Jiajun】
1. Using the command line ping To judge IP Address
windows key +R Quick open cmd Command line program , Enter the command line prompt state , Enter... On the command line “ping What you want to see is occupied ip Address ” enter .
2.ARP Cache method
If only by ping It is not rigorous to judge the existence of computers in the network , Because of firewall or filtering rules , Can make ping Unable to return correct information , in other words , Even above ping no , The other party may still be online . We can go through ARP Caching solves this problem . Because the firewall or the method of filtering packets cannot be prohibited ARP View of . The remote computer does not return ping The news of success , But it will tell the local computer to ip Address corresponding MAC Address . So you can get through ARP Cache information to investigate the case . If you can see this ip Address corresponding MAC Address , The computer is online , Corresponding , Not in ARP The cache table indicates that the computer is not online .
Write an automatic ping Of bat Script
(1) Create a new text file
(2) Enter the following code
FOR /L %%i IN (0,1,255) Do ping 192.168.11.%%i -n 1
Arp -a >d:share\arp-mac.txt
//–
The most important thing here is to use For Ordered “/L” Parameters , The specific syntax of this command is as follows :
FOR /L %variable IN (start,step,end) DO command [command-parameters]
step: It means the number of steps ping, example 5\192.168.11.1\ \192.168.11.5\ \192.168.11.10
This set represents a sequence of numbers in incremental form from start to end .
therefore ,(1,1,5) The sequence will be generated 1 2 3 4 5,(5,-1,1) The sequence will be generated (5 4 3 2 1).
Don't forget to revise ping The segment address of
Arp -a >d:share\arp-mac.txt
The address may or may not be specified
–//
(3) After the save , Save as format for all types , File name suffix .bat
(4) Double-click on the run
———————————————————————————————————————————
After executing the batch command , Will automatically Ping All in this network segment IP Address , And finally ARP The result of the command execution is returned to arp-mac.txt In the text file
边栏推荐
猜你喜欢

Three principles of layout design

英语太差怎么办,快来写一个“百词斩”软件给自己背单词

5. inverse Polish representation, ternary expression, quaternion expression

深证通mr-深入了解,配置文件、异常案例、负载

MTK 平台sensor arch 介绍-kernel

ArcGIS应用(十九)Arcgis 统计分析计算多波段图像最大值、最小值、平均值等

Generate boot_ para. img

Model lightweight pruning distillation quantification series yolov5 lossless pruning (with source code)

One to one copy of core board system image using USB flash disk

Wireshark packet capture analysis
随机推荐
MTK platform sensor arch introduction -kernel
如何查看IP地址是否被占用
R language party package ctree function builds conditional inference decision trees, and uses plot function to visualize the trained conditional inference decision trees
General template for one page test plan of Agile Project
Flink 系例 之 TimeWindowAll
One to one copy of core board system image using USB flash disk
Several skills of API interface optimization
Using kubekey to build kubernetes/kubesphere environment“
npm命令大全
How do you do if your English is too poor? Write a "100 word chop" software to recite words for yourself
ArcGIS应用(十八)Arcgis 矢量图层属性表显示精度变化问题详解
向 CODING 推送代码出现 Permission denied 的解决方法
excel中如何把文本转换成数值?
Sql2008 database
An analysis of DuPont analysis: the financial situation of East China Construction Group Co., Ltd
WireShark抓包分析
WireShark抓包分析
Jifeng lighting | the spotlight without secondary light spot is perfect. The hill is perfect
stack_ quick_ sort
The process of data division with R language's catools package, random forest model construction with randomforest package, and visualization of the trained random forest model with plot function (the