Forward first | only
Introduction
Using bind as an example
When the server is configured to work in forwarding mode forward can take one of two values
first and only
TN DNS recommendation
Resolution of full names, both internal and for the Internet, is fully supported by the internal HSCN DNS infrastructure. Therefore there is no need to go forward first. In all cases the DNS caching servers will resolve not only internal nhs.uk DNS names, but also names from the Internet (external DNS).
The purpose of the infrastructure is to provide that common point where any DNS server in HSCN can resolve any and all DNS queries. Therefore there is no need to implement forwarding first on the central DNS server.
Technical assessment
In some cases the only acceptable option may be forwarding only. In cases where firewalls or other access controls do not allow the DNS server to communicate and interact with any server other than those they are configured for, the choice is simple - it must be forward only (since requests for direct contact with the root name servers will be disabled).
Even if there is open access to the root name servers (which also requires open access to communicate with any DNS server that delegation and referrals can lead to, using iterative name resolution), the policy or mandate of a group or location may still dictate forwarding only.
Despite this recommendation, there is no 100% right or wrong answer. Each approach has its advantages and disadvantages.
forward first and forward only are technical assessments of the options, provided for additional information, on the condition that the server can be configured and work properly with either setting.
forward first
This gives the greatest control to the server itself. This allows the server to resolve names from the Internet (or from the root name servers as defined in the root hints) without having to rely on or know that the forwarded servers have such access. The servers that are forwarded to will only be needed to provide answers for:
Queries that do not belong to the domains for which the forwarding DNS server is authoritative.
Certain domains that are not available on the Internet.
Queries for domains that are available both on the Internet and inside the company, but which cannot be answered for a specific query from the DNS servers on the Internet. Then the server itself can query the Internet or, alternatively, the network covered by the root name server defined in the "root hints", often called the "Internal root".
Another advantage of the "forward first" configuration is that the server performing the forwarding, if it actually goes out to the Internet, will cache not only the responses that are returned, but also any information obtained along the way (through iteration and referrals). This allows the server to build its own cache, which can reduce the amount of traffic generated by this server, especially if the total number of requested records is small and they are requested repeatedly.
Keep in mind that after forwarding is complete, if the server forwards for Internet access, it will answer Internet-related queries. This happens because forwarding is always performed first. This can create some difficulties in troubleshooting, since during diagnostics you must first determine where the answer came from: through a forwarded request or from an iterative request.
Forwarding first can also mask the symptoms of a problem - for example, if a timeout or SERVFAIL is returned from the server forwarded to, followed by a repeated query to the Internet, this last query may return either an NX domain or an undesirable answer from an Internet-connected DNS server. This can lead to false conclusions about what the real problem may be.
forward only
forward only is an excellent way to provide a clear resolution path. It also allows better control over the responses. For example, if a name usually used on the Internet is not to be resolved, it can be added to a block list or removed by returning a fake IP address. This was very common, especially when public instant messaging (IM) services were not to be used in a particular network (the IP addresses of the instant messaging servers are replaced with fake ones on the internal DNS servers).
Having a single resolution path simplifies troubleshooting. When making a query only one path needs to be checked (to the IP addresses forwarded to the server(s)).
Since forwarding uses recursive queries, it will return only the answer to the specific question asked. This does not allow the forwarding DNS server to accumulate more information in the cache.
However, by forwarding to a common point, it can take advantage of the total of all the queries that many other clients and servers have made. Iterative queries often require several packets to be sent to get an answer. By concentrating iterative queries at a common central point, the total number of DNS packets that can be generated from a larger number of DNS servers is reduced.
Related Articles:
Article author: Andrei Olegovich