| 1 | = Prioritize IPv4 over IPv6 = |
| 2 | |
| 3 | {{{ |
| 4 | Prefer IPv4 over IPv6 on Windows |
| 5 | |
| 6 | The solution doesn’t require a reboot, it takes effect immediately. You need to open an elevated Command Prompt, and run 2 commands: |
| 7 | |
| 8 | netsh interface ipv6 set prefix ::/96 60 3 |
| 9 | |
| 10 | netsh interface ipv6 set prefix ::ffff:0:0/96 55 4 |
| 11 | |
| 12 | 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. |
| 13 | |
| 14 | For example, run these two commands on a clean Windows Server 2016 host, and run a ping request again: |
| 15 | |
| 16 | Pinging srv01.contoso.com [192.168.10.21] with 32 bytes of data |
| 17 | |
| 18 | Reply from 192.168.10.21: bytes=32 time<1ms TTL=128 |
| 19 | |
| 20 | Reply from 192.168.10.21: bytes=32 time<1ms TTL=128 |
| 21 | |
| 22 | }}} |