调整Windows IPV4与IPV6的DNS优先级

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\

名称:DisabledComponents
类型:REG_DWORD
值:32(十进制)

IPv6 功能 注册表值和注释
优先 IPv4 而非 IPv6 十进制 32
十六进制 0x20
二进制 xx1x xxxx

推荐,而非禁用 IPv6。

reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters” /v DisabledComponents /t REG_DWORD /d 32 /f

https://learn.microsoft.com/zh-cn/troubleshoot/windows-server/networking/configure-ipv6-in-windows
https://www.andan.me/diary/1791.html

优先用IPv4的内网DNS解析 调整ipv4 ipv6 优先级
https://cloud.tencent.com/developer/article/2075818

netsh interface ipv6 show prefixpolicies
netsh interface ipv6 delete prefixpolicy ::/96
netsh interface ipv6 add prefixpolicy ::/96
netsh interface ipv6 add prefixpolicy ::/96 1 3
netsh interface ipv6 show prefixpolicies

netsh interface ipv6 set prefixpolicy ::ffff:0:0/96 45 4

发表评论