Score:0

Is authoritative nameserver IP address cached by Recursive resolver?

za flag

I know that A,AAAA records will be cached by Recursive resolver and stub resolver. When a person searches a subdomain/domain, if it is CNAME record which is searched, the Resolver gets the corresponding domain name( because CNAME record value will also be domain ) and pass it to the client. Now does the Resolver repeat the entire search for finding the IP address for the domain name ( Root, TLD and authoritative nameserver) or since it has got the response from the Authoritative nameserver, will it be directly going to it, In that case can we say that the Authoritative nameserver will be cached and till how much time since we are not mentioning any TTL for NS record in our DNS Records?

Score:0
cn flag

Recursive caching nameservers cache everything, and use the TTL to know when to redo a query.

we are not mentioning any TTL for NS record

Even if not mentioning them explicitly in your software/zonefile, ALL records have TTL, because this is a mandatory field in any response DNS message.

Do a dig query and you will see the TTLs.

Allen Johnson avatar
za flag
Thanks @Patrick Got it, I see that NS will have TTL. I hope Recursive caching nameservers == Recursive resolver, Suppose I have searched for example.com nearly, so the Nameserver IP address is now stored in Resolver cache. So If I search admin.example.com, will it be going to that nameserver to that particular zone of example.com, In case it is a separate zone(child zone), it will go to the mentioned nameserver in NS record for admin and find the corresponding IP address. Is my assumption correct?
Patrick Mevzek avatar
cn flag
Things are simple. Nameserver does a query. It may need to recurse. So it learns about records, and store them locally with their TTL. For any other query, and any records it need, it looks inside its cache if it has the reply already and TTL has not expired if so it uses that data and goes to next step, if not, it does the query again. IF you resolve `example.com` for whatever type you obviously have to learn about `NS` records for that zone, so next time you don't need to query for those. See Appendix A of https://www.rfc-editor.org/rfc/rfc7816.txt for a typical full algorithm in resolution.
Patrick Mevzek avatar
cn flag
A recursive nameserver can work without a local cache. So all recursive nameservers are not necessarily caching ones, but certainly the vast majority for obvious performance reasons. All caching nameservers are most probably recursive ones, but lately with "CNAME at APEX" features and things like that even some authoritative nameservers may need to be recursive and will need a cache.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.