AAAA record for localhost or not?

Brian E Carpenter brian.e.carpenter at gmail.com
Tue Sep 18 15:13:13 CEST 2012


When I recently switched to a Windows 7 laptop, here's what I found
in the MS-provided hosts file:

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

So not all resolvers need you to add anything at all.

Oh, and:

C:\windows\system32>ping localhost

Pinging BEC [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms

Ping statistics for ::1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Regards
   Brian

On 18/09/2012 10:18, Jeroen Massar wrote:
> On 2012-09-18 11:13 , Bjørn Mork wrote:
>> An interesting discussion just came up on Debian lists relating to the
>> odd traditional mapping they've used in /etc/hosts:
>>
>>  127.0.0.1       localhost
>>  ::1     ip6-localhost ip6-loopback
> 
> See:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=427067
> 
> As such you should find:
> 
> 127.0.0.1	localhost
> ::1     localhost ip6-localhost ip6-loopback
> 
> [..]
>> So what is the best current practice?  Should "localhost" have both an A
>> and AAAA record?
> 
> Yes.
> 
> But do note that it might break crappy software which does not handle
> IPv6 as they do not check the address family. But the fix is to fix that
> software then.
> 
> Greets,
>  Jeroen
> 
> 




More information about the ipv6-ops mailing list