Re: resolving problems

From: rihad (rihad_at_mail.ru)
Date: 12/16/03


Date: Tue, 16 Dec 2003 12:39:02 +0400

ynotssor wrote:
> "rihad" <rihad@mail.ru> wrote in message
> news:brmagf$1hc0q$1@ID-183924.news.uni-berlin.de
>
>
>>while ping is able to resolve a host name (served by tinydns), telnet
>>can't. While it takes a very long time for apache2 to start, squid
>>starts as normal (their Listen directive has the same host name).
>>While sshd takes ages to respond with the Password: prompt, the dictd
>>client/server works like a charm. What the hell is going on? All of
>>these problems go away if I simply put the relevant mappings into
>>/etc/hosts, but that's not what I want.
>
>
> Pare the name resolution down to the bare essentials, removing such spurious
> entries as db, nisplus, nis. Have dns first in the order:
>
> $ grep hosts /etc/nsswitch.conf
> hosts: dns files
>

Tried that to, to no avail. Besides, now that my /etc/hosts is basically
empty (nothing except an entry for localhost), chances are good the
order is irrelevant. And I'm not using nis, nisplus or whatever.

OK, here's updated info, I managed to trim the problem down to this:

# tcpdump -n host 192.168.0
tcpdump: listening on eth0

Now, when I do "ping rihad.localnet" I get instant name resolution:
12:16:57.789729 192.168.0.2.49154 > 192.168.0.1.53: 16599+ A?
rihad.localnet. (32)
12:16:57.790121 192.168.0.1.53 > 192.168.0.2.49154: 16599 1/0/0 A
192.168.0.1 (48) (DF)

But when I do "telnet rihad.localnet 80", name resolution hangs:
12:20:51.098895 192.168.0.2.49165 > 192.168.0.1.53: 16516+ AAAA?
rihad.localnet. (32)
12:20:56.106436 192.168.0.2.49166 > 192.168.0.1.53: 16516+ AAAA?
rihad.localnet. (32)
12:21:06.117134 192.168.0.2.49167 > 192.168.0.1.53: 16516+ AAAA?
rihad.localnet. (32)
12:21:26.128575 192.168.0.2.49168 > 192.168.0.1.53: 16516+ AAAA?
rihad.localnet. (32)
12:21:50.157479 192.168.0.1.53 > 192.168.0.2.49165: 16516 ServFail 0/0/0
(32) (DF)
12:21:50.157595 192.168.0.2 > 192.168.0.1: icmp: 192.168.0.2 udp port
49165 unreachable (DF)
12:21:55.167227 192.168.0.1.53 > 192.168.0.2.49166: 16516 ServFail 0/0/0
(32) (DF)
12:21:55.167342 192.168.0.2 > 192.168.0.1: icmp: 192.168.0.2 udp port
49166 unreachable (DF)
12:22:05.174194 192.168.0.1.53 > 192.168.0.2.49167: 16516 ServFail 0/0/0
(32) (DF)
12:22:05.174311 192.168.0.2 > 192.168.0.1: icmp: 192.168.0.2 udp port
49167 unreachable (DF)
12:22:06.141472 192.168.0.2.49169 > 192.168.0.1.53: 16517+ A?
rihad.localnet. (32)
12:22:06.141791 192.168.0.1.53 > 192.168.0.2.49169: 16517 1/0/0 A
192.168.0.1 (48) (DF)

As you can see, only after more than a minute of trying does telnet's
resolver fall back to normal DNS A record query (the same thing ping
does right from the start) and eventually name resolution succeeds. Why
so? Aren't ping and telnet using the same resolver? What's the "AAAA?"
query anyway?



Relevant Pages

  • [full build as of Sept. 24] "No route to host" after certain time...
    ... telnet: connect to address 61.74.111.134: Connection refused ... $ ping 61.74.111.134 ... telnet: connect to address 61.74.111.134: No route to host ... pci0: <PCI bus> on pcib0 ...
    (freebsd-stable)
  • IPSec Host2Host
    ... but all I am trying to do is establish a host to ... But when I ping from B->A I get: ... If I try to telnet from A->B to a TCP port it just sits there: ... A is setup as follows: ...
    (Fedora)
  • Re: Help with Expect
    ... > I need some help with an expect script I'm trying to write. ... If the host responds to pings telnet into it. ... You can ping a host and test whether it was successful from a shell ...
    (freebsd-questions)
  • Re: Help with Expect Script
    ... I want the script to ping the ... > host to see if it's alive first before it telnets into it. ... I already know how to telnet to the host, ...
    (freebsd-questions)
  • Re: Why isnt /etc/nsswitch.conf setup honored by RH 8.0?
    ... Apparently neither does HP-UX, nor Xenix, nor SCO UNIX because nslookup ... How else could you determine your own host IP ... They are not supposed to use the regular resolver library> routines. ... > In most Linux systems ping is probably the best bet for determining what ...
    (linux.redhat)

Loading