2. Default IPv6 functionality

On Windows platforms, IPv6 is installed by default and cannot be
uninstalled because it is a fundamental component of Tcpip.sys, the
TCP/IP driver file on these platforms. IPv6 is also enabled by default
for all connections in the Network Connections folder on a Windows
computer. To verify this, open the properties of a network connection,
select the Networking tab, and check that Internet Protocol Version 6
(TCP/IPv6) is selected as shown in Figure 3.

Figure 3. IPv6 is enabled by default on Windows Server 2012.

IPv6 is also preferred over IPv4 for network communications by
Windows computers. For example, if a DNS server returns both IPv4 and
IPv6 addresses in response to a name query, Windows will first try to
communicate with the remote host using IPv6. If this fails, Windows
will then attempt to use IPv4.

Disabling IPv6

Although you cannot uninstall IPv6 on Windows platforms, you
can disable it if desired. However, Microsoft does not recommend
disabling IPv6 for the following reasons:

During the development of Windows platforms by Microsoft,
services and applications were tested only with IPv6 enabled. As
a result, Microsoft cannot predict what might be the
consequences of disabling IPv6 on Windows.

Some Windows features will not function if IPv6 is
disabled. Examples of such features include DirectAccess and
Remote Assistance.

By leaving IPv6 enabled, you can ensure that your Windows
computers are fully supported and that all network-enabled features
can work as intended. However, if you decide you need to disable
IPv6 on a Windows computer for some reason, there are several ways
you can do this. For example, if you want to disable IPv6 for a
specific local area network (LAN) interface on a Windows computer,
you can do so by deselecting Internet Protocol Version 6 (TCP/IPv6)
on the Networking tab of the connection’s properties shown
previously in Figure 3. Note,
however, that performing this action does not disable IPv6 for
either the loopback interface or any tunnel interfaces on the
computer.

To disable specific types of IPv6 functionality for all
interfaces on a Windows computer, perform the following
steps:

Create a new DWORD registry value named DisabledComponents under the following
registry key:

HKLM\SYSTEM\CurrentControlSet\Services\tcpip6\Parameters\

Create an eight-bit binary that defines the types of IPv6
functionality you want to disable by using the following
information:

Bit 0 Set this bit to 1 to disable all IPv6 tunnel
interfaces—including ISATAP, Teredo, 6 to 4, and IP-HTTPS—or
set it to 0 to leave all IPv6 tunnel interfaces
enabled.

Bit 1 Set this bit to 1 to disable all 6to4 tunnel
interfaces, or set it to 0 to leave all 6to4 tunnel
interfaces enabled.

Bit 2 Set this bit to 1 to disable all ISATAP-based
interfaces, or set it to 0 to leave all ISATAP-based
interfaces enabled.

Bit 3 Set this bit to 1 to disable all Teredo-based
interfaces, or set it to 0 to leave all Teredo-based
interfaces enabled.

Bit 4 Set this bit to 1 to disable IPv6 for all
nontunnel interfaces, including LAN and PPP interfaces, or
set it to 0 to leave all nontunnel interfaces
enabled.

Bit 5 Set this bit to 1 to configure the default
prefix table so that IPv4 is preferred over IPv6 when
attempting to establish a network connection, or set it to 0
to leave IPv6 as the preferred network layer
protocol.

Bit 6 Leave this bit set to 0 because it is reserved
for future use.

Bit 7 Set this bit to 1 to disable all IP-HTTPS-based
interfaces, or set it to 0 to leave all IP-HTTPS-based
interfaces enabled.

Convert the binary number you created into hexadecimal
form, and assign it as the value for the DisabledComponents
registry value. Remember that bit 7 is the leftmost bit and bit
0 is the rightmost bit of the binary number.

Restart the computer to have the changes take
effect.

For example, let’s say you want to disable both Teredo and
6to4 on a Windows computer but leave ISATAP and all other IPv6
functionality enabled. To do this, you need to assign values to bits
0 through 7 as follows:

Bit 0 0

Bit 1 1

Bit 2 0

Bit 3 1

Bit 4 0

Bit 5 0

Bit 6 0

Bit 7 0

The binary number 00001010 converted to hexadecimal form is
0xA, and this is the value you would assign to the
DisabledComponents registry value.

Quick check

What effect will the value 0x21 have when it is assigned
to a newly created DisabledComponents registry value on a
Windows computer?

Quick check answer

The hexadecimal number 0x21 converted to binary form is
00100001, which means that bits 0 and 5 have the value 1.
Assigning this value to the DisabledComponents registry value
will do two things. First, it will cause IPv4 to be preferred
over IPv6 when the computer attempts to establish network
communications. And second, it will disable all IPv6 tunnel
interfaces on the computer.