DNS Protocol – recursive and non-recursive queries

  DNS, DNS theory, Protocol of DNS

When you sending a request to DNS server in the header can be indicated , if you want to perform the recursive request. This means that if the DNS server does not know the response itself (not authoritative for the domain for which we asked), launch the standard algorithm for finding response (ie. begins at the root DNS servers and proceed to the lower levels to the finish) and sends the final result. However, it depends on the server that actually performs a recursive request. The server may reject it and send it to the client-only known response. When do not know nor part of the answer, often sends back a list of root DNS servers (which tells us where we have to start looking).

The rule should be that the authoritative DNS servers do not perform recursive requests, and care only about their main task, provide authoritative data about their h given list of domains and their records. Conversely, the caching DNS servers must perform recursive requests.

The combination of authoritative and caching DNS server on one machine is a bad idea, because it may cause some problems. For example, if we have domain „xyz.cz“, that has the authoritative server „ns.abc.cz“ and we at the same time using this server as the caching, provides access to the entire DNS system on the Internet. If it happens that the domain “xyz.cz” changes its authoritative DNS servers, so the DNS servers of domain “cz” are delegated elsewhere than on “ns.abc.cz”, and “ns.abc.cz” server administrator will forget to delete this zone on the server (eventually does not know about the change of the situation) and we ask for a domain “xyz.cz”, we will get a response from “ns.abc.cz” that not only may not be true but also poses as authoritative. It’s because of the server “ns.abc.cz” is still configured as authoritative for this domain, and the validity of the delegation of the domain itself does not verify. By strictly separating authoritative and caching DNS servers, this problem does not occur.