Monday, January 31, 2011

::1 in the hosts file on windows server...

So, I decided to edit my hosts file on windows, not because I had this utter urge to break everything..but because I was using crossover cables and needed my machine to understand that...


I opened the hosts file and had a one sec "HUH" moment ... where I saw these two entries 


# Comment
127.0.0.1 localhost
::1 localhost



Now I knew about the first entry and that it was present in all hosts files.. what was the second entry.. I was curious ... This is what I discovered...




::1 Localhost is the equivalent to 127.0.0.1 Localhost but using IPv6 protocol format , ::1 localhost is valid when Internet Protocol version 6 (IPv6) is implemented on a system.

IPv4 127.0.0.1
IPv6 ::1

"::" is an abbreviation for missing zeros, so this loopback entry really means

0000:0000:0000:0000:0000:0000:0000:0001 localhost