1

The question is exactly the same as the title says. Does the ccTLD/gTLD (and root servers come into the scenario automatically i presume) use cache?

And what type of response it supplies?

I know that they give pointers to the nameservers for the specific domain but what the response type is called? (hint type?)

I have searched a lot but could not find any similar question, sorry if this is a dupe.

utlamn
  • 13
  • 2

1 Answers1

3

The heart of this question is a lack of understanding for how authority delegation works, I feel. In your head it isn't an X-Y question, but it ultimately boils down to not understanding authority.

I'm going to be referring to the term "static TTL" several times in this answer. In this context, it refers to a TTL that does not automatically de-increment in seconds between queries. (in other words, it's only static until the record is modified by an admin)

tl;dr

Authoritative servers close to the root servers don't serve data from cache, and the most commonly used authoritative DNS software packages are not in the business of lying about static TTLs in the authority and answer sections. You may run into wacky network appliances that do who knows what once you follow referrals past the TLDs and into userspace, but that's not relevant to the question.

You should assume that any server which will return an authoritative answer for a zone in the DNS hierarchy will also provide static TTLs for any referrals that live in the zone it is authoritative for. This usually includes the glue data that may be included in the referral, provided that you're talking to a server which is not functioning in both authoritative and recursive mode. (i.e. not the root and TLD nodes)

The long version.

  • A referral (or delegation) is an response from a DNS server that returns a response code of NOERROR, contains zero answers, and has NS records in the authority section. Zero or more records may be present in the additional section as glue hints.
  • Referrals start at the root node in DNS (.), with each referral pointing to a set of nameservers that are administratively responsible for a more specific node in the hiearchy. ., com., example.com., etc. Each referral points to a DNS zone that is more specific than the last and closer to the answer. No exceptions.
  • It should be noted that referrals will not have the authoritative answer flag (AA=1, or aa as visualized in dig) set. This is because authority for a record is owned by the final server in the referral chain. A and AAAA records may be provided in the additional section as glue records to help you find the next servers in the referral chain, but such glue is not authoritative.
  • The process stops when a server that returns an authoritative response (AA=1) is seen, barring errors occuring somewhere along the way. This final server is asserting that it is an authority for the zone that the record is contained within, and that it has the final say in the (non-)existence of the record being requested.

Despite the absence of AA=1 in referrals, it is important to note the presence of static TTLs for every authority section observed in the referral chain, regardless of whether the AA flag is present. This is a DNS convention indicating that the record is not cached. If the record were obtained from an upstream source, it would be inaccurate to provide a TTL that is higher than the last time the upstream source was consulted.

In the absence of de-incrementing TTLs, you must assume that the data is not coming from an upstream source that was obtained through recursion, or that the remote software is poorly written. It would be incorrect to assume the latter when we're discussing the root and TLD servers in this context.

Andrew B
  • 32,588
  • 12
  • 93
  • 131