How to Configure Stub Zone in Windows DNS Server
We all must have heard about Stub Zone. It is basically a read-only copy of primary DNS server like a secondary. It mainly points at the zone that contains all the resource records that are required for the name resolution. There are records like Start of Authority and host records. It never replicates data from the primary DNS server. There are ample uses of Stub Zone. In the following paragraphs, we will come to know about the different steps for configuring stub zones in Windows DNS Server. It is very easy to configure stub zone in Windows DNS Server. In most of the cases, DNS Server or Power Shell is used to configure stub zones. Take, for example, there is an AD domain which is named as mustbegeek.com. There is another domain that is named as corp.mbg.com
- Stub zone usually needs to be configured in the DNS Server of the domain that needs the name resolution for other domains. Here corp.mbg.com is the one who needs the name resolution to host in mustbegeek.com. Thus, it is important to create a stub zone named mustbegeek.com in BG-DCO001. It can be started by opening the server manager in BG-DCO001and then navigate to tools>DNS Manager. Just look at the below picture.
- Now expand the server name and under this server name the user can get some items and folder icon that will include Forward Lookup zone and Reverse Lookup Zone.
- As the target seems to be a forward lookup zone, so the user should right-click on the forward lookup zone and select the new zone. The next picture will guide the user in the correct way.
- Soon the user will see that there is a welcome screen that will appear on the computer and he should click on the OK button. Just have a look at the image that is provided below.
- In the next option the user should click on the select stub zone mode that comes all along with the zone type selection.
- At the same time the user can also tick on the store the zone that appears in the active directory. It is mainly done to replicate this zone to the DNS Server. In the next step, the user will set the replication scope. Here the user can select to replicate the zone to all the DNS Servers that are running on domain controllers in this domain that is corp.mbg.com
- The next step will be followed by specifying the stub zone name that the user wishes to create. Remember it should be matching with the zone name in the master. Here it will be mustbegeek.com. The next picture will make the whole thing clear.
- At the same time, the user should also specify the IP address of the DNS server where one could refer to for all the information’s that have been specified previously. In case of mustbegeek.com one can get detailed information from 192.168.0.7. It is the IP address of AS- DCO001. The user should enter the IP address and press the enter button. If the entry is a valid one, then the user will notice a green mark.
- In the last step, the user can verify everything is correct or not. If required each and every step may be checked several times. If everything goes well then the user can press the OK button to finish the work. Just see the image that is provided below.
- The user may see the zone with an error message that may appear like the below picture.
- Now if it is seen then there is nothing to do but to wait for a while and refresh the view. That can be the correct way to get rid of the issue. If required the user can also initiate the transfer manually by simply right-clicking on the zone name and select transfer from the master. It is now hoped that the problem will be solved.
- The moment transfer is completed the user will be able to see the result. Please note that in the stub zone only SOA, NS and A record of the master DNS server are present. Keep a look at the below image.
Even one can also sue power shell to configure Stub Zone. It is much easier because there is only step followed in this process and that is very simple. The user will be required to enter the command below in an elevated power shell window in order to add a stub zone that is integrated into the Active Directory.
Add-DnsServerStubZone -Name ZONE_NAME -MasterServers MASTER_IP -ReplicationScope SCOPE
- The users can also REPLACE_NAME with the name that they want to put. At the same time, the MASTER _IP can also be replaced with the IP addresses of the master server. If there is more than one master server then the same can be separated by using a comma. Even replace SCOPE with any of the values and that too depending upon your wish.
- Now, once the stub zone is configured hosts in corp.mbg.com will now appear for mustbegeek.com. Let’s have a look at both the picture that will appear. The first one is the first picture and the second one is the picture that will be achieved after the configuration work is completed.
The role of DNS is quite vital in the whole process. It is the master itself that will perform the mapping and will also return the answers to the previous DNS Server. Ultimately DNS Server will forward the whole answer to the client. In short, DNS acts as an intermediate between the master and the client. So, the role is very important in most of the case. Stub zone works by not keeping any copy of the records from the master. Creating a secondary zone may not be the main work of the Stub zone. So in most of the cases it is seen that stub zone is always the best option. It is always preferred by people.