wiki:Prioritize IPv4 over IPv6

Prioritize IPv4 over IPv6

Prefer IPv4 over IPv6 on Windows

The solution doesn’t require a reboot, it takes effect immediately. You need to open an elevated Command Prompt, and run 2 commands:

netsh interface ipv6 set prefix ::/96 60 3

netsh interface ipv6 set prefix ::ffff:0:0/96 55 4

These commands increased the priority of the IPv4 prefix policy and decreased the priority for IPv6. By default, this change is made persistent across reboots.

For example, run these two commands on a clean Windows Server 2016 host, and run a ping request again:

Pinging srv01.contoso.com [192.168.10.21] with 32 bytes of data

Reply from 192.168.10.21: bytes=32 time<1ms TTL=128

Reply from 192.168.10.21: bytes=32 time<1ms TTL=128

Last modified 18 months ago Last modified on 10/26/22 10:10:22
Note: See TracWiki for help on using the wiki.