Peculiar name resolution with "host"

The “host” command has this really long delay when it resolves a hostname. See the “host -v” output below.

Of particular interest is the part ‘Trying “sma-station4.sma.com”’, the cause of the delay. Why does it ask the host it is trying to resolve for the name resolution? Especially since it has already gotten a resolution?

Is there a way to prevent it? Or should there always be a name resolver of some sort active on a linux host? If so, which one?

The resolution delay also affects FTP, oddly enough.

… the host -v result ]…
~> host -v sma-station4
Trying “sma-station4.sma.com
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30770
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;sma-station4.sma.com. IN A

;; ANSWER SECTION:
sma-station4.sma.com. 0 IN A 192.168.69.14

Received 54 bytes from 192.168.69.249#53 in 2 ms
Trying “sma-station4.sma.com
;; connection timed out; no servers could be reached
Trying “sma-station4.sma.com
;; connection timed out; no servers could be reached
… end ]…

The A record for sma-station4.sma.com has a Time To Live of 0 seconds. So clients are unable to cache the result, not even for a few seconds. Looks like a DNS table config error.

It is not surprising that the DNS configuration looks odd: the host <sma-station4> has no name server running on it.

That was my question, really. Why is the host whose name is being resolved, being asked to resolve its name?

Maybe because you specified it as a nameserver in /etc/resolv.conf?

No, not that. The first nameserver is the local authority. The other two are from our ISP.

… resolv.conf ]…
search sma.com
nameserver 192.168.69.249
nameserver 205.171.3.65
nameserver 205.171.2.65
… end ]…

Ok, I did something similar on my LAN and the second query is for an AAAA record, i.e. an IPv6 query. Since your nameserver apparently doesn’t support that, you should disable IPv6 DNS lookups. Maybe even IPv6 altogether. Sorry, someone else will have to tell you how to do this, I have it enabled on my LAN as I run named and it is IPv6 capable.