LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Blacklist ipv6 to speed up internet connections. (https://www.linuxquestions.org/questions/linux-networking-3/blacklist-ipv6-to-speed-up-internet-connections-756198/)

Mol_Bolom 09-18-2009 10:30 AM

Blacklist ipv6 to speed up internet connections.
 
I have seen several threads lately about slow internet connections here and elsewhere, but I haven't seen anyone post a reply about blacklisting ipv6 so I am curious as to why?

Is ipv6 enabled only on certain distro's or is there some other reason that it's not mentioned?


<If anyone wants to try it, to see if it would work for them>

On Slackware 12.2 and Salix 13.0 just add "blacklist ipv6" to the /etc/modprobe.d/blacklist file. I'm not sure about non-slackware based distro's. Unfortunately, I don't know any way of doing it without rebooting.

GrapefruiTgirl 09-30-2009 02:15 PM

I'm not sure which distros have IPv6 enabled or disabled by default, but I suspect the majority of them leave it enabled. And around LQ, there are in fact lots of threads where the details of blacklisting and/or disabling IPv6 are given.

Most distros will understand the usage of the files in /etc/modprobe.d and many distros come with a numebr of files in that location by default, but IPv6 is not usually disabled in there.

Here's how to do it:

Create a blank text file called "IPv6" or whatever you like, OR you can choose to add the lines I will give below, into an existing file that deals with some aspect of networking on your distro.

Anyhow, into that file, put the lines:

Code:

alias ipv6 off
alias net-pf-10 off

And this will prevent IPv6 from working. This is Slackware-esque, but pretty much all distros will make use of this method AFAIK.

Another Slackware-ism, which often has its own semi-unique mechanism on other distros, is to disable IPv6 within your networking configuration file; on Slackware, this is /etc/rc.d/rc.inet1.conf. The method is like so:
Code:

NETWORKING_IPV6="no"
or for an interface that is not the default one, you can use:
Code:

NETWORKING_IPV6[n]="no"
..where [n] is the number of the interface.

Sasha

sycamorex 09-30-2009 02:22 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3702209)
I'm not sure which distros have IPv6 enabled or disabled by default, but I suspect the majority of them leave it enabled. And around LQ, there are in fact lots of threads where the details of blacklisting and/or disabling IPv6 are given.

Most distros will understand the usage of the files in /etc/modprobe.d and many distros come with a numebr of files in that location by default, but IPv6 is not usually disabled in there.

Here's how to do it:

Create a blank text file called "IPv6" or whatever you like, OR you can choose to add the lines I will give below, into an existing file that deals with some aspect of networking on your distro.

Anyhow, into that file, put the lines:

Code:

alias ipv6 off
alias net-pf-10 off

And this will prevent IPv6 from working. This is Slackware-esque, but pretty much all distros will make use of this method AFAIK.

Another Slackware-ism, which often has its own semi-unique mechanism on other distros, is to disable IPv6 within your networking configuration file; on Slackware, this is /etc/rc.d/rc.inet1.conf. The method is like so:
Code:

NETWORKING_IPV6="no"
or for an interface that is not the default one, you can use:
Code:

NETWORKING_IPV6[n]="no"
..where [n] is the number of the interface.

Sasha

Having applied the above mentioned modifications, would it still make sense to disable IPv6 in Firefox's about:config?

GrapefruiTgirl 10-05-2009 01:21 PM

Quote:

Originally Posted by sycamorex (Post 3702218)
Having applied the above mentioned modifications, would it still make sense to disable IPv6 in Firefox's about:config?

I can't say myself, for absolute certainty, but I would *guess* that disabling it in about:config as well as everywhere else, would perhaps eliminate the browser itself from trying to do anything with IPv6, thereby making for some tiny speed increase in the browser itself.

Generally, if you look around, often the first reason given for disabling IPv6 in firefox, is to speed up browser queries by making it not bother with IPv6 but instead go directly to v4; these threads/posts/blogs/whatever tend to not make mention of whether or not the rest of the OS has v6 disabled too.

To summarize: I believe leaving IPv6 enabled in the browser, allows Firefox to continue wasting time trying IPv6 queries, even if the network doesn't support the protocol; so, IMO, it makes sense to disable it there too.

To make an analogy: imagine the whole route, from your browser, through all the hardware, across the internet, to a website or whatever, as a chain; with any chain, all the links ideally should match-- we don't make a chain with all round links except one square one in the middle somewhere, nor do we make a chain with all links of size=xyz except for one link somewhere in the middle with size=abc.

Sorry for the long-windedness :) but just wanted to explain my POV -- and again, this explanation is derived solely from logical deduction, not concrete evidence; to me it doesn't seem logical to have v6 enabled in one place, but nowhere else.

Sasha

sycamorex 10-05-2009 02:00 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3708584)
I can't say myself, for absolute certainty, but I would *guess* that disabling it in about:config as well as everywhere else, would perhaps eliminate the browser itself from trying to do anything with IPv6, thereby making for some tiny speed increase in the browser itself.

Generally, if you look around, often the first reason given for disabling IPv6 in firefox, is to speed up browser queries by making it not bother with IPv6 but instead go directly to v4; these threads/posts/blogs/whatever tend to not make mention of whether or not the rest of the OS has v6 disabled too.

To summarize: I believe leaving IPv6 enabled in the browser, allows Firefox to continue wasting time trying IPv6 queries, even if the network doesn't support the protocol; so, IMO, it makes sense to disable it there too.

To make an analogy: imagine the whole route, from your browser, through all the hardware, across the internet, to a website or whatever, as a chain; with any chain, all the links ideally should match-- we don't make a chain with all round links except one square one in the middle somewhere, nor do we make a chain with all links of size=xyz except for one link somewhere in the middle with size=abc.

Sorry for the long-windedness :) but just wanted to explain my POV -- and again, this explanation is derived solely from logical deduction, not concrete evidence; to me it doesn't seem logical to have v6 enabled in one place, but nowhere else.

Sasha

I guess it makes sense to disable IPv6 in all possible places. If not for any visible speed improvement, then certainly for consistency. Thanks.

Mol_Bolom 10-05-2009 07:26 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3708584)
I can't say myself, for absolute certainty, but I would *guess* that disabling it in about:config as well as everywhere else, would perhaps eliminate the browser itself from trying to do anything with IPv6, thereby making for some tiny speed increase in the browser itself.

Generally, if you look around, often the first reason given for disabling IPv6 in firefox, is to speed up browser queries by making it not bother with IPv6 but instead go directly to v4; these threads/posts/blogs/whatever tend to not make mention of whether or not the rest of the OS has v6 disabled too.

To summarize: I believe leaving IPv6 enabled in the browser, allows Firefox to continue wasting time trying IPv6 queries, even if the network doesn't support the protocol; so, IMO, it makes sense to disable it there too.

To make an analogy: imagine the whole route, from your browser, through all the hardware, across the internet, to a website or whatever, as a chain; with any chain, all the links ideally should match-- we don't make a chain with all round links except one square one in the middle somewhere, nor do we make a chain with all links of size=xyz except for one link somewhere in the middle with size=abc.

Sorry for the long-windedness :) but just wanted to explain my POV -- and again, this explanation is derived solely from logical deduction, not concrete evidence; to me it doesn't seem logical to have v6 enabled in one place, but nowhere else.

Sasha

Thanks GG for the info, and the other methods.

Also, the problems with ipv6 didn't only exist in FF, but also with slackpkg. I'm not sure about anything else, but I do know slackpkg would just crawl along.


All times are GMT -5. The time now is 06:38 AM.