0

I was wondering why name server record need to be in the zone file, because the delegation is already done by the parent zone. I came across this answer. That answer makes sense, I suppose. Then I proceeded to query the "A" record for a domain with dig.

dig @ns-cloud-d1.googledomains.com. offensivelearning.com a

Great, I got a authoritative answer. However, when I attempt to query the "NS" record for the same domain, querying the name server:

dig @ns-cloud-d1.googledomains.com. offensivelearning.com ns

This time the answer is non-authoritative. Why? I thought all answers from the name server of the domain ought to be authoritative.

1 Answers1

1

The question doesn't say exactly what the answer looks like, but I suspect that you are misinterpreting what you see rather than not getting an authoritative answer (which is indeed expected).
(If that is not the case, I would suspect that you are doing your tests in an environment where DNS queries are intercepted and sent to a local resolver instead of the nameserver at the destination address, or something like that.)

I get this answer, which is just like what one would expect:

$ dig @ns-cloud-d1.googledomains.com. offensivelearning.com NS +norec

; <<>> DiG 9.18.8 <<>> @ns-cloud-d1.googledomains.com. offensivelearning.com NS +norec ; (2 servers found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65042 ;; flags: qr aa; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 512 ;; QUESTION SECTION: ;offensivelearning.com. IN NS

;; ANSWER SECTION: offensivelearning.com. 21600 IN NS ns-cloud-d3.googledomains.com. offensivelearning.com. 21600 IN NS ns-cloud-d1.googledomains.com. offensivelearning.com. 21600 IN NS ns-cloud-d2.googledomains.com. offensivelearning.com. 21600 IN NS ns-cloud-d4.googledomains.com.

;; Query time: 14 msec ;; SERVER: 2001:4860:4802:32::6d#53(ns-cloud-d1.googledomains.com.) (UDP) ;; WHEN: Sun Jan 22 14:24:56 UTC 2023 ;; MSG SIZE rcvd: 168

$

Note the aa flag (authoritative answer).