25 Jun 2023

Prioritising IPv4 over IPv6 on Windows 11

 

Create a registry entry to prefer IPv4 over IPv6.

WAY ONE


Location: HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters
Key: DisabledComponents
Type: REG_DWORD
Value: 0x20


Delete this entry to go back.


WAY TWO


netsh interface ipv6 show prefixpolicies



Precedence  Label  Prefix
---------- ----- --------------------------------
50 0 ::1/128
40 1 ::/0
35      4  ::ffff:0:0/96
30 2 2002::/16
5 5 2001::/32
3 13 fc00::/7
1 11 fec0::/10
1 12 3ffe::/16
1 3 ::/96


netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 50 0
netsh interface ipv6 set prefixpolicy ::1/128 40 1
netsh interface ipv6 set prefixpolicy ::/0 30 2
netsh interface ipv6 set prefixpolicy 2002::/16 20 3
netsh interface ipv6 set prefixpolicy 2001::/32 5 5
netsh interface ipv6 set prefixpolicy fc00::/7 3 13
netsh interface ipv6 set prefixpolicy fec0::/10 1 11
netsh interface ipv6 set prefixpolicy 3ffe::/16 1 12
netsh interface ipv6 set prefixpolicy ::/96 1 4
To Undo
netsh interface ipv6 reset