“UbuntuHelp:WebBrowsingSlowIPv6IPv4”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/WebBrowsingSlowIPv6IPv4}} {{Languages|UbuntuHelp:WebBrowsingSlowIPv6IPv4}} Ubuntu has a newer Internet protocol called IPv6 turned on by default. ...) |
小 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/WebBrowsingSlowIPv6IPv4}} | {{From|https://help.ubuntu.com/community/WebBrowsingSlowIPv6IPv4}} | ||
{{Languages|UbuntuHelp:WebBrowsingSlowIPv6IPv4}} | {{Languages|UbuntuHelp:WebBrowsingSlowIPv6IPv4}} | ||
− | Ubuntu has a newer Internet protocol called IPv6 turned on by default. However, | + | Ubuntu has a newer Internet protocol called IPv6 turned on by default. However, some hardware — such as NICs and modems — shows broken behavior when exposed to IPv6 related DNS requests. This leaves you wondering why DNS resolution seems slower or doesn't work at all. This guide shows how to disable this new protocol. |
== Disabling IPv6 == | == Disabling IPv6 == | ||
第7行: | 第7行: | ||
Ubuntu: | Ubuntu: | ||
− | * < | + | * Open a terminal and type: |
− | * Add this line: < | + | <pre><nowiki> |
+ | gksudo gedit /etc/modprobe.d/blacklist | ||
+ | </nowiki></pre> | ||
+ | * Add this line: | ||
+ | <pre><nowiki> | ||
+ | blacklist ipv6 | ||
+ | </nowiki></pre> | ||
* Save the file and restart your computer | * Save the file and restart your computer | ||
Kubuntu: | Kubuntu: | ||
− | * < | + | * Open a terminal and type: |
− | * Add this line: < | + | <pre><nowiki> |
+ | kdesu kate /etc/modprobe.d/blacklist | ||
+ | </nowiki></pre> | ||
+ | * Add this line: | ||
+ | <pre><nowiki> | ||
+ | blacklist ipv6 | ||
+ | </nowiki></pre> | ||
* Save the file and restart your computer | * Save the file and restart your computer | ||
− | After restarting, open up a terminal and type: | + | After restarting, open up a terminal and type: |
− | + | <pre><nowiki> | |
− | < | + | ip a | grep inet6 |
+ | </nowiki></pre> | ||
If there's no output, IPv6 is disabled. | If there's no output, IPv6 is disabled. | ||
第26行: | 第39行: | ||
and replacing "alias net-pf-10 ipv6" with "alias net-pf-10 off". Done! | and replacing "alias net-pf-10 ipv6" with "alias net-pf-10 off". Done! | ||
+ | If you just want to disable IPv6 temporary, you will discover that you can't just unload the ipv6 kernel module as long as an ipv6 address is configured for your device. You can use ifconfig to see which addresses are currently configured for your devices and disabling them with the following command: | ||
+ | <pre><nowiki> | ||
+ | sudo ifconfig <interface> inet6 del <ipv6address>/<prefixlength> | ||
+ | </nowiki></pre> | ||
+ | |||
+ | |||
+ | == Identifying the Broken Device == | ||
+ | |||
+ | The real reason for the problem is because IPv6 does DNS queries for "AAAA" records which request the IPv6 address of an internet hostname. You can identify the problem from a terminal, by making a specific DNS query such as: | ||
+ | |||
+ | <pre><nowiki> | ||
+ | dig AAAA www.kame.net | ||
+ | </nowiki></pre> | ||
+ | |||
+ | The corresponding query for an IPv4 address would be: | ||
+ | |||
+ | <pre><nowiki> | ||
+ | dig A www.kame.net | ||
+ | </nowiki></pre> | ||
+ | |||
+ | If the first one of these queries times out without returning a valid IPv6 address then your internet router is not working correctly and you may want to see if there is a firmware upgrade available to fix the '''real''' problem. | ||
[[category:CategoryDocumentation]] | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月21日 (三) 17:37的版本
Ubuntu has a newer Internet protocol called IPv6 turned on by default. However, some hardware — such as NICs and modems — shows broken behavior when exposed to IPv6 related DNS requests. This leaves you wondering why DNS resolution seems slower or doesn't work at all. This guide shows how to disable this new protocol.
Disabling IPv6
Ubuntu:
- Open a terminal and type:
gksudo gedit /etc/modprobe.d/blacklist
- Add this line:
blacklist ipv6
- Save the file and restart your computer
Kubuntu:
- Open a terminal and type:
kdesu kate /etc/modprobe.d/blacklist
- Add this line:
blacklist ipv6
- Save the file and restart your computer
After restarting, open up a terminal and type:
ip a | grep inet6
If there's no output, IPv6 is disabled.
Another method (perhaps simpler) is editing /etc/modprobe.d/aliases and replacing "alias net-pf-10 ipv6" with "alias net-pf-10 off". Done!
If you just want to disable IPv6 temporary, you will discover that you can't just unload the ipv6 kernel module as long as an ipv6 address is configured for your device. You can use ifconfig to see which addresses are currently configured for your devices and disabling them with the following command:
sudo ifconfig <interface> inet6 del <ipv6address>/<prefixlength>
Identifying the Broken Device
The real reason for the problem is because IPv6 does DNS queries for "AAAA" records which request the IPv6 address of an internet hostname. You can identify the problem from a terminal, by making a specific DNS query such as:
dig AAAA www.kame.net
The corresponding query for an IPv4 address would be:
dig A www.kame.net
If the first one of these queries times out without returning a valid IPv6 address then your internet router is not working correctly and you may want to see if there is a firmware upgrade available to fix the real problem.