记录一次罕见的 IPv6 修复过程

花园地址


拜 Frederick888 大神

联动:

一种免流量和翻墙的方法

Windows 下百度网盘离线下载(IPv6 通道)解决方案


普通的问题一般是由于未启动 IP Helper 服务(Windows XP 下是 IPv6 Helper 和 6to4 两个服务),或者未启用 ISATAP 造成的。网上回答泛滥。

前几天测试网盘的时候,不知做了什么,昨天发现流量走了许多,没太注意;然后网盘的链接也崩了(我改过 HOSTS),有点警觉;今天看到自己的 IPv6 tracker 全部崩了,觉得有点蹊跷。

于是用 ipconfig 检查。

ipconfig /all

发现居然没有了 ISATAP 的虚拟网卡!

之前我是启用过 ISATAP 的,为什么没有?好,手动设置一下。

>netsh int isatap set state enabled
确定。
>netsh int isatap show state
ISATAP 状态: disabled

嗯?为什么是这个状态?百度了一堆,也没什么用。倒是发现了一个和我同病相怜的,而且也没有列出解决方案。

Syndrome

既然网上也有其他的穿越方式,那么看看其他的行不行。

>netsh int ipv6 6to4 set state state=enabled
确定。
>netsh int ipv6 6to4 show state
6to4 服务状态   : disabled
服务终止时撤消  : default

嗯?为什么一样不行?

Teredo 我没有测试,估计也是不行吧。(即使可以,速度……)在这里猜测是某种全局设置被禁用了,因为两种方法出现了同样的问题,而且是设置成功应用失败;但是不知道是什么。

于是又去翻微软关于 netsh 的资料,没用……

翻出去找谷歌吧。大多数人都是报 Microsoft ISATAP Adapter 的黄色感叹号问题(实际上不影响使用),而且多为 Windows Vista 的用户。找不到什么有用的。

最终的最终,找到一份有用的文档。(利兹大学?)原文附在二楼。

值得注意的是第 144-163 行。不难懂,就不翻译了。

转到对应的地方(HKLM\SYSTEM\CurrentControlSet\services\TCPIP6\DisabledComponents),一看:键值居然是 0x0000008e0x0e = 0x02 | 0x04 | 0x08)!我说为什么……(10-27:昨天错写成“&”)

修改了之后,重启,解决。(同样 ipconfig 可以确认)

总计从今天 11:25 到 15:07,三个半小时。我个渣渣。(快去做作业……


这种问题非常罕见,不过也许某天某人会碰上,就记录在这里吧。


Some Windows IPv6 hints and tips
--------------------------------

Jim Jackson     jj@franjam.org.uk

Contents
--------

 - some links
 - zone IDs for link local addresses
 - IPv6 DNS settings
 - IPCONFIG & ROUTE
 - turning off ICS
 - disabling IPv6
 - some netsh commands


Some Links
----------

  http://technet.microsoft.com/en-us/library/bb878057.aspx

      Configuring IPv6 with Vista

  http://technet.microsoft.com/en-us/library/bb726952.aspx

      Using Windows Tools to Obtain IPv6 Configuration Information

Zone IDs for Link Local Addresses
---------------------------------

For link-local addresses, the zone ID is typically the index of the
interface that either assigned the address or is to be used as
the sending interface for a link-local destination. The interface
index is an integer starting at 1 that is assigned to IPv6
interfaces, which include a loopback and one or multiple tunnel or
LAN interfaces. You can view the list of interface indexes from the
display of the

    netsh interface ipv6 show interface command

e.g. ping fe80::2b0:d0ff:fee9:4143%3
     tracert fe80::f282:2b0:d0ff:fee9:4143%2


IPv6 DNS Settings
-----------------

    netsh interface ipv6 add dns "interface name" <ipaddress>

By default MS systems try using the site local addresses (fec0:0:0:ffff::1,
fec0:0:0:ffff::2, and fec0:0:0:ffff::3) and addresses for Sire DNS servers.
This is covered in an now obsolete IETF draft.

Be kind to your ISP and firewall the old deprecated sitelocal addresses.


IPCONFIG & ROUTE
----------------

ipconfig shows IPv6 info associated with interfaces.

Windows usually has several IPv6 tunnel interfaces configured by default,
though often these are inoperative.

route print

  shows any IPv6 routing. And routes can be manually added, if necessary.


Turning OFF ICS
---------------

1. Click the Start button and then click Control Panel:

2. On the Control Panel window look for the Network and Internet icon

3. Open Network Connections by clicking View network Status and tasks
underneath Network and Internet and then clicking Manage network connections
on the left hand side.

4. Right-click the shared connection, and then click Properties. If you are
prompted for an administrator password or confirmation, type the password or
provide confirmation.

5. Click the Sharing tab, clear the Allow other network users to connect
through this computers Internet connection check box, and then click OK.

If you follow the steps above, but dont see a Sharing Tab

There are several reasons this Tab may not be visible, but if you cannot see
it, either it means you only have one network card installed in your
computer or that the user interface components of ICS for Vista are not
installed. Recent testing has revealed that ICS may still be running in the
background. To check that this is not the case:

Click Start and in the search box type in Services.msc and press ENTER

In the Services windows, look for Internet Connection Sharing (ICS) and
double click it.

In the new window select Disabled in the Startup type option.

Also remove the extra functionality in your Local Area Connection properties
by uninstalling

As well as un-checking the IPv6 box.


Disabling IPv6
--------------

# Go to Network Connections folder (click on Start button, then right click
on Network, select Properties, then click on Manage network connections on
Tasks pane).

# Right click on the network connection that you want to disable the
IPv6 interface and select Properties.

# Click Continue on User Access Control permission request prompt.

# untick the check box next to TCP/IPv6 component

# Click OK when done.

# To re-enable IPv6, retick the check box.

Or Via the Registry...

   1. Open Registry Editor (regedit).

   2. Navigate to the following registry key branch:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
      Services\tcpip6\Parameters\

   3. Create the following registry value (DWORD type):

      DisabledComponents

      Note that the name must be exactly as shown, including
      capitalization. DisabledComponents is set to 0 by default.

   4. The DisabledComponents registry value is a bit mask that
      controls the following series of flags, starting with the low
      order bit (Bit 0). To determine the value of DisabledComponents
      for a specific set of bits, the process is complicated, were
      hexadecimal value is calculated from binary number of the bits
      in correct position. For convenient, the following table lists
      some common configuration combinations and the corresponding
      DWORD value of DisabledComponents.

      Configuration combination      DisabledComponents value
      Disable all tunnel interfaces   01
      Disable 6to4                    02
      Disable ISATAP                  04
      Disable Teredo                  08
      Disable Teredo and 6to4         0xA
      Disable all LAN and PPP interfaces 010
      Disable all LAN, PPP, and tunnel interfaces 011
      Prefer IPv4 over IPv6           020
      Disable IPv6 over all interfaces and prefer IPv4 to IPv6
                                      0xFF

      As seen from table above, to disable IPv6 support globally on
      all interface, set the value data for DisabledComponents to
      000000FF, or simply FF. The registry entry will look like below:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters]
"DisabledComponents"=dword:000000ff

   5. Restart the computer for changes to take effect.

   6. To revert and enable IPv6, delete DisabledComponents registry
      key or set its registry value to 0.


Some netsh Commands
-------------------

netsh is a command line program for configuring all aspects of networking.
Invoke it from a DOS-box shell window.


netsh interface ipv6 install|uninstall
netsh interface ipv6 renew      restarts all ipv6 interfaces!
netsh interface ipv6 reset      resets ipv6 configuration

netsh interface ipv6 show ...
  ... address        shows address setting per interface
  ... destinationcache  show next hop settings
  ... global         global settings
  ... interface      summary of interfaces and info, inc number, mtu, name etc
  ... joins          show multicast addresses
  ... neighbors      show neighbours - 'merkan spelling
  ... prefixpolicy   shows prefixes and use
  ... privacy        show privacy settings
  ... routes         routing table
  ... siteprefixes
  ... state          shows state of some setting (deprecated settings???)
  ... teredo         shows teredo information

netsh interface ipv6 6to4 ...
  ... dump
  ... reset
  ... set
      ... interface
            Usage: set interface [name=]<string>
                       [[routing=](enabled|disabled|default)]
            e.g.   set interface "Private" enabled
      ... relay
            Usage: set interface [name=]<string>
                       [[routing=](enabled|disabled|default)]
            e.g.   set interface "Private" enabled
      ... routing
            Usage: set routing [[routing=](enabled|disabled|automatic|default)]
                   [[sitelocals=](enabled|disabled|default)]
            e.g.   set routing default default
                   set routing routing=enabled sitelocals=enabled
      ... state
           Usage: set state [[state=](enabled|disabled|automatic|default)]
                      [[undoonstop=](enabled|disabled|default)]
           e.g.  set state default default
                 set state state=enabled undoonstop=disabled
  ... show
      ... interface
      ... relay
      ... routing
      ... state

netsh interface ipv6 add ...
      ... 6over4tunnel
      ... address
      ... dns
      ... prefixpolicy
      ... route
      ... v6v4tunnel

netsh interface ipv6 delete ...
      ... address
      ... destinationcache
      ... dns
      ... interface
      ... neighbors
      ... prefixpolicy
      ... route

netsh interface ipv6 isatap ...
      ... dump
      ... set
           ... router
             Usage: set router [[name=](<string>|default)]
                        [[state=](enabled|disabled|default)]
                        [[interval=]<integer>]
             e.g.   set router isatap enabled 1440
           ... state [state=](enabled|disabled|default)
      ... show router|state

netsh interface ipv6 set ...
      ... address    - Modifies IPv6 address information.
      ... global     - Modifies global configuration general parameters.
      ... interface  - Modifies interface configuration parameters.
      ... mobility   - Modifies mobility configuration parameters.
      ... prefixpolicy - Modifies prefix policy information.
      ... privacy    - Modifies privacy configuration parameters.
      ... route      - Modifies route parameters.
      ... state      - Sets the state of deprecated functionality.
      ... teredo     - Sets Teredo state.
            Usage: set teredo [[type]=disabled|client|enterpriseclient|default]
                       [[servername=]<hostname>|<IPv4 address>|default]
                       [[refreshinterval=]<integer>|default]
                       [[clientport=]<integer>|default]
分享到 评论