The optical modem or router supports ipv6. Windows will give priority to ipv6 by default. Due to the optical modem or router, some software may not be able to connect to the network or some web pages cannot be opened. There are also some special circumstances where ipv4 needs to be used first. The editor below will talk about how to set the priority to use ipv4.
Use an administrator to open PowerShell or command prompt, enter the following command to query the activity status:
netshinterfaceipv6showprefixpolicies
You can see, "Priority, label, Prefix", where "40 1 ::/0" is ipv6, "35 4 ::ffff:0:0/96" is ipv4, the larger the priority value, the higher the priority. Just increase the priority value of ipv4(::ffff:0:0/96).
Enter the following command to adjust:
netshinterfaceipv6setprefixpolicy::ffff:0:0/96994
After completion, restart the computer and check the activity status again:
netshinterfaceipv6showprefixpolicies
At this time, it is found that only "99 4::ffff:0:0/96", the Ping test still gives priority to ipv6 access, you need to add another "40 1::/0", the command is as follows:
netshinterfaceipv6addprefixpolicy::/0401
After completion, the ipv4 priority setting is completed.
If you need to restore the settings, you only need to enter the following command to reset the ipv6 policy and restart to restore:
netshinterfaceipv6reset
The above is the detailed content of IPv4 priority settings, IPv4 takes precedence over IPv6 settings. For more information, please follow other related articles on the PHP Chinese website!