A Windows server will prioritize the configured IPv6 address over its IPv4 address. This can cause problems when a service needs IP version 4 addressing.
To get around the issue you need to change the precedence level of the IPv4 addresses on that particular machine using the following command:
# Make IPv4 (::ffff:0:0/96) preferred: netsh interface ipv6 set prefix ::ffff:0:0/96 60 4
Here's a quick example of IPv6 being preferred
I have a Windows Server 2016 machine with a hostname of TEAMS.
I open a command prompt and try to ping the hostname of the server (TEAMS) or the built-in localhost node. Both cases I see the computer's IPv6 addresses being used:
To make the server use its IPv4 address, we need to change the address preferences of the computer.
Here's what the default addresses are:
netsh interface ipv6 show prefixpolicies
How to set IPv4 instead of IPv6
To make the server use its IPv4 address primarily, you need to change the precedence level of the IPv4 address space from 35 to the highest.
Open an elevated!!! command prompt and use this command:
netsh interface ipv6 set prefix ::ffff:0:0/96 60 4
Now test if your pings use the IPv4 addresses (configured IP and loopback IP) of your server:
Comments