Disable IPv6 Loopback on Windows 7 64 Bit

Solution 1:

I would instead modify the prefix policies so IP4 addresses are used over IPv6 when available.

C:\>netsh interface ipv6 show prefixpolicies
Querying active state...

Precedence  Label  Prefix
----------  -----  --------------------------------
        50      0  ::1/128
        40      1  ::/0
        30      2  2002::/16
        20      3  ::/96
        10      4  ::ffff:0:0/96
         5      5  2001::/32

In the list above the lines with labels 3 and 4 represent IP4 compatibility listings. If you increase their precedence they will be preferred. They need to be higher than the one with label 0 as that is the localhost address.

C:\>netsh interface ipv6 set prefix ::/96 60 3
Ok.

C:\>netsh interface ipv6 set prefix ::ffff:0:0/96 55 4
Ok.

Now if you ping localhost or the hostname it will use the IP4 address over an IPv6 address when both are available. In fact for everything with an IP4 address it will use that over an IPv6 address.