I am not very clear with how the non-authoritative answer is given.
For some domains I get this kind of results:
root@localhost:~# nslookup
> set query=ns
> foo.org
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
foo.org nameserver = dns5.name-services.com.
foo.org nameserver = dns3.name-services.com.
foo.org nameserver = dns4.name-services.com.
foo.org nameserver = dns2.name-services.com.
foo.org nameserver = dns1.name-services.com.
Authoritative answers can be found from:Even When I use querytype=soa, the Authoritative Answer is blank. Why does that happen?
And as I understand it, Non-Authoritative means it's the cache result from some server, probably my ISP. I was not sure, when I query NS, Non-Authoritative NS result is the NS of the cache server (ISP) or authoritative server?
Then I checked with a online tool called simpledns, the dnsX.name-services.com ns seems to be the Authoritative Answer NS. Why is it showing in the Non-Authoritative Answer? And if they actually are authoritative NS, is it possible to show the non-authoritative server NS?
Thanks
2 Answers
Non-Authoritative means it's the cache result from some server
Yes. Authoritative answers only come from servers which directly host the data; non-authoritative answers come from caches/proxies.
probably my ISP
No. In your example, the address of the cache server is 8.8.8.8 (as shown above in the program's output); it is a Google Public DNS server.
In nslookup you can use the server command to direct queries to some other server, be it caching or authoritative.
Even When I use querytype=soa, the Authoritative Answer is blank. Why does that happen?
SOA records are not special in that regard. They're hosted by the same servers as the rest of the zone. If they're queried through a caching/proxy server, that response is non-authoritative because of where it was queried, not because of the record type.
To get an authoritative answer, you need to send the query to a server that is authoritative for that domain. The NS response you got tells you which servers are.
I was not sure, when I query NS, Non-Authoritative NS result is the NS of the cache server (ISP) or authoritative server?
The cache server itself is never part of the results; it gives you unaltered data. So the NS records are the same that the cache server itself got from some authoritative server (i.e. they come from the actual domain, and aren't autogenerated by the cache), and they also point to an authoritative server.
And if they actually are authoritative NS, is it possible to show the non-authoritative server NS?
NS records in a domain always point to authoritative servers for their domain. That's literally what they are for.
Domains don't generally have designated non-authoritative servers, because if they had one, then such a server would kinda become authoritative by definition... "Non-authoritative" responses just mean everything else, i.e. responses produced by any cache DNS server around the net.
5It's telling you that 8.8.8.8, which is the server you asked, isn't authoritative for the domain. Consecutively you'd have to ask name-services.com for an answer.
See also DNS - NSLOOKUP what is the meaning of the non-authoritative answer? on ServerFault.