IPv6 (简体中文)

From ArchWiki
Revision as of 08:20, 18 May 2012 by Fengchao (Talk | contribs) (Fix Category.)

Jump to: navigation, search

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 – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end


附注: please use the first argument of the template to provide more detailed indications.

In Arch Linux, IPv6 is enabled by default. If you are looking for information regarding IPv6 tunnels, you may want to look at IPv6 - Tunnel Broker Setup.

Privacy Extensions

To enable Privacy Extensions for Stateless Address Autoconfiguration in IPv6 according to RFC 4941, reproduce the following steps:

Add these lines to /etc/sysctl.conf:

# Enable IPv6 Privacy Extensions
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
net.ipv6.conf.<nic0>.use_tempaddr = 2
net.ipv6.conf.<nicN>.use_tempaddr = 2

Where <nic0> to <nicN> are your nic's (the "all" or "default" parameters do not apply to nic's that already exist when the sysctl settings are applied).

After a reboot, at the latest, Privacy Extensions should be enabled.

Neighbor Discovery

Pinging the multicast address ff02::1 results in all hosts in link-local scope responding. An interface has to be specified. With a ping to the multicast address ff02::2 only routers will respond.

$ ping6 ff02::1%eth0

If you add an option -I <your-global-ipv6>, link-local hosts will respond with their link-global scope addresses. The interface can be omitted in this case.

$ ping6 -I 2001:4f8:fff6::21 ff02::1

Static Address

To assign a static address (for example 2001:470:1000:1000::5/64):

Add your static IP using netcfg. You can load them at startup by specifying your netcfg profiles in the NETWORKS section of /etc/rc.conf:


DESCRIPTION='ipv6+ipv4 eth0'





Finally DAEMONS section should contain "net-profiles" instead of the deprecated "network". See Netcfg for more information.

禁用 IPv6

禁用 IPv6 据称可以加速网络访问速度,因为在不支持 IPv6 的网络上程序也会试图使用它来访问。另外说一句, Firefox 也在受影响的程序列表中。在 IPv6 广泛采用之前,我们可以通过禁用它受益。

注意: 从版本3.2.6-2开始,Arch的官方内核直接编译进了IPv6支持 [1]。因此,以前的ipv6模块不再存在。




另外你可以通过sysctl禁用IPv6,添加下面的内容到 /etc/sysctl.conf:

# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1

Other programs

Disabling ipv6 functionality in the kernel does not prevent other programs from trying to use ipv6. In most cases, this is completely harmless, but if you find yourself having issues with that program, you should consult the program's manpages for a way to disable that functionality.

For instance, dhcpcd will continue to harmlessly attempt to perform ipv6 router solicitation. To disable this, as stated in the dhcpcd.conf manpage, add the following to /etc/dhcpcd.conf:



  • ipv6 - kernel.org 文档库