Why does arp -a only show some machines on my network?

afl*_*afl 4 linux arp

I ran arp -a on a Linux server, and this is the output:

[root@trnsrv1 ~]# arp -a
? (10.223.8.82) at 00:50:56:B5:75:08 [ether] on bond0
? (10.223.11.254) at E0:5F:B9:66:A6:00 [ether] on bond0
Run Code Online (Sandbox Code Playgroud)

10.223.11.254 - this is the gateway

10.223.8.82 - this is another server, and it is not the only one on the LAN.

Why did it appear and others did not?

use*_*274 8

为什么它出现而其他人没有?

因为那些是在过去 60 秒内与您的服务器交换网络流量的仅有两台机器,或者在您的系统上指定的任何 arp 缓存值(/proc/sys/net/ipv4/neigh/default/gc_stale_time如果与默认值 60 不同)。

arp -a报告 arp 缓存中的内容;它不会尝试用尽可能多的条目填充缓存。