Use the following commands to change the preference on Windows to use IPv4 over IPv6.
netsh interface ipv6 set prefix ::/96 60 3
netsh interface ipv6 set prefix ::ffff:0:0/96 55 4
Confirm the precedence has changed with the following command:
netsh interface ipv6 show prefixpolicies
To make this permanent across reboots, issue the following command:
reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents /t REG_DWORD /d 0x20 /f
You can revert back to the default value by substituting 0x20
with 0x00
in the above command. For reference, here are the possible values.
IPv6 Functionality | DisabledComponents registry value |
---|---|
Disable IPv6 protocol | 0xFF |
Prefer IPv4 over IPv6 | 0x20 |
Disable IPv6 on all nontunnel interfaces | 0x10 |
Disable IPv6 on all tunnel interfaces | 0x01 |
Disable IPv6 on all nontunnel interfaces (except the loopback) and on IPv6 tunnel interface | 0x11 |
Default value | 0x00 |