ARP table overflow tuning

From Grid5000
Revision as of 16:45, 21 April 2006 by Pneyron (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

By default, the maximum number of entries that can store the ARP table is set to 1024. In case of virtualization configuration with more than 1024 emulated nodes, this limitation may be reached.

Linux offers the possibility to overcome this limitation using the sysctl interface.

Choose one of the following:

  • Using the proc filesystem
cat 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
cat 2048 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
cat 1024 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
  • Using sysctl
/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh3 = 4096
/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh2 = 2048
/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh1 = 1024
  • Setting it up definitively editing the /etc/sysctl.conf configuration file and adding:
net.ipv4.neigh.default.gc_thresh3 = 4096
net.ipv4.neigh.default.gc_thresh2 = 2048
net.ipv4.neigh.default.gc_thresh1 = 1024

see man 7 arp for more info on the meaning to the gc_threshX sysctl.