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.
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:
- DC1: A pre-configured Windows Server 2016 domain controller for the mcsalab.local domain.
- IP address: 10.0.0.100/8
- Primary DNS server: 10.0.0.100
- Secondary DNS Server: 10.0.0.101
- Server1: A Windows Server 2016 member server of mcsalab.local domain.
- IP address: 10.0.0.101/8
- Primary DNS Server: 10.0.0.101
- Secondary DNS Server: 10.0.0.100
Configuring Domain Member as a Domain Controller
When you promote a server to an additional domain controller a DNS server is required. You can either use a pre-configured DNS server of your domain or you can install and configure DNS server later. However, it is not applicable during the primary domain controller (root domain) configuration. That’s why the DNS Server role is gray out during the primary domain controller promotion. In our scenario, we have a pre-configured DNS server (on root domain server DC1) and going to install and configure DNS server on the additional domain controller (on Server1). To configure a domain member (Server1) as a domain controller, you need to perform the following steps:
- Open the Server Manager console and launch the Add roles and features wizard.
- Click Next until the Select server roles page is displayed, select the Active Directory Domain Services check box, and then click Add Features to add dependent features.
- Click Next and accept the default selections through the rest of pages and complete the installation.
- On the Server Manager console, click the Notifications icon, and then click the Promote this server to a domain controller link.
- On the Deployment Configuration page:
- make sure that the Add a domain controller to an existing domain radio button is selected.
- Under the Supply the credentials to perform this operation section, click Change and set the credentials in the DomainName\Administrator format.
- On the Domain Controller Options page, remove the Domain Name System (DNS) server check box. We will show you how to install DNS Server Role manually.
- Set the desired DSRM password section, and then click Next.
- Click Next until the Prerequisites Check page is displayed and then click Install. Reboot the server once the installation process completes.
Creating and Configuring DNS Zones
After configuring Server1 as a domain controller, we will create a DNS zone on Domain Controller (DC1). After that, we will replicate and test the same DNS zone on Server1. To create and configure a DNS zone, you need to perform the following steps:
- On the Server Manager console of DC1, click Tools and open the DNS Manager console.
- Expand domain server, select and right-click Forward Lookup Zones, and then select New Zone.
- Navigate to the Zone Type page, make sure that the Primary zone radio button is selected.
- Remove the Store the zone in Active Directory check box, and then click Next.
- On the Zone Name page, type a zone name and then click Next.
- Navigate to the Dynamic Update page, make sure that the Do not allow dynamic updates radio button is selected and then click Next and finish the wizard.
Adding Hosts to DNS Zone
After creating a DNS zone, you have to add the desired hosts to this zone. In our scenario, we will add Server1 host to our DNS zone. To do this, you need to perform the4 following steps:
- On the DNS Manager console, expand Forward Lookup Zones. Select and right-click the created zone, and then select New Host (A or AAAA).
- On the New Host dialog box, specify Hostname and IP address of your host and then click Add Host.
- Click Done once you have added the desired hosts.
Installing DNS Server Role
In the previous steps, you have configured a new DNS zone on your domain controller. Further, you have also added a host to the created zone. Now, we will install the DNS Server role on the secondary server. To do so, you need to perform the following steps:
- Open the Server Manager console on Server1 and launch the Add roles and features wizard.
- Click Next until the Select server roles page is displayed and then select the DNS Server role.
- Click Add Features, click Next through the rest of the pages and complete the installation process.
Replicating DNS Zones
After installing the DNS server role, now its time to replicate the DNS zones from primary DNS server to secondary DNS server. To do so, perform the following steps on the secondary DSN server (Server1).
- Open the DNS Management console and refresh the console. Verify that the DNS zones of the primary DNS server are displayed.
Note: If the zones are not displayed, proceed to the next steps.
- Open the Active Directory Sites and Services console, expand Sites, and then click Default-First-Site-Name. Click Servers and then click primary domain controller (DC1).
- Select NTDS Settings, select and right-click the Server1 replication connection, and then select Replicate Now to replicate the DNS changes.
Note: If you receive an error message, proceed to the next step.
- Under the NTDS Settings node, select and right-click the DC1 replication connection, select Replicate Now, and then click OK. Switch back to the DNS Manager console, refresh the console and verify that the DNS zones are displayed.
In this post, we have discussed how to install and configure DNS Server in Windows Server 2016. Do not stop here, your task is still not completed. Stay connected for the next post that how to configure DNS forwarder in Windows Server. Do share the article if you love this.