ipv4: Neighbour table overflow


I was noticing the below error message in /var/log/messages. I also noticed that my linux DHCP server was not serving leases. Again, I modified the sysctl file to fix the issue.

Problem:
Jun 21 07:56:03 localhost kernel: [36050.926734] ipv4: Neighbour table overflow.
Jun 21 07:56:03 localhost kernel: [36050.930354] ipv4: Neighbour table overflow.
Jun 21 08:01:02 localhost kernel: [36349.592127] ipv4: Neighbour table overflow.

Solution:
1. Edit /etc/sysctl.conf
 vi /etc/sysctl.conf2. Change to have the following values

net.ipv4.neigh.default.gc_thresh1 = 8192
net.ipv4.neigh.default.gc_thresh2 = 16384
net.ipv4.neigh.default.gc_thresh3 = 16384

2. To load new changes type the following command:

  sysctl -p

What are these 3 parameters?

These parameters are defined in the Linux Kernel Code in /include/net/neighbour.h as integer, which suggests that maximal accepted value is (2^32 - 1)

gc_thresh1 - The minimum number of entries to keep in the ARP cache.

gc_thresh2 - The soft maximum number of entries to keep in the ARP cache. 

gc_thresh3 - The hard maximum number of entries to keep in the ARP cache. 



1 comment:

Unknown said...

Nice and good article. It is very useful for me to learn and understand easily. Thanks for sharing your valuable information and time. Please keep updating Hadoop Admin Online Training