4

I have two servers both running Windows 2008 with IPV4 and IPV6 both running.

If on server1 I ping server2 like this

ping server2

The response I get is

Pinging server2 [2002:9b08:a21::9b08:a21]

However if I ping server2 from my local machine (Windows 7 with both IPV4 and IPV6 running) I get

Pinging server2 [155.8.10.33]

The TCP/IP properties for IPV6 are identical on the server and on my local machine. However there are some differences in the properties from IPV4.

LocalMachine IPV4 Properties : Adapter Propetiers For IPV6 On Local Machine

Server IPV4 Properties :

enter image description here

The only other difference I can see is that in ipconfig on the server "connection-specific DNS suffix" is blank where as on the local machine its set to the domain.

Gavin
  • 253
  • 1
  • 2
  • 8

3 Answers3

8

Windows implements RFC 3484 and uses a prefix table to determine which address to use when multiple addresses are available for a name.

By default, it favors IPv6 global unicast addresses over IPv4 addresses.

You can view/change the prefix policy through netsh:

// Open an elevated command prompt
// Enter the IPv6 context
> netsh int ipv6

// Then use one of the following commands
show prefixpolicies
set prefixpolicy
billc.cn
  • 454
  • 1
  • 5
  • 12
  • 1
    And this is what it _should_ do. You _want_ it to use the IPv6 address when it can. – Joel Coel Oct 03 '11 at 15:52
  • Any links or info on "setting" the prefix policy? – Chad Harrison Jun 11 '12 at 19:18
  • @hydroparadise Currently you can only do it via `netsh` as shown above. – billc.cn Jun 11 '12 at 20:44
  • 1
    There is nothing you can do with the prefix policy that will allow you to favor IPv4 over IPv6. You must turn off IPv6 binding and disable all teredo, 6to4, and ISATAP adapters if you want IPv4 to be used instead of IPv6. – Brain2000 Aug 27 '12 at 18:44
  • I just noticed @Brain2000's comment and that is incorrect. The policy allows you to list IPv4 prefixes (in "IPv4-Compatible IPv6 address" and "IPv4-Mapped IPv6 Address" format, see RFC 4291) and have them as higher priority than IPv6 unicast addresses. – billc.cn May 18 '16 at 11:09
  • @billc.cn This may now be the case as I posted that 4 years ago. Back then, I couldn't find a way to control it, but the operating systems have put out quite a number of patches since then. – Brain2000 May 18 '16 at 21:43
  • It should be: `netsh> int ipv6`, not `>netsh int ipv6` – dzieciou Jul 02 '21 at 18:17
2

IPv6 should always take precedence if it is capable of doing so.

Off hand there are a couple things this could be - either the workstation does not have IPv6 enabled or it is using a different category of IPv6 address than the servers - global vs site local vs link local.

http://www.tcpipguide.com/free/t_IPv6SpecialAddressesReservedPrivateLinkLocalSiteLo-3.htm

Tim Brigham
  • 15,545
  • 10
  • 75
  • 115
  • This is valid only for "true" IPv6 connections. Connections via IPv4 are preferred over connections via 2002::/16 (6to4). See as well http://www.rfc-editor.org/rfc/rfc3484.txt. – glglgl Nov 02 '11 at 18:03
1

My immediate guess is that server1 and server2 both have 6to4 enabled, and your Windows 7 desktop does not. (Do any of the machines have globally routeable IPv6? I'm suspecting not.) Left to its own devices in an AD environment, Windows will registered any 6to4 IPs it has in DNS (as I imagine at least server2 did, based on the host selection from server1).

If your Windows 7 machine has (or should have) working IPv6, there are a few other possibilities that could be causing it to choose IPv4.

Jima
  • 11
  • 2