0
  1. Disk file
  2. Network Access

There is a nice explanation on Are Domain Name Server and Name Server the same thing?

But I still confused about answer. I know primary DNS server caches entries so answer should be disk file, but without other servers it will never have that entry, so answer should be Network access.

Is this question have some logical answer? or is it one of those question whose answer depends on initial conditions?

If somebody can direct me to right direction, it will be big help, I am very confused.

parvesh
  • 111
  • 3
  • Could you clarify what kind of "primary name server" are you talking about, and why are files involved? (Do you mean the primary/secondary servers that are configured in e.g. Windows, or do you mean the primary/secondary "authoritative" nameservers that a domain would have?) If this is some kind of homework/test question, could you post the whole thing with context? – u1686_grawity Feb 15 '21 at 10:02
  • yes primary DNS server like Cloudfare. Actually this was whole question in test. – parvesh Feb 15 '21 at 10:12
  • Specifically like Cloudflare's 1.1.1.1 public resolver? Do any of the previous questions in the test clarify what kind of file do they mean? (I have a guess that they might be referring to the root hints file, but still, "a file" doesn't really say much when it comes to DNS resolvers.) – u1686_grawity Feb 15 '21 at 10:20
  • Cloudflares 1.1.1.1 are recursive nameservers. – davidgo Feb 15 '21 at 18:31

2 Answers2

2

Any DNS server gets information from both disk based configuration files and from the network.

For queries regarding domains for which it is authoritative, any DNS server gets the information from disk files loaded at startup (or on reload signal).

For queries regarding domains for which it is not authoritative, any DNS server gets some information from the network (especially if supporting recursive queries).


Your question is about primary DNS servers but it is worth remembering that secondaries generally pull zone-transfers from primaries.

For DNS clients, the order in which their DNS servers are listed is generally irrelevant.

2

The answer depends on exactly what you mean by "Primary DNS Server" - this term is a bit vague, but I'll unpack the common interpretations below, as I suspect this may be where confusion is coming in.

There are (sometimes a combination) of 2 types of nameservers - Recursive and Authorative servers.

Authorative Servers hold the "source of truth" for a domain name. When you are modifying A/CNAME/MX or other records for a domain, you are doing this on/for an authorative nameserver. In the simple case this is stored on disk, but see below

A Recursive server acts for computers on a network to resolve any/all domains. The nameserver in your router would be a recursive nameserver. These servers query other nameservers (either other recursive nameservers or the authorative servers) so the general answer is these get their information from the network.

More about Authoritative Servers

There are multiple types of authorative servers. The 2 common types are "master" and "slave" servers.

Master servers typically read their data from user provided input - often a zone file stored on a disk (common use case for BIND), but they can also get them from a database (Pro DNS, Pure DNS typically are configured this way).

To end users/recursive servers, Slave servers behave exactly like master servers - but the slave servers get their information from the master servers across a network. This is done using zone transfers, so they have all the information required and can continue to answer all requests for the zone in case the master server goes down.

It is quite common to have multiple master servers and no slave servers, provided they all have exactly the same answers.

davidgo
  • 70,654
  • Database finally also boils down to a file (or a set of files) on the disk, so we can say that a master server always gets the data from a file on the disk :) – raj Feb 15 '21 at 12:13
  • @raj normally yes, and this is desireable but a database can connect across a network. – davidgo Feb 15 '21 at 18:34