Install and Configure DNS Server in Windows Server 2016

This article is a step by step tutorial on how to install and configure a DNS Server on Windows Server 2016 /2012 R2. Also we will show you how to create forward and reverse lookup zones. For a start, we’ll also take a look at what’s the DNS service and what it is used for.

What is DNS Server ? 

Domain Name System (DNS) is a service that is used to perform the name resolution. Name resolution is a process to map domain names into IP addresses and vice-versa. The systems communicate to each other using the IP addresses, however, it is difficult to remember the IP addresses of each client in a large enterprise network. DNS service allows you to communicate with the systems using the domain names, which is easier to remember than IP addresses.

Most often, the DNS server role is installed along with the installation of the Active Directory domain controller role. If you don’t need AD, you can install the DNS server role separately.

In this post, we will explain how to install and configure DNS server in Windows Server 2016. Before to configure DNS server, first understand the topology we are going to use. To demonstrate this step by step guide, we will use the following systems

PDC: A pre-configured Windows Server 2016 domain controller for the blog2india.com domain. 
  • IP address: 172.16.200.85/24
  • Primary DNS server: 172.16.200.85 
  • Secondary DNS Server: 172.16.200.86 
ADC: A Windows Server 2016 member server of blog2india.com domain.
  • IP address: 172.16.200.86/24 
  • Primary DNS Server: 172.16.200.86 
  • Secondary DNS Server: 172.16.200.85
Important! Before install, make sure your DNS server has a static IP-address.

Now let’s begin.

The fastest way is to install the DNS server role in Windows Server 2016 using the following PowerShell command (run it with an administrator permissions):

Install-WindowsFeature DNS -IncludeManagementTools

You can also install the DNS server role from the Server Manager GUI. Open Server Manager and click on Add Roles and Features.

Select Role-based or feature-based installation option and click on Next.
Here you need to select desired server you’d like to install DNS Server (usually this is the current server).
From Server Roles lists select DNS server and click on Next. Click Add Features on the popup window—in this case, the DNS management console and PowerShell DNS module will be installed automatically. If you want to manage this DNS server remotely, you can not install these tools
Now you can see that item DNS is checked
here just click on Next
.
To confirm installation press install, here you have to wait till installation completed then click Finish
So, the server role of the DNS server is installed. Now you can configure your DNS Server. To run DNS server management tools, click on Tools in the upper right corner of Server Manager and click on DNS in the drop-down list
Select your server on the left side of DNS Manager window to open zone list.


Currently there are no zones configured on your DNS server. This server is called caching. Zones are parts of the namespace for which the server is responsible. Forward lookup zones are used to convert a name to an IP address. The reverse lookup zone, on the contrary, matches the IP address with the hostname. The presence of a reverse lookup zone on the DNS server is not necessary, but it is easy to configure and provides the full functionality of the DNS service.

Right-click on Forward Lookup Zones and click on New Zone from context menu to bring up the New Zone Wizard.
In this step you can select the type of DNS you want to use. The primary zone will be located on your server, the secondary zone will be located on another server. The secondary zone is used in large networks for load balancing.

In this window click Next.
Choose Primary zone and click on Next to continue.
Enter any name for new zone name and click on Next button.
Select New DNS Zone File Name and click Next

Dynamic updates allow DNS clients register their resource records in DNS database automatically, but if the network is small we can make updates of DNS database manually. It is recommended to allow dynamic updates, but only if DNS will be used exclusively on your local network. Otherwise, this item may entire security risks, as the “New Zone Wizard” will warn you about.
Your New Zone creation has been Completed and click Finish
That’s all, forward zone created. Setting the zone is done by adding DNS records to the zone. There are several types of DNS records. Consider the main types of DNS records:

A-record (AAAA-record)—matches the hostname and IP address
CNAME-record—used to forward to another name
MX—mail entry, points to mail servers
NS—points to DNS server
If earlier you have chosen Do not to allow dynamic updates, you should add records to zone manually. To do this right click on zone name and click on New Host (A or AAAA).
Here enter name and IP-address of your DNS Server in appropriate fields and then click Add Host.
A message appears stating that the node has been created.
The host record was successfully created.



You can also create an A record using PowerShell:Add-DnsServerResourceRecordA -Name 'Server1' -ZoneName 'blog2india.com’ -IPv4Address 172.16.200.91

Now you should add Reverse Lookup Zone. To do this right click on Reverse Lookup Zone and click on New Zone from the action menu to bring up the New Zone Wizard.

Next steps will be the same as for Forward Lookup Zone, click Next.
Choose Primary zone and click on Next to continue.
Here you need to select the type of IP-address, check on IPv4 and click on Next to continue.
In Network ID field enter the first three octets of your DNS Server IP-address.
Check Do not allow dynamic updates and press Next.
Click on Finish button and your DNS server is now configured and ready for use
Now start>RUN TYPE your Domain Name look like below screen and click OK 
Make sure show look like below screen it means your Domain and DNS Working fine.

Tips. Don’t forget to check which DNS server is specified in the settings of the network interface (it should be, respectively, the IP address of the current server).

Now you need to configure PTR(Pointer record) in reverse lookup Zone right click Network Address in Reverse Lookup Zone and click New Pointer


Browse your host Name and click OK
Click OK
Below you can see New PTR record has been created is now created

In order for a DNS server to resolve addresses in other zones, you need to configure DNS Forwarders. To do this, in the DNS Manager console, open the properties of your server.

DNS Forworders: A forwarder is a Domain Name System (DNS) server on a network that forwards DNS queries for external DNS names to DNS servers outside that network. You can also forward queries according to specific domain names using conditional forwarders



Go to the Forwarders tab, click the Edit button and add the address of the external DNS server to which you want to forward requests (for example, 8.8.8.8 and 9.9.9.9). and Click Apply



Post a Comment

Previous Post Next Post