1. syslog报错
May 21 16:06:54 XDsv03 kernel: [1060999.019431] net_ratelimit: 109 callbacks suppressed
May 21 16:06:54 XDsv03 kernel: [1060999.019457] neighbour: ndisc_cache: neighbor table overflow!
May 21 16:06:54 XDsv03 kernel: [1060999.019515] neighbour: ndisc_cache: neighbor table overflow!
May 21 16:06:54 XDsv03 kernel: [1060999.083589] neighbour: ndisc_cache: neighbor table overflow!
2. 含义
内核的 IPv6 邻居缓存(ndisc_cache) 已满。这个表负责保存 IPv6 地址到 MAC 地址的映射,类似 IPv4 的 ARP 表。当表溢出时,系统无法再解析新的邻居,会导致网络连接问题,并持续刷出这类警告。
3. 解决方法
增大邻居表容量:
bash
# 快速应用配置(立即生效,重启后失效)
sudo sysctl -w net.ipv4.neigh.default.gc_thresh1=1024
sudo sysctl -w net.ipv4.neigh.default.gc_thresh2=4096
sudo sysctl -w net.ipv4.neigh.default.gc_thresh3=8192
sudo sysctl -w net.ipv6.neigh.default.gc_thresh1=1024
sudo sysctl -w net.ipv6.neigh.default.gc_thresh2=4096
sudo sysctl -w net.ipv6.neigh.default.gc_thresh3=8192