When I use the Ping command against my localhost (on Windows Vista), it doesn't show up as 127.0.0.1.
C:\Windows\system32>ping localhost
Pinging GIGA [::1] from ::1 with 32 bytes of data:
Instead, it shows up as ::1 (pair of colons and a one). What kind of notation is this? And why is it not showing up as 127.0.0.1?
Here's what I see in the c:\windows\system32\drivers\etc\hosts file.
::1 localhost 127.0.0.1 localhost
As suggested by Gregg I have already tried changing this order.
127.0.0.1 localhost ::1 localhost
The expected result is that 127.0.0.1 would take precedence over ::1 but that was not the case.
As I have learned now, this can be done by adding a prefix policy instead. To force cmd to use IP version 4 the option -4 can be used. To force Windows to always use IP version 4, IP version 6 or some of its components can be disabled through the properties dialog for the network adapter or through a registry tweak.

localhost; it is specified in theHOSTSfile. It is127.0.0.1by default, but you can change it to whatever you want, or remove it altogether. – Synetech Oct 31 '13 at 19:24localhost name resolution is handled within DNS itself.– gronostaj Oct 31 '13 at 22:15