Domain Name Service  «Prev  Next»
Lesson 6 Name servers
Objective Describe the Three Classes of Name Servers

Three Classes of Name Servers

In the context of the Domain Name System (DNS), there are three primary classes of name servers, each with distinct roles and responsibilities in the DNS hierarchy. These classes are:
  1. Root Name Servers: The root name servers are at the top of the DNS hierarchy and are responsible for directing queries to the appropriate top-level domain (TLD) name servers. They maintain information about the authoritative name servers for all TLDs, such as .com, .org, .net, and country code TLDs like .uk or .de. When a recursive DNS resolver queries a root name server, it receives a referral to the TLD name server responsible for the requested domain. There are currently 13 root name server clusters, identified by letters A through M, with multiple instances distributed across the globe for redundancy, reliability, and performance.
  2. TLD Name Servers: Top-Level Domain name servers are one level below root name servers in the DNS hierarchy and are responsible for managing the authoritative name servers for the second-level domains within their respective TLDs. For example, a TLD name server for the .com TLD would maintain information about the authoritative name servers for domains like or When a recursive DNS resolver receives a referral from a root name server, it queries the appropriate TLD name server, which then provides a referral to the authoritative name server for the requested second-level domain.
  3. Authoritative Name Servers: Authoritative name servers are responsible for maintaining the DNS records for a specific domain, such as These records include information like IP addresses (A or AAAA records), mail servers (MX records), aliases (CNAME records), and other relevant data. Authoritative name servers can be primary (master) or secondary (slave) servers, with primary servers holding the original copy of the zone data and secondary servers obtaining updates via zone transfers. When a recursive DNS resolver receives a referral from a TLD name server, it queries the authoritative name server for the specific DNS records associated with the requested domain.

The three classes of name servers—root name servers, TLD name servers, and authoritative name servers—work together in a hierarchical structure to facilitate the resolution of domain names to IP addresses and other associated information. Each class plays a critical role in ensuring the accuracy, reliability, and efficiency of the Domain Name System.
A name server is a process that accepts queries into the DNS database. It is also common usage to refer to the computer on which this process is running as a name server. A name server process binds to the UDP[1] port and TCP[2] port 53 (the “domain” port listed in /etc/services) and listens for incoming queries. The UDP port is used for most database lookup queries (For example, what is the IP address of the machine named X?) while the TCP port is used for zone file transfers, which are described below.
Individual name servers play different roles in the overall operation of the DNS database. Three important classes of name servers, primary servers, secondary servers, and root servers, are discussed below.

Primary servers

Every zone must have exactly one associated primary name server. This name server is the unique location that has the “official” or “authoritative” DNS information on its zone. When an organization registers a new domain, it is required to supply the DNS administrators at the InterNIC with the IP address of an authoritative server for its zones. The primary server is distinguished by the fact that the DNS data for its zone is stored on the server host’s local disk in a set of files called zone files.

Secondary Servers

In addition to its primary server, a zone may have one or more secondary servers. A secondary server provides an alternative source for information on the zone. Secondary servers allow for load distribution (so that the authoritative server need not answer every query) and provide a backup (in case the authoritative server crashes or is down for maintenance.) Administrators of DNS zones are required to supply at least one secondary server for each zone when they register their domain.
Secondary servers obtain their data from the authoritative server by periodically downloading a copy of the authoritative server’s zone files. This transfer is called a zone file transfer. Zone file transfers between name servers use TCP port 53.
A primary or secondary server for a zone is called authoritative because it obtains its information directly from data files describing the zone.

Root servers

The root servers are the servers for the root domain. They are operated by the InterNIC. At present, there are twelve root servers, named A.ROOT-SERVERS.NET, B.ROOT-SERVERS.NET, and so forth.
The root servers play a crucial role in binding together the DNS database through the mechanism of recursion, which we will discuss in the next lesson.

[1] UDP: User Datagram Protocol (UDP) is a procotol that sends data from one program to another using Internet Protocol (IP). UDP is less reliable than TCP because it provides unverified transportation for individual messages.
[2] TCP: Transmission Control Protocol (TCP) is a protocol that sends data from one program to another using Intenet Protocol (IP). TCP is connection-based and, therefore, more reliable than UDP.