Slow speed with IPv6 enabled?

When IPv6 is enabled certain traffic on your Linux server may become slow, that's because in many cases the traffic goes through the IPV6 instead of the IPV4, there is a way to enforce the traffic to go through IPv4.


Simply run the following command in the linux shell:

echo -e "\n#prefer IPv4 over IPv6\nprecedence ::ffff:0:0/96  100" >> /etc/gai.conf

This will basically add the line "precedence ::ffff:0:0/96  100" to the file /etc/gai.conf, this should do. 

Now you should see an improvement in speed as the traffic will go via the IPv4 instead of IPv6.



  • 6 Users Found This Useful
Was this answer helpful?

Related Articles

ownCloud Auto Install Script on Debian 7

Here is an easy way to install ownCloud on Debian 7 with a script, but first, for those who...

NGINX – Allow access only to certain IPs

Nginx has a nice module that not many people know about, it basically enables us...

How to configure NTP client in CentOS

What's NTP? NTP stands for Network Time Protocol, and it is an Internet protocol used to...

Initial Server Setup on CentOS 6

Here are some recommendations to setup your VPS or server when you first get it, some of these...

How To Install nginx on CentOS

What is NGINX? Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP,...