Prefer IPv4 over IPv6

If a machine is preferring IPv6 over v4 and failing to route, Windows can be forced to prefer v4 over v6.

A test of this issue is to ping a machine other than the one you are on. If the address that comes back is an IPv6 address and the message "General Failure" appears for each ping attempt then IPv6 is being preferred but not routing.

To fix this issue a registry value must be set.

Powershell Admin Prompt
#If DisabledComponents has never been set run following registry setting to just prefer ipv4 and then reboot
New-ItemProperty “HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\” -Name “DisabledComponents” -Value 0x20 -PropertyType “DWord”

#If DisabledComponents already exists run this registry setting and then reboot
Set-ItemProperty “HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\” -Name “DisabledComponents” -Value 0x20

To edit directly in Regedit.exe:

  1. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters
  2. Create a new DWORD
  3. Name: DisabledComponents
  4. Value (Hex) 20
  5. Reboot


For more info see the Microsoft KB Guidance for configuring IPv6 in Windows for advanced users


© 2023 Foray, LLC - All Rights Reserved