在 Linux 和其他系统上,有一个名为 arping 的实用程序,可用于发送 ARP 请求(“ping”)并显示答案,很像“ping”实用程序,但使用 ARP 而不是 ICMP。
有没有办法在 Windows 上做同样的事情?(我使用 Windows 7)
小智 15
如果您清除 Window 的 arp 缓存 ( arp -d ),然后尝试 ping ip 地址,它将发出 arp 广播。
使用 Wireshark 进行检查。
Rya*_*ner 15
Windows 的 Arping 确实存在。
http://freshmeat.net/projects/arping/
更正:这适用于 Linux、MAC OSX 等...但可以通过 cygwin 安装在 Windows 上。
在 Windows 中执行此操作的内置方法:
cmd /V /C "set "IP=10.0.2.2" & FOR /L %i in () do @ping -n 1 -w 1000 "!IP!" >NUL & arp -a | findstr /c:"!IP! "
Run Code Online (Sandbox Code Playgroud)
如果你想每次都显示一个新的ARP结果(需要以管理员身份运行)
cmd /V /C "set "IP=10.0.2.2" & FOR /L %i in () do @arp -d & @ping -n 1 -w 1000 "!IP!" >NUL & arp -a | findstr /c:"!IP! "
Run Code Online (Sandbox Code Playgroud)
小智 6
WinXP 的 ARP 命令仅用于显示数据。试试 Nmap,它是免费的,而且很容易进行这种类型的扫描。Nmap 可在 insecure.org 上获得。
以为我会添加这个直接从命令提示符运行的工具:
arp-ping.exe 命令行选项
Usage: arp-ping.exe [options] target
-s ip : specify source ip
-n X : ping X times
-t : ping until stopped with CTRL-C
-x : exit immediately after successful ping
-i X : ping every X seconds
-d : do an 'arp -d *' between pings (requires Administrator)
(-d prevents cached ARP responses on Windows XP.)
-c : include date and time on each line
-m X : ignore failures that take less than X milliseconds
-. : print a dot (.) for every ignored failure
-l : print debug log
-v : print version and exit
Run Code Online (Sandbox Code Playgroud)
与 Linux 的“arping”命令行选项对比
Usage: arping [-fqbDUAV] [-c count] [-w timeout] [-I device] [-s source] destination
-f : quit on first reply
-q : be quiet
-b : keep broadcasting, don't go unicast
-D : duplicate address detection mode
-U : Unsolicited ARP mode, update your neighbours
-A : ARP answer mode, update your neighbours
-V : print version and exit
-c count : how many packets to send
-w timeout : how long to wait for a reply
-I device : which ethernet device to use (eth0)
-s source : source ip address
destination : ask for what ip address
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
181663 次 |
| 最近记录: |