发出以下命令后:
ip neighbor add 192.168.255.254 lladdr ff:ff:ff:ff:ff:ff dev br-lan nud permanent
可以在 ARP 缓存中找到以下条目:
root@OpenWrt:~# ip neigh
...
192.168.255.254 dev br-lan lladdr ff:ff:ff:ff:ff:ff PERMANENT
...一切都美好而花花公子。然而,几个小时后,该条目变成:
root@OpenWrt:~# ip neigh
...
192.168.255.254 dev br-lan FAILED
我可以通过发出以下命令暂时修复它:
ip neighbor change 192.168.255.254 lladdr ff:ff:ff:ff:ff:ff dev br-lan nud permanent
...并且它在几个小时内保持正确,但之后,它恢复为:
root@OpenWrt:~# ip neigh
...
192.168.255.254 dev br-lan FAILED
问:如何才能使该 ARP 缓存条目真正永久存在?
顺便说一句:我需要它来使 WOL 工作,因为我将外部 UDP 端口转发到 192.168.255.254,然后该端口通过我的 LAN 进行广播
这一切都发生在:Linux OpenWrt 4.14.151 #0 SMP Tue Nov 5 14:12:18 2019 armv7l GNU/Linux
。
OpenWrt 18.06.5 r7897-9d401013fc / LuCI openwrt-18.06 branch (git-19.309.48729-bc17ef6)