Domain Name System (DNS)
Domain Name system is implemeted as the hierarchial and distributed database containing various types of data, including hostnames and domain names. Most prominently, it translates domain names, which can be easily memorized by humans, to the numerical ip addresses needed for the purpose of computer services and devices worldwide. A DNS name server is a server that stores the DNS records for a domain name.So corresponding to these records, the DNS name server responds to the queries.
DNS Records
SOA (Start of Authority): A start of authority (SOA) record is information stored in a domain name system (DNS) zone about that zone and about other DNS records.
A Records (Address records): It’s a 32-bit IPV4 address, which is used to map hostnames to an ip address of the host.
AAAA Records: It’s a 128-bit IPV6 address, which is used to map hostnames to an ip address of the host.
MX Records(Mail Exchangers): Maps a domain name to the list of mail transfer agents of a domain.
CNAME Record(Canonical Name): This means alias of one name to another. For example,
google.com IN CNAME www.google.com
The lookup utility of DNS will continue by retrieving new name.
NS Records(Name Server): It delegates a DNS zone, to the given authorised name servers. For example,
google.com IN NS 8.8.8.8
8.8.8.8 IN NS google.com
PTR Record(Pointer): Used to specify pointer to the domain or for implementing reverse DNS lookup. For example,
google.com IN A 8.8.8.8
8.8.8.8 IN A google.com
Also used in canonical name,
www.google.com IN A 8.8.8.8
8.8.8.8 IN A www.google.com
Configuration file: /etc/named.conf
DNS zone file: /var/named/domain.db
Restarting DNS service: service named restart or /etc/init.d/named restart
Status of DNS service: service named status or /etc/init.d/named status