DNS Server – A detailed introduction

Posted by

Home » DNS Server » DNS Server – A detailed introduction

Domain name system (DNS) is just like a phone book on internet. If you maintain a quality phone book and update it, you no longer need to remember the phone numbers of individuals. Just dial them through name. Same way on internet every server hosting a website has an IP address. You don’t need to remember the IP address. Just type the website URL (technically hostname) in your web browser. DNS server will convert this hostname into IP address and load the desired website in web browser. Below diagram explains a simple DNS name resolution process.

Introduction to DNS server

Host name to IP address conversion is perfectly fine statement. However the scope and functionality of a DNS server is not limited to only this. It does a a lot more. In the article we will take a deep dive in DNS architecture. There will be multiple supporting article around it.

How to Install DNS Server?

To Install DNS Server in Windows operating system open server manger. Then install DNS service using add remove features. After the installation our next is to create zones on DNS server. Later you can create different type DNS records in that zone.

DNS Server Zones

A zone is a partition or a collation of record that contains the information related to a specific domain. A zone file in your DNS helps other to obtain the information from DNS about your domain. In DNS servers we have two types of zones. Forward and reverse lookup zone.

Forward DNS Zone

A forward lookup zone is used typically used to convert the domain name to IP address for a domain. As an example of currently our website wintelhive.com is hosted on a server having IP 63.250.43.130. First we have a zone in DNS server with name “wintelhive.com”. Later we have created a host or A record within that zone with IP 63.250.43.130. As a result anyone opens www.wintelhive.com, web browser is directed to go to 63.250.43.130 by DNS server and website is loaded.

Reverse DNS Zone

Similarly there are cases when you might need to convert the IP to domain name. This type of request is handled through reverse DNS zone. As an example we have a PTR record for 63.250.43.130 in a reverse lookup zone 130.43.250.63.in-addr.arpa which translators into ingress-eos.ewp.live. As a result anyone querying PTR record for 63.250.43.130 will obtain ingress-eos.ewp.live in response.

Note: We need to understand two key points there. First zone name 130.43.250.63.in-addr.arpa seems live a reverse of original IP 63.25.43.130. Do not get confused. Its normal. Incase of reverse lookup zone the format of writing IP address is reversed. Secondly it is resolving the IP address into ingress-eos.ewp.live not www.wintelhive.com. Again it is normal for webservers. The real use of PTR record is in email servers. The concept of MX record, PTR record, email flow and spam filtering is covered in our other articles. This can be ignored at this stage.

DNS Record Types

DNS server host different resource records. Following are some of the commonly used DNS records.

  1. A Record: This is the simplest one. A Record is created in forward lookup zone to obtain the IP address of a host.
  2. MX Record: MX or a mail exchanger record is used by other mailing systems sending servers to find your company’s email servers. So that they can deliver email to you. MX records two parts. First is mail server host name and next is priority. For a detailed overview of MX record, we’ve a separate article on this topic. You can read what is MX record.
  3. PTR Record: A PTR is just opposite of A record. In a reverse lookup zone a PTR record converts the the IP address to the host name.

We have a detailed writeup on different DNS record types. You can go through it if you want to lean more about different type of DNS records.

DNS Server Failover and Redundancy

You can setup more then one DNS servers to achieve the failover and redundancy in your network. For this purpose you can setup primary and secondary DNS servers. There will be only one primary DNS server and multiple secondary servers. In case one of them fails, others will keep your DNS service alive and make sure everything is working. If you read the term master and slave DNS somewhere. It has same meanings are that of primary and secondary DNS.

Authoritative and Non Authoritative DNS

A authoritative DNS server for a domain is a server that contains the original writable copy of zone file. This is maintained by the domain owner itself. DNS owner creates, modify and delete the resource records on authoritative DNS servers. Where as a non authoritative DNS is one that goes to the authoritative server to resolve the domain related queries and serve the end users. Non authoritative DNS are usually maintained by ISP (Internet Service Providers). For more details and better understanding check our post Authoritative vs Non Authoritative DNS Server.

When a non-authoritative DNS servers obtains a response from an authoritative DNS. It not only gives the response to the end user but also saves this response in it own cache for future use. The process is called DNS caching.

DNS Conditional Forwarding

By default a DNS server can only resolve the domain names for which it has zone file and respective resource record. But you can configure DNS servers to forward the request to other DNS servers for specific domains. This process is called DNS conditional forwarding. This is typically used for internal and partner domains for quick and secure name resolution of specific resources or servers.

Port requirements For Domain Name System

DNS service was designed to use both TCP and UDP port 53. Which is still true. However practically you will see only UDP 53 will work fine in most of the cases. The reason behind is, DNS uses on UDP packet up to 512 bytes initially as default protocol which can comfortably resolved most of the queries. If packet size is too big or there is no response from server side id fail back to TCP port 53.

Public vs Private DNS

Public DNS servers are used over the internet for name resolution. However there are some cases when you need to use private DNS service within your organization. In order to achieve this goal, you can have internal, local or private DNS servers. All this means same.

Nslookup (DNS Client Command)

Nslookup Command line:

You can use nslookup command to query any DNS server within your network as well as on internet to resolve your DNS request. As an example if you run following command through command prompt you will be able to ger response.

nslookup -type=A www.wintelhive.com

Nslookup website:

You also can use different websites providing domain name resolution feature . One of such website is www.pingstage.com.

online web based nslookup

In some organization information security policy compliance requires to log DNS traffic. In order to deeply analyze DNS traffic through debug logging, administrators often enable debug logging feature. You may consider it in your organization. You can also enable monitoring on DNS server if needed.

Frequently Asked Questions (FAQ)

What DNS stands for?

DNS is actually acronym of “Domain name system”. Another known term is “Domain name server”.

Who run root DNS server?

Root DNS servers are maintained by I Internet Assigned Numbers Authority (IANA). There are total 13 root DNS server maintained by them. These are called root hints.

Leave a Reply

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