Setting IPv4 as the Preferred Access in Windows 10/11

Publish: 2024-01-26 | Modify: 2024-01-26

When accessing IPv6 websites in a local network that supports both IPv4 and IPv6, the access may be very slow, especially for foreign websites. We can try to prioritize IPv4 to improve the situation. This means that when the target website supports both IPv4 and IPv6, IPv4 will be used by default for access, thereby solving the problem of slow IPv6 network.

Set IPv4 Priority

Open "Start" menu, type "cmd" and run it as administrator. Then enter the following command to check the priority:

netsh interface ipv6 show prefixpolicies

This command will display a list of access priorities for network prefixes. In this list, the "Precedence" column represents the priority, where a higher numerical value indicates a higher priority and means that it will be accessed more preferentially. We can see that the priority of IPv6 (::/0) is higher than that of IPv4 (::ffff:0:0/96), which is why by default IPv6 is accessed with higher priority.

14e69b19c825e755.png

Continue entering the command to increase the priority of IPv4:

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

After this setting, IPv4 will be prioritized over IPv6 for access.

Conclusion

By using the above method, you can easily adjust the IPv4 priority to alleviate the issue of slow access to foreign IPv6 websites.

This article is partially referenced from: https://dashen.wang/910.html

Microsoft Community also provides a non-command line operation method: How to set IPv4 priority in dual IPv6 & IPv4 IP on Windows 11


Comments