Domain Name System (DNS) is a network service that maps, or resolves, domain names to their respective IP addresses. It reduces the need for users to remember IP addresses because they can refer to machines on the network by name. The mapping done by /etc/hosts on a small local area network (LAN) is handled by DNS on large networks, including the Internet.
Nameserver Types
1. Authoritative nameservers
– An authoritative nameserver responds to queries about names that are part of their zones only.
– Authoritative nameservers can be either primary (master) nameservers or secondary (slave) nameservers.
– Each zone has at least one authoritative DNS server.
– A DNS query returns information about a domain and specifies which DNS server is authoritative for that domain.
2. Primary nameserver (master nameserver)
– A primary nameserver, or master nameserver, is the authoritative server that holds the master copy of zone data. –
– Secondary nameservers, or slave nameservers, are also authoritative but copy zone information from the master nameserver or from another slave nameserver.
– A nameserver can also serve as a primary or secondary server for multiple zones at the same time.
3. Caching-only nameservers (recursive nameservers)
– Caching-only nameservers, or recursive nameservers, offer resolution services but they are not authoritative for any zone.
– These DNS cache nameservers store answers to previous queries in cache (memory) for a fixed period of time.
– When a caching-only nameserver receives a query, it answers from cache if it can. If it does not have the answer in cache, it forwards the query to an authoritative server.
– Although it is not recommended for reasons of security, nameservers can also be configured to give authoritative answers to queries in some zones, while acting as a caching-only nameserver for all other zones.
DNS configuration file /etc/named.rfc1912.zones explained
DNS configuration file /etc/named.conf explained