[YLUG] Testing name lookups
Roger Leigh
rleigh at whinlatter.ukfsn.org
Wed Sep 12 21:12:51 BST 2007
Roger Leigh <rleigh at whinlatter.ukfsn.org> writes:
> Following some strange problems, which I believe are due to the
> glibc 2.6 name resolver, I want to test name lookups.
> Unfortunately, tools like host, nslookup and dig appear to only
> query the DNS servers in /etc/resolv.conf, whereas I want to also
> query hosts. Ideally, I want a tool which is nothing more than a
> lightweight wrapper around getipnodebyname(3) or gethostbyname(3).
> "getent hosts" appears to do this, but is not reflecting the
> behaviour I am seeing:
>
> % getent hosts localhost
> 127.0.0.1 localhost
> % getent hosts ip6-localhost
> ::1 ip6-localhost ip6-loopback
>
> My actual problem is this:
>
> % telnet ip6-localhost
> Trying 127.0.0.1...
> ^^^^^^^^^
> telnet: Unable to connect to remote host: Connection refused
>
> Where on earth did the IPv4 localhost address just appear from ?!
> This is making all programs configured to use ip6-localhost fail to
> connect.
Just to follow up with a resolution to this:
I ended up writing a small test program to identify the cause of this,
http://people.debian.org/~rleigh/addrtest.c
This showed that IPv6 addresses were only available when the system
had a globally scoped IPv6 address, or else all addresses (even local
ones) were not returned. The full detail is at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=441857
and
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=435646
Sorry for the noise!
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://mailman.lug.org.uk/pipermail/york/attachments/20070912/3e1e1157/attachment.bin
More information about the York
mailing list