Domain Name Server
The DNS system forms one of the largest and most active distributed databases on the world, without which Internet would stop working. Domain name servers translate domain names to IP addresses. Every time you use a domain name, you use the Internet’s domain name servers (DNS) to translate the human-readable domain name into the machine-readable IP address.
How It Works
Assuming no caching, let’s discuss how a name server converts the domain name sparksupport.com into an IP address. A name server would start its search for an IP address by contacting one of the root name servers. The root servers know the IP address for all of the name servers that handle the top-level domains ( .COM, .NET etc domains ). Your name server would ask the root for sparksupport.com, and the root would say (assuming no caching), “I don’t know the IP address for sparksupport.com, but here’s the IP address for the COM name server.” Your name server then sends a query to the COM name server asking it if it knows the IP address for sparksupport.com. The name server for the COM domain knows the IP addresses for the name servers handling the SPARTKSUPPORT.COM. Your name server then contacts the name server for SPARKSUPPORT.COM and asks if it knows the IP address for sparksupport.com. It does, so it returns the IP address to your name server. Hurray !! human-readable domain address is so converted to machine-readable IP address.
BIND Name Server
The Berkeley Internet Name Domain (BIND) server implements the Internet Domain Name Service (DNS) for Linux operating system. BIND is based on a server-client relationship. There are several different classes of servers, with varying degrees of authority. Different BIND server configurations possible are Primary Server, Secondary Server, Caching-only Server, Forwarder Server, Slave Server.
A primary master server for a domain is the authority for that domain. This server maintains all the data corresponding to its domain. Each domain should have at least two master servers: a primary master, and a secondary master to provide backup service if the primary is unavailable or overloaded. A server can be a master for multiple domains, serving as primary for some domains and secondary for others.
A secondary master server is a server that is delegated authority and receives its data for a domain from a primary master server. At boot time, the secondary server requests all the data for the given domain from the primary master server. This server then periodically checks with the primary server to see if it needs to update its data.
A slave-and-forwarder configuration is useful when you do not want all the servers at a given site to interact with the rest of the Internet servers. A slave server always forwards queries it cannot satisfy locally to a fixed list of forwarding servers, instead of interacting with the master name server for the root and other domains. The forwarding server would forward the queries and interact with other name servers on the Internet to resolve each query before returning the answer.
How to verify whether DNS is working correctly ?
After you have setup your DNS Server, it’s very important to check that the entries which are populated to the Internet are correct. You can use the following checklist using nslookup.
Querying DNS entries for sparksupport.com at the DNS Server 126.96.36.199 [root@spark root]# nslookup Note: nslookup is deprecated and may be removed from future releases. Consider using the `dig' or `host' programs instead. Run nslookup with the `-sil[ent]' option to prevent this message from appearing. >; server 188.8.131.52 Default server: 184.108.40.206 Address: 220.127.116.11#53 > set q=any > sparksupport.com Server: 18.104.22.168 Address: 22.214.171.124#53 sparksupport.com mail exchanger = 0 ASPMX.L.GOOGLE.com. sparksupport.com text = "v=spf1 a mx ~all" sparksupport.com origin = ns1.sparksupport.com mail addr = sales.sparksupport.com serial = 2006110200 refresh = 1200 retry = 7200 expire = 1209600 minimum = 86400 sparksupport.com nameserver = ns2.sparksupport.com. sparksupport.com nameserver = ns1.sparksupport.com. Name: sparksupport.com Address: 126.96.36.199 > exit [root@spark root]#
Every domain has a domain name server somewhere that handles its requests, and there is a person maintaining the records in that DNS. This is one of the most amazing parts of the DNS system — it is completely distributed throughout the world on millions of machines administered by millions of people, yet it behaves like a single, integrated database!