Skip to content
Блог › Software configuration › Main types of DNS servers and their functions

Main types of DNS servers and their functions

The DNS service is one of the core Internet services that ensure its operation. For its functionality, various types of servers are required, which are usually located at considerable distances from each other. Understanding the principles of their interaction allows an administrator to make the right decisions in case of unexpected situations, of which there can be many. Let us consider the main types of DNS servers and the scheme of their interaction.

Basic Concepts of DNS Servers

In an article dedicated to the domain life cycle, we have already examined the structure of the domain name system, in which each part of a domain name is assigned to a separate domain zone managed by one or more DNS servers.

Based on this, we can distinguish the following main types of servers:

  • Root server;
  • Top-Level Domain server (TLD server);
  • Authoritative server;
  • Recursive or forwarding server.

Let us take a closer look at the purpose of each server group.

Root Server

The root server serves the root domain zone, which is responsible for processing the rightmost part of a website’s name (see Figure 1). This part is conventionally denoted by an empty character. Usually, the “.” symbol preceding the root is omitted, without affecting domain processing.

Its main purpose is to store current information about TLD servers, which allows them to be located and enables processing of the corresponding part of the site name.

Their number is limited by the size of a DNS packet and therefore cannot exceed thirteen units. However, due to the presence of mirrors, their total number in the world is approximately two hundred. Mirrors are located throughout the globe — in North and South America, Europe, and Africa. They increase the fault tolerance of the DNS system and reduce the load on the most heavily used network segments.

Figure 1. DNS query processing scheme by servers of different types.

Top-Level Domain Server (TLD Server)

The TLD (Top Level Domain) server processes the first part of the domain name following the root — gov, info, edu, net, com, org, etc. (see Figure 1). It may serve different types of top-level domain zones depending on the domain type: gTLD (generic), sTLD (sponsored), ccTLD (country code), etc.

This server is the first in the hierarchy of name processors, excluding the root. It may be followed by processors of the second, third, and other levels.

Authoritative Server

An authoritative server can be primary (master) or secondary (slave). Its main task is to store and provide, upon request, the actual IP addresses belonging to its zone. In other words, it responds to queries for names that are already configured in its system. The corresponding domain zones must be configured beforehand.

Requests to these servers can only be made from name servers, ensuring optimal performance and fast response times.

The master stores copies of all records in the domain zone and allows modifications. All subordinate devices receive updates automatically.

The slave contains an exact copy of the primary database and interacts directly with the master using built-in DNS mechanisms. Modifications are not allowed. Its primary purpose is load balancing and failure protection.

An authoritative server may provide the following types of responses to a name resolution request:

  • Complete name resolution using DNS records from its own storage;
  • Redirection to the appropriate name server if it cannot provide the answer;
  • NXDOMAIN error if the requested name does not exist;
  • NODATA error if the name exists but the corresponding DNS record is not found.

Recursive Server

The recursive server responds to DNS queries by requesting DNS record information from name servers, including gTLD and others. It does not have a permanent data storage but uses only temporary information or cache, which is periodically updated.

The group of recursive servers includes resolvers, caching servers, forwarding servers, and certain other hardware-software devices.

Typical types of responses produced by devices in this group:

  • Complete resolution of the requested name based on a DNS record from local storage (if available);
  • NXDOMAIN or NOERROR error;
  • Non-authoritative response based on cached data from a previous recursive query;
  • Forwarding data received from remote authoritative sources, such as TLD servers.

The recursive server is most commonly used to answer general DNS queries in a local network.

DNS Query Formation

Let us describe an approximate scheme of how DNS servers “work” to resolve a domain name, using Figure 1 as an example:

  1. The DNS client sends a recursive request to resolve the site name (example.net) to the local resolver;
  2. The local resolver checks its zones, and if the required zone is not found, it forms an iterative request to the root server;
  3. The root server returns the IP address of the name server for the .net top-level domain;
  4. The local resolver sends an iterative request to the .net TLD server;
  5. The TLD server returns the IP address of the name server that serves the example.net domain;
  6. The local resolver forms an iterative request to the provided IP address;
  7. The authoritative server resolves the domain name and returns the IP address of the requested web resource to the resolver;
  8. The resolver passes the obtained IP address for “example.net” to the DNS client, completing the request processing.

We have described a simplified scheme of determining an IP address, in which additional elements — extra resolvers, caching devices, etc. — may also be present, but the principle of forming and processing queries remains the same.

Leave a Reply

Your email address will not be published. Required fields are marked *