跳到主要內容

Prefer IPv4 over IPv6

Ref:  

Guidance for configuring IPv6 in Windows for advanced users

Windows Vista, Windows Server 2008, and later versions of Windows implement RFC 3484 and use a prefix table to determine which address to use when multiple addresses are available for a Domain Name System (DNS) name.

By default, Windows favors IPv6 global unicast addresses over IPv4 addresses.

Applies to:   Windows 10 - all editions, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2
Original KB number:   929852

Summary

It is common for IT administrators to disable IPv6 to troubleshoot networking-related issues such as name resolution issues.

 Important

Internet Protocol version 6 (IPv6) is a mandatory part of Windows Vista and Windows Server 2008 and newer versions. We do not recommend that you disable IPv6 or its components. If you do, some Windows components may not function.

We recommend using Prefer IPv4 over IPv6 in prefix policies instead of disabling IPV6.

Use registry key to configure IPv6

 Important

Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

The IPv6 functionality can be configured by modifying the following registry key:

LocationHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\
Name: DisabledComponents
Type: REG_DWORD
Min Value: 0x00 (default value)
Max Value: 0xFF (IPv6 disabled)

IPv6 FunctionalityRegistry value and comments
Prefer IPv4 over IPv6Decimal 32
Hexadecimal 0x20
Binary xx1x xxxx

Recommended instead of disabling IPv6.
Disable IPv6Decimal 255
Hexadecimal 0xFF
Binary 1111 1111

See startup delay occurs after you disable IPv6 in Windows if you encounter startup delay after disabling IPv6 in Windows 7 SP1 or Windows Server 2008 R2 SP1.

Additionally, system startup will be delayed for five seconds if IPv6 is disabled by incorrectly, setting the DisabledComponents registry setting to a value of 0xffffffff. The correct value should be 0xff. For more information, see Internet Protocol Version 6 (IPv6) Overview.

The DisabledComponents registry value doesn't affect the state of the check box. Even if the DisabledComponents registry key is set to disable IPv6, the check box in the Networking tab for each interface can be checked. This is an expected behavior.

You cannot completely disable IPv6 as IPv6 is used internally on the system for many TCPIP tasks. For example, you will still be able to run ping ::1 after configuring this setting.
Disable IPv6 on all nontunnel interfacesDecimal 16
Hexadecimal 0x10
Binary xxx1 xxxx
Disable IPv6 on all tunnel interfacesDecimal 1
Hexadecimal 0x01
Binary xxxx xxx1
Disable IPv6 on all nontunnel interfaces (except the loopback) and on IPv6 tunnel interfaceDecimal 17
Hexadecimal 0x11
Binary xxx1 xxx1
Prefer IPv6 over IPv4Binary xx0x xxxx
Re-enable IPv6 on all nontunnel interfacesBinary xxx0 xxxx
Re-enable IPv6 on all tunnel interfacesBinary xxx xxx0
Re-enable IPv6 on nontunnel interfaces and on IPv6 tunnel interfacesBinary xxx0 xxx0

 Note

  • Administrators must create an .admx file to expose the registry settings of below table in a Group Policy setting.
  • You must restart your computer for these changes to take effect.
  • Values other than 0 or 32 causes the Routing and Remote Access service to fail after this change takes effect.

By default, the 6to4 tunneling protocol is enabled in Windows when an interface is assigned a public IPv4 address (Public IPv4 address means any IPv4 address that isn't in the ranges 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16). 6to4 automatically assigns an IPv6 address to the 6to4 tunneling interface for each address, and 6to4 dynamically registers these IPv6 addresses on the assigned DNS server. If this behavior isn't desired, we recommend disabling the IPv6 tunnel interfaces on the affected hosts.

You can also follow these steps to modify the registry key:

  1. Open an administrative Command Prompt window.

  2. Run the following command:

    Console
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" /v DisabledComponents /t REG_DWORD /d <value> /f
    

     Note

    Replace the <value> with the corresponding value.

How to calculate the registry value

Windows use bitmasks to check the DisabledComponents values and determine whether a component should be disabled.

To learn which component each bit (from low to high) controls, refer to the following table.

NameSetting
TunnelDisable tunnel interfaces
Tunnel6to4Disable 6to4 interfaces
TunnelIsatapDisable Isatap interfaces
Tunnel TeredoDisable Teredo interfaces
NativeDisable native interfaces (also PPP)
PreferIpv4Prefer IPv4 in default prefix policy
TunnelCpDisable CP interfaces
TunnelIpTlsDisable IP-TLS interfaces

For each bit, 0 means false and 1 means true. Refer to the following table for an example.

SettingPrefer IPv4 over IPv6 in prefix policiesDisable IPv6 on all nontunnel interfacesDisable IPv6 on all tunnel interfacesDisable IPv6 on nontunnel interfaces (except the loopback) and on IPv6 tunnel interface
Disable tunnel interfaces0011
Disable 6to4 interfaces0000
Disable Isatap interfaces0000
Disable Teredo interfaces0000
Disable native interfaces (also PPP)0101
Prefer IPv4 in default prefix policy.1000
Disable CP interfaces0000
Disable IP-TLS interfaces0000
Binary0010 00000001 00000000 00010001 0001
Hexadecimal0x200x100x010x11

Using the network properties GUI to disable IPv6 is not supported

This registry value doesn't affect the state of the following check box. Even if the registry key is set to disable IPv6, the check box in the Networking tab for each interface can be selected. This is an expected behavior.

The Internet Protocol Version 6 (TCP/IPv6) option in Network properties.

留言

這個網誌中的熱門文章

Office 2021 大量授權版安裝設定

  Office 2021 LTSC 佈署 & 離線安裝檔製作 1.      下載 Office Deployment Tool ,執行並解壓縮,取得 setup.exe ODT 安裝檔。 將 setup.exe 放置欲製作離線安裝的目錄,如 「 D:\ Office2021LTSCx64_KMS_tw 」 2.      到 Office 自訂工具網站 建立安裝設定檔匯出後,放置上述目錄下。 假設為「 Office2021LTSCx64_KMS_tw.xml 」 安裝設定可以指定欲安裝的版本 (x64/x86) 、語言 … 3.      將「 Office2021LTSCx64_KMS_tw.xml 」所需檔案下載: setup /download Office2021LTSCx64_KMS_tw.xml 程式會在背景下載,產生子目錄「 office 」 4.      建立安裝批次檔,如:「 Office2021LTSCx64_KMS_tw.bat 」: setup /configure Office2021LTSCx64_KMS_tw.xml

[Quote] M.2 SSD 選購指南——SATA、PCIe/NVMe 掌握要訣

Original: M.2 SSD 選購指南——SATA、PCIe/NVMe 掌握要訣 M.2 SSD 選購指南——SATA、PCIe/NVMe 掌握要訣 伴隨著固態硬碟的逐漸普及,以及諸如  intel 600p  以其高性能價格特性襲捲市場之故,傳統 SATA 裝置於頻寬上逐漸顯露其捉襟見肘之態勢。在各種因素之交互作用之下,M.2 SSD 遂成為市場之新風潮。然而針對於 M.2 SSD 其之規格型式(至少有兩種主流介面協定,以及與其相關的兩種不同插槽類型,而其中一種插槽尚有三種不同之相容性),往往卻成為令消費者困擾不已之難題。在此我們特別以專文來介紹 M.2 SSD 其硬體介面與協定上不同之處,以及硬體介面於個別主機條件下之相容性區別,以利消費者於選購時能採行更為明確之決策。 關於 M.2:不僅僅為 SSD 之專屬介面 M.2 原先被稱為 NGFF(Next Generation Form Factor,字面意義為次世代硬體格式規範),而此一格式規範於其定義中涵蓋了 PCIe、SATA 3.0 以及 USB 3.0 等等傳輸協定。亦即,一項原生為 PCIe 或 SATA 或 USB 之裝置,可依循 NGFF 之接腳與尺寸規範來重行設計,而製造為 M.2 之硬體型式。考量到 PCIe/SATA/USB 其各腳位之電氣特性皆有所不同,M.2 定義出數組不同的金手指防呆位置(目前存在於實體產品之型式計有 A/B/E/M key),來避免不相容裝置混插而造成無法正常運作之困擾,以及防止因此而造成之元件損害。 承上,由於原有 PCIe 或 SATA 或 USB 之裝置皆可以轉設計為 M.2 之型式,所以 M.2 其並非專屬於 SSD 之格式規範。其他諸如 Wi-Fi/Bluetooth、GPS 或 NFC 介面卡等,目前皆已有 M.2 規格之產品。而這些通訊介面卡其金手指防呆位置與 M.2 SSD 則有所不同(彼等主要採用 A/E key),如此可讓消費者在安裝使用上能獲得最低程度之依循法則。 M.2 SSD之兩種主要插槽類型:B key 及 M key 目前普及在市的各類 3C 產品中,支援 M.2 SSD 之插槽共計有兩種類型:B key(另稱socket 2)以及 M key(另稱socket 3)。如下圖所示,B ke...

KMS Server

  1.          安裝「大量啟用服務」 Ø   GUI : Ø   PowerShell : Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature -IncludeManagementTools 2.          安裝 Windows Server 的 KMS Key Ø   PowerShell : slmgr /ipk <Windows_Server KMS Host key> 3.          啟用 KMS Server Ø   PowerShell : slmgr /ato 4.          將 KMS Server 公布到公司的 DNS Server ,方便 client 自動啟用 Ø   PowerShell : slmgr /sdns 5.          重啟「 Software Protection 」服務 Ø   PowerShell : Restart-Service -Name sppsvc 6.          檢查授權資訊 Ø   PowerShell : slmgr.vbs /dlv 注意描述部分是否已授權,且是指定的授權通道 7.           要啟用 Office 大量授權,需下載相對版本的「Microsoft Office 大量授權套件」