Kernel: Neighbour table overflow/Переполнение arp таблици

Материал из Webko Wiki
Версия от 10:04, 19 мая 2017; Sol (обсуждение | вклад) (Новая страница: «при переходе на использование сетей больше чем /24 можно наблюдать переполнение arp таблиц…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигации Перейти к поиску

при переходе на использование сетей больше чем /24 можно наблюдать переполнение arp таблици маршрутизатора, ето может сопровождатся нестабильной работой сети и значитильным увиличением броадкаст трафика. В syslog роутера можно заметить такое сообщение:

Apr 17 15:22:42 uma kernel: [12562.837562] Neighbour table overflow.
Apr 17 15:22:42 uma kernel: [12562.867554] printk: 87 messages suppressed.

Ниже приведен список параметров для ядра призванных исправить ету ситуацию.

# The minimum number of entries to keep in the ARP cache. The garbage collector will
# not run if there are fewer than this number of entries in the cache.
net.ipv4.neigh.default.gc_thresh1 = 128

# The soft maximum number of entries to keep in the ARP cache. The garbage collector will
# allow the number of entries to exceed this for 5 seconds before collection will be performed.
net.ipv4.neigh.default.gc_thresh2 = 512

# The hard maximum number of entries to keep in the ARP cache. The garbage collector will
# always run if there are more than this number of entries in the cache.
net.ipv4.neigh.default.gc_thresh3 = 1024

# How frequently the garbage collector for neighbour entries should attempt to run.
net.ipv4.neigh.default.gc_interval = 30

# Determines how often to check for stale neighbour entries. When a neighbour entry
# is considered stale it is resolved again before sending data to it.
net.ipv4.neigh.default.gc_stale_time = 60

vim /etc/sysctl.d/98-router.conf

net.ipv4.neigh.default.gc_thresh1 = 256
net.ipv4.neigh.default.gc_thresh2 = 1024
net.ipv4.neigh.default.gc_thresh3 = 2048
net.ipv4.neigh.default.gc_interval = 60
net.ipv4.neigh.default.gc_stale_time = 120

Применяем изменения

sysctl -p