[YLUG] Testing name lookups

Roger Leigh rleigh at whinlatter.ukfsn.org
Thu Sep 6 22:50:20 BST 2007


Hi folks,

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.

I am tracking Debian unstable, and some change in the past two weeks
caused this breakage (I didn't update for two weeks while finishing my
MSc project report, and updated ..quite a lot... of packages
yesterday, which brought in this change).


Regards,
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/20070906/9ed00237/attachment.bin


More information about the York mailing list