Configuring Forwarders using DNSCMD

by Mitch Tulloch [Published on 5 Nov. 2009 / Last Updated on 3 May 2009]

How to configure a forwarder for your DNS server from the command-line.

If your DNS server is running Windows Server Core, you can configure forwarders on your DNS server from the command-line by using the DNSCMD command. A forwarder is a special DNS server that you designate for handling client requests that your regular DNS servers cannot or should not resolve, such as requests for offsite or external DNS domain names. DNS clients typically make recursive queries, which are queries to which the responding DNS server must return a valid (success or failure) response. When the DNS server receives a client request and if a forwarder is configured on the DNS server, the DNS server sends a recursive query to the forwarder asking for a valid response.

You can use the Dnscmd command to configure one or more forwarders on a Server Core DNS server. For example, to configure the external DNS server
192.0.2.25 as a forwarder for DNS server SEA-SC4, do the following:

dnscmd SEA-SC4 /ResetForwarders 192.0.2.25 /timeout 5 /slave

The /timeout parameter in this command specifies the amount of time that your DNS server waits for the forwarder to respond. The /slave parameter indicates that the DNS server will not attempt to perform its own iterative queries if the forwarder fails to resolve the query. An iterative query is when the DNS server issues additional nonrecursive queries to other DNS servers and uses referrals from these servers to try to resolve the original query. To allow your DNS server to perform its own iterative queries if the forward fails to resolve a query, use the /noslave switch instead. Using the /noslave switch means that your DNS server will use its root hints file if no forwarders are available to resolve the query. The root hints (or cache hints) file contains entries for the root DNS servers on the Internet. These root DNS servers form the starting point for iterative queries.

For more information on managing DNS servers running on Windows Server Core, see my book Windows Server 2008 Server Core Administrator's Pocket Consultant from Microsoft Press.

Featured Links