Before version 9.15.1, `dig +trace` did not set the Recursion Desired bit in the root NS query. In other words, it's basically doing `dig +norecurse . ns @
dns.google` instead of `dig . ns @
dns.google`.
Recursive resolvers will not respond usefully to non-recursive queries if they don't have the response cached; some block them entirely because they're only useful for `dig +trace` and cache snooping.
Google Public DNS seems to be responding inconsistently to non-RD queries now:
$ dig +norecurse . ns @
dns.google; <<>> DiG 9.19.21-1+ubuntu20.04.1+
deb.sury.org+2-Ubuntu <<>> +norecurse . ns @
dns.google;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 65106
;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;. IN NS
;; Query time: 4 msec
;; SERVER: 2001:4860:4860::8844#53(
dns.google) (UDP)
;; WHEN: Tue Feb 27 01:37:53 UTC 2024
;; MSG SIZE rcvd: 28
$ dig +norecurse com ns @
dns.google; <<>> DiG 9.19.21-1+ubuntu20.04.1+
deb.sury.org+2-Ubuntu <<>> +norecurse com ns @
dns.google;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 42622
;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;com. IN NS
;; Query time: 4 msec
;; SERVER: 2001:4860:4860::8844#53(
dns.google) (UDP)
;; WHEN: Tue Feb 27 01:38:18 UTC 2024
;; MSG SIZE rcvd: 32
(That was in ATL, if anyone is curious.)
Your Google Cloud Shell server has dig 9.16.44, so it will work regardless.
[I don't know how to do plain text in Google Groups.]