Nslookup returns "no answer" but dig works?!

Kevin Darcy kcd at daimlerchrysler.com
Wed Jan 22 19:23:22 UTC 2003

Savuud wrote:

>Mark_Andrews at isc.org wrote in message news:<b0kban$26n4$1 at isrv4.isc.org>....
>>	You need learn how to inteperate nslookups answers.
>>	"No answer" means that it got no answer that contained the
>>	type you were requesting.
>>	It returns a different message if it get no replies from
>>	the nameserver (No response from server).
>>	Mark
>But why does it return "No answer"? 
>I was requesting general information from the domain, like this:
>nslookup test.bbdo.no etype.nettdesign.no. If I try this with any
>other dns servers I don't get the "No answer" error.
>I suspect that the problem is related to my sone files.
>Here is a print of the sone file:
>$ORIGIN test.bbdo.no.
>$TTL 3600
>test.bbdo.no.        IN      SOA     etype.nettdesign.no.
>hostmaster.nettdesign.no.  (
>                                2003012101      ; Serial
>                                3600    ; Refresh
>                                900     ; Retry
>                                3600000 ; Expire
>                                3600 )  ; Minimum
>        IN      NS      etype.nettdesign.no.
>        IN      NS      ns2.rbnet.no.
>        MX   10  mail.test.bbdo.no.
>www             IN A
>mail            IN A
The default query type is A. So what you actually asked for was an A 
record with the name test.bbdo.no. That name exists (it owns SOA/NS/MX 
records), but owns no A records. So you get a NOERROR response with 0 
answers. If the name didn't exist at all, you'd get an NXDOMAIN response.

If you want to make a "general" query of a particular name, use the 
"ANY" query type (sometimes known as QTYPE=*). But, there's no guarantee 
you'll get a *complete* answer to an ANY query unless you send the query 
to a server that is authoritative for the zone. If you send an ANY query 
to a caching server, you'll probably just get whatever it happens to 
have in its cache, if anything.

                                        - Kevin

More information about the bind-users mailing list