-2

I know that DNS forwarder cache is build up from responses by the authoritative name servers. But does it build its cache from the requests process by it? Let me explain what I mean.

Lets say I have the following:

  1. host A
  2. local nameserver LOCAL (includes A)
  3. forwarder FRWD (LOCAL forwards to FRWD)
  4. a nameserver INTR, sits between LOCAL and FRWD.
  5. Root nameserver ROOT
  6. external nameserver EXTR
  7. external host B (part of EXTR)

If A queries for B.EXTR, LOCAL fowards the request to FRWD. FRWD then does the DNS steps and builds cache with responses from EXTR.

However, if there is a request from another external nameserver EXTR420 to FRWD to resolve A.LOCAL. What will be FRWD's response? Is it LOCAL or INTR?

3
  • 2
    It's a bit hard to understand the layout of nameservers in your question. Which servers are the authoritative nameservers for which domains (invent some example domains if you need to in order to make this clearer), which are local caching servers? Where you say INTR "sits between" LOCAL and FRWD what is the definition of that?
    – Mintra
    Dec 23, 2015 at 13:46
  • All servers are authoritative. FRWD is both caching and authoritative. About INTR, host A is connected to LOCAL, then up the tree LOCAL is connected to INTR, and higher up INTR is connected to FRWD.
    – theD
    Dec 23, 2015 at 14:59
  • 2
    I don't follow your question. Just take a single DNS server for example, if it finds an external name for a query, it caches it. Where is all the complexity in your question coming from?
    – strongline
    Dec 23, 2015 at 16:10

1 Answer 1

2

You're mistaking DNS resolvers and DNS authoritative servers. These are not the same.

Every domain belongs to certain DNS zone. And each zone has its DNS authoritative server (or some servers, if the zone is large). Authoritative server knows addresses of subdomains in its zone. DNS requests pass through the chain of DNS zone servers. Say, request for "some.domain.com" will be addressed first to the root server, that will return the address of authoritative server for .com DNS zone. Then .com zone authoritative server will return the address of authoritative server for .domain.com. Then the server of .domain.com will return the final IP address of some.domain.com.

So, if LOCAL is the authoritative server for A's domain, it will store the final IP address of A. And authoritative servers for upper domain levels will refer to it for resolving A's address.

If client requests for domain name, it sends request to the DNS server that is set in its configuration (usually it's an ISP DNS resolver). Resolver is a server that can cache DNS records and return cached IP addresses (its response is marked as non-authoritative) to avoid the long chain of authoritative requests. If resolver has no cache for the requested domain, it performs the request to authoritative servers. Records in cache are stored for TTL seconds, then they have to be re-requested. But client may request for response directly from authoritative servers if he wants, and pass the whole long authoritative servers chain, beginning from the root.

Really, the whole picture is much more complicated and detailed, but principally it works like this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .