Linux: Neighbour Table Overflow Error and Solution

Linux: Neighbour Table Overflow Error and Solution

The "neighbour table overflow" error can occur when the kernel's neighbour table, which is used to store information about network connections and routes, becomes full. This can happen if you have a large number of network connections or if you are experiencing network issues that cause a large number of connections to be established and then terminated.

When the neighbour table is full, the kernel will be unable to establish new network connections or routes, and you may see error messages similar to the following:

refer‮tual:ot ‬turi.com
Neighbour table overflow

or

Neighbour table full

To resolve this issue, you can try the following steps:

  1. Check for and resolve any network issues that may be causing a large number of connections to be established and then terminated. This can include issues with network hardware, network configurations, or network services.

  2. Increase the size of the neighbour table. You can do this by increasing the value of the /proc/sys/net/ipv4/neigh/default/gc_thresh1 and /proc/sys/net/ipv4/neigh/default/gc_thresh2 kernel parameters. These parameters control the size of the neighbour table. You can increase the values of these parameters by writing new values to them using the echo command. For example:

echo 2048 > /proc/sys/net/ipv4/neigh/default/gc_thresh1
echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh2

These values should be increased in increments of 256 until the neighbour table overflow error no longer occurs.

Note: These changes will not be persisted across reboots. To make the changes permanent, you can add the commands to a script that runs at boot time, or you can add them to the /etc/sysctl.conf file.

  1. If the neighbour table overflow error persists after increasing the size of the neighbour table, you may need to further troubleshoot the issue. This can include checking for issues with network hardware, network configurations, or network services. You can also try clearing the neighbour table and resetting the network stack by running the following commands:
ip -s -s neigh flush all
ip link set dev DEVICE down
ip link set dev DEVICE up

Replace DEVICE with the name of the network device (e.g., eth0).

These steps should help you resolve the neighbour table overflow error and restore normal network operation on your system.

Created Time:2017-10-16 14:38:53  Author:lautturi