Difference between revisions of "Disabling IPv6"

From ArchWiki
Jump to: navigation, search
(Disabling the kernel module)
(Article cleanup; removed deprecated info and restructured content.)
Line 2: Line 2:
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
 
{{i18n|IPv6 - Disabling the Module}}
 
{{i18n|IPv6 - Disabling the Module}}
==Disabling gracefully==
 
A simple and graceful way of disabling IPv6 is to use [[Wikipedia:Sysctl|sysctl]] to modify kernel parameters at runtime.
 
*Add the following parameter and setting to {{Filename|/etc/sysctl.conf}}:
 
net.ipv6.conf.all.disable_ipv6 = 1
 
  
*Load sysctl settings from {{Filename|/etc/sysctl.conf}}:
+
Not only does the IPv6 module take around 250k of memory, it has also been reported that disabling the feature notoriously speeds up network access for programs that erroneously try to query servers with this newer version. Incidentally, [[Firefox]] is listed among the affected applications. So until the widespread adoption of IPv6, one may benefit by disabling the module.
# sysctl -p
+
  
 
Other way is to add following to {{Filename|/etc/modprobe.d/modprobe.conf}}:
 
options ipv6 disable=1
 
 
==Disabling the kernel module==
 
 
Since Arch's official kernel26 package version 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module entitled ipv6. Many users don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection) and more free memory (250k, that's a mighty big module) if removed.
 
Since Arch's official kernel26 package version 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module entitled ipv6. Many users don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection) and more free memory (250k, that's a mighty big module) if removed.
  
The ipv6 module is loaded at boot. There are many programs which will also load the ipv6 module after the system has booted if they detect that it is available. In fact, these programs load net-pf-10, which is an alias to ipv6. You may wish to stop all such activity.  Adding the following line to {{Filename|/etc/modprobe.d/modprobe.conf}} will disable the automatic loading of ipv6, but will still allow you to load it manually if needed.
+
==Method 1: Disable until needed==
 +
The ipv6 module is normally loaded at boot. There are many programs which will also load the ipv6 module after the system has booted if they detect that it is available. In fact, these programs load net-pf-10, which is an alias to ipv6. You may wish to stop all such activity.  Adding the following line to {{Filename|/etc/modprobe.d/modprobe.conf}} will disable the automatic loading of ipv6, but will still allow you to load it manually if needed.
  
 
  # disable autoload of ipv6
 
  # disable autoload of ipv6
 
  alias net-pf-10 off
 
  alias net-pf-10 off
  
You can also add {{Filename|/etc/modprobe.d/modprobe.conf}} to your {{Filename|/etc/mkinitcpio.conf}} and [[Mkinitcpio#Image_creation_and_activation|rebuild the kernel ram disk]] to have the IPv6 module disabled early in the process.
+
==Method 2: Disable entirely==
 +
An alternative method is to disable the module completely by adding the following to {{Filename|/etc/modprobe.d/modprobe.conf}}:
 +
options ipv6 disable=1
 +
 
 +
==Disable IPv6 during pre-init process==
 +
You can also add {{Filename|/etc/modprobe.d/modprobe.conf}} to your {{Filename|/etc/mkinitcpio.conf}} and [[Mkinitcpio#Image_creation_and_activation|rebuild the kernel ram disk]] to have the IPv6 module disabled earlier in the boot process.
  
 
==Additional resources==
 
==Additional resources==
 
[http://www.kernel.org/doc/Documentation/networking/ipv6.txt ipv6] - kernel.org Documentation
 
[http://www.kernel.org/doc/Documentation/networking/ipv6.txt ipv6] - kernel.org Documentation

Revision as of 16:46, 1 February 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Not only does the IPv6 module take around 250k of memory, it has also been reported that disabling the feature notoriously speeds up network access for programs that erroneously try to query servers with this newer version. Incidentally, Firefox is listed among the affected applications. So until the widespread adoption of IPv6, one may benefit by disabling the module.

Since Arch's official kernel26 package version 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module entitled ipv6. Many users don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection) and more free memory (250k, that's a mighty big module) if removed.

Method 1: Disable until needed

The ipv6 module is normally loaded at boot. There are many programs which will also load the ipv6 module after the system has booted if they detect that it is available. In fact, these programs load net-pf-10, which is an alias to ipv6. You may wish to stop all such activity. Adding the following line to Template:Filename will disable the automatic loading of ipv6, but will still allow you to load it manually if needed.

# disable autoload of ipv6
alias net-pf-10 off

Method 2: Disable entirely

An alternative method is to disable the module completely by adding the following to Template:Filename:

options ipv6 disable=1

Disable IPv6 during pre-init process

You can also add Template:Filename to your Template:Filename and rebuild the kernel ram disk to have the IPv6 module disabled earlier in the boot process.

Additional resources

ipv6 - kernel.org Documentation