HOWTO :: Increase size of ARP tables (linux)

If your network card gives you "No Buffer Space Available" like the following
Code:
# ping www.google.com.sg
connect: No buffer space available
Do a tail of the logs and you should see the following
Code:
# tail -f /var/log/messages
Apr 14 03:02:11 svrXXX kernel: __ratelimit: 195 callbacks suppressed
Apr 14 03:02:11 svrXXX kernel: Neighbour table overflow.
Apr 14 03:02:12 svrXXX kernel: Neighbour table overflow.
Apr 14 03:02:12 svrXXX kernel: Neighbour table overflow.
Apr 14 03:02:12 svrXXX kernel: Neighbour table overflow.
In this case, it might be advisable to increase the size of your ARP tables.

First, let's see what values have been set on our system
Code:
# cat /proc/sys/net/ipv4/neigh/default/gc_thresh1
          128
# cat /proc/sys/net/ipv4/neigh/default/gc_thresh2
          512
# cat /proc/sys/net/ipv4/neigh/default/gc_thresh3
          1024
Next, increase these values
Code:
# echo 1024 > /proc/sys/net/ipv4/neigh/default/gc_thresh1
# echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh2
# echo 8192 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
Restart the network interface
Code:
# ifdown eth0
# ifup eth0
Test it out. Your problem should have been solved.

Do note that these settings are NOT PERSISTENT. To make these settings persistent, please run the following for a RHEL/CENTOS machine

Code:
# echo "net.ipv4.neigh.default.gc_thresh1=1024" >> /etc/sysctl.conf
# echo "net.ipv4.neigh.default.gc_thresh2=4096" >> /etc/sysctl.conf
# echo "net.ipv4.neigh.default.gc_thresh3=8192" >> /etc/sysctl.conf
# sysctl -p
________________


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章