The documentation for the ping
command does not specify defaults nor precedence; just that either IPv4 or IPv6 could be forced when the target is a hostname.
Parameter |
Description |
/4 |
Specifies IPv4 used to ping. This parameter is not required to identify the target host with an IPv4 address. It is only required to identify the target host by name. |
/6 |
Specifies IPv6 used to ping. This parameter is not required to identify the target host with an IPv6 address. It is only required to identify the target host by name. |
The precedence comes from the prefix policies, e.g.,
C:\> netsh interface ipv6 show prefixpolicies
Precedence Label Prefix
---------- ----- ------
50 0 ::1/128
40 1 ::/0
35 4 ::ffff:0:0/96
30 2 2002::/16
5 5 2001::/32
3 13 fc00::/7
1 11 fec0::/10
1 12 3ffe::/16
1 3 ::/96
If the ::/0
has higher precedence than the ::ffff:0:0/96
(IPv4), then IPv6 is preferred, and vice versa.
From the article "Guidance for configuring IPv6 in Windows for advanced users" you can also see that there is a registry key for configuring IPv6. The table is shortened.
The IPv6 functionality can be configured by modifying the following registry key:
Location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\
Name: DisabledComponents
Type: REG_DWORD
Min Value: 0x00
(default value)
Max Value: 0xFF
(IPv6 disabled)
IPv6 Functionality |
Registry value and comments |
Prefer IPv4 over IPv6 |
Decimal 32 Hexadecimal 0x20 Binary xx1x xxxx
Recommended instead of disabling IPv6. |
Prefer IPv6 over IPv4 |
Binary xx0x xxxx |