How to Setup & Configure DNS Server on Windows 2008 R2 Server Step by Step
The Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities.
Most importantly, it translates domain names meaningful to humans into the numerical identifiers associated with networking equipment for the purpose of locating and addressing these devices worldwide.
However, most Windows administrators still rely on the Windows Internet Name Service (WINS) for name resolution on local area networks and some have little or no experience with DNS. We’ll explain how to install, configure, and troubleshoot a Windows Server 2008 DNS server.
Step 1: Install a DNS server from the Control Panel, follow these steps:
- Go to Start —> Control Panel —> Administrative Tools —> Server Manager.
- Expand and click Roles
- Click on Add Roles
Step 2 : The new window will open with the list of roles available to install. Select DNS server and Click Next.
Step 3: Click Next on the introduction windows. In the last window click on install. It will start installation, the following window shows the progress of installation.
After installing DNS, you have to go Start —> All Programs —> Administrative Tools —> DNS for managing DNS server.
Whenever configuring your DNS server, you must be know about following concepts:
- Forward lookup zone
- Reverse lookup zone
- Zone types
A forward lookup zone is helps to resolve host names to IP addresses. A reverse lookup zone allows a DNS server to discover the DNS name of the host. Basically, it is the exact opposite of a forward lookup zone. A reverse lookup zone is not required, but it is easy to configure and will allow for your Windows Server 2008 Server to have full DNS functionality.
When selecting a DNS zone type, you have the following options: Active Directory (AD) Integrated, Standard Primary, and Standard Secondary. AD Integrated stores the database information in AD and allows for secure updates to the database file. This option will appear only if AD is configured. If it is configured and you select this option, AD will store and replicate your zone files.
A Standard Primary zone stores the database in a text file. This text file can be shared with other DNS servers that store their information in a text file. Finally, a Standard Secondary zone simply creates a copy of the existing database from another DNS server. This is primarily used for load balancing.
Step 1: Right Click on the name of the server in the DNS management console, Select on the Configure DNS server.
Step 2: Click on Create forward and reverse lookup zone, then click next.
Step 3: Click on the Yes,create the forward lookup zone now on the forward lookup zone window.
Step 4: Click on the desired zone that you want to create, in this case Primary Zone.
Step 5: Type the Name of the Zone and click Next.
Step 6: Click Next on the Zone File Name.
Step 7: Select the Allow both nonsecure and Secure dynamic updates and click Next to Continue.
Step 8: Select Yes, I want to create reverse lookup zone now, Click Next to continue.
Step 10: Select Primary Zone in Zone creating Window.
Step 11: Choose whether you want to create IPv4 or IPv6 reverse lookup zone.( in mycase IPv4 Reverse lookup zone).
Step 12: Type you netword ID in the following window.
Step 13: Click Next on the Reverse lookup Zone file name window.
Step 14: Select the Allow both nonsecure and Secure dynamic updates and click Next to Continue.
Step 15: Select No, i should not forward queries, then click Next.
Step 16: Click finish on the final window.
Managing DNS Server:
After the installation and configuration of the forward and reverse lookup zone, now the server is ready to create the other records associated with the DNS and Zones. There are several records available, here i am listing some of the important records.
- Start of Authority (SOA)
- Name Servers
- Host (A)
- Pointer (PTR)
- Canonical Name (CNAME) or Alias
- Mail Exchange (MX)
Start of Authority (SOA):
Specifies authoritative information about a DNS zone, including the primary name server, the email of the domain administrator, the domain serial number, and several timers relating to refreshing the zone. The following properties window shows the information about the SOA record of the Geeksite.in Zone.
Name Servers (NS Record):
Name Servers that specify name servers for a particular domain. You set up all primary and secondary name servers through the Properties window of the Zone.
Step 1: Right Click on the Zone name and click on properties.
Step 2: Click on the Name server Tab.
Step 3: If require, add the name server by clicking Add button. You require FQDN of the server name and IP Address.
Host Records (A Record):
It is mainly used for mapping the Host name with IP address, you can able to create Pointer Record at the same time.
Here is the Steps to create the A record.
Step 1: Right click on the Zone name, Select the New Host (A or AAAA)
Step 2: Type the Name of the New Host and IP Address, then Click Add Host.
Following window shows the both Step 1 and Step 2.
Canonical Name (CNAME) or Alias records
A Canonical Name (CNAME) or Alias record allows a DNS server to have multiple names for a single host. For example, an Alias record can have several records that point to a single server in your environment. This is a common approach if you have both your Web server and your mail server running on the same machine.
Here is the Steps to create CNAME record.
Step 1: Right Click on the Zone name and click on New Alias (CNAME )
Step 2: Type your Alias Name.
Step 3: Browse for or Type the Fully Qualified Domain Name (FQDN) of the Target Host.
Step 4: Click OK.
Following window shows Step 1-4.
Mail Exchanger (MX Records):
Mail exchanger records to identify the mail server for the particular domain. We can create the mail servers records with the priority, the mail server with highest priority will be preferred first for receiving the mail.
Here are the Steps to create the Mail Exchanger record.
Step 1: Right click on the Zone name. click on the New Mail Exhanger (MX).
Step 2: Type the Host or child domain name.
Step 3: Browse for or Type FQDN of the mail server.
Following Window Shows Step 1-3.
Testing DNS Server:
The DNS server is now up and ready for resolving the domain names. Change DNS name server ip address in your local area connection, then use the Nslookup utility. Nslookup is the main utility for testing and trouble shooting the DNS server. It helps to get all the information of the prticular domain.
The following image shows the example of the nslookup command.