The working principle of the NS query When the DNS client needs to query the name used in the program, it will query the DNS server to resolve the name. Each query message sent by the client includes three information to specify the problem that the server should answer:
The specified DNS domain name is represented as a full qualified domain name (FQDN) specified query type, which can specify resource records according to the type, or as a special type of query *. The specified category of the DNS domain name. For Windows DNS servers, it should always be specified as an Internet (IN) category.
For example, the specified name can be a computer's FQDN, such as Host-a.example.microsoft.com, and specified query types for the address (a) resource record. Two part of the DNS query as a client as a client, such as "For a computer named hostname.example.microsoft.com, do you have A resource record?" When the client receives a response from the server, it reads And explain the A resource record of the response to understand the IP address of the computer that is jealous.
DNS queries are parsed in a variety of different ways. The client can sometimes answer the query by cache information obtained from the previous query. DNS servers can use their own resource record information cache to answer queries. The DNS server can also represent the request client to query or contact other DNS servers to completely resolve the name, and then return to the client. This process is called recursive.
In addition, the client can also try to contact other DNS servers to parse the name. If the client does, it will use the independent and additional query based on a server response. This process is called iteration.
In short, the DNS query process is performed in two parts:
The name query is parsed from the client and transferred to the resolution program (DNS Customer Service). When you cannot parse the query on site, you can query the DNS server as needed to parse the name. The following sections explain these two processes:
Part 1: Local parsing procedures The following image shows an overview of the complete DNS query process.
As shown in the initial step of the inquiry process, the DNS domain name is used by the program of this unit. This request is subsequently transmitted to the DNS Customer Service to parse by using information on the ground cache. If you can parse the name of the query, the query will be answered and this process is complete.
The cache of the local resolution program can include name information acquired from two possible sources:
If the host file is configured, the mapping from any host name from the file is preloaded into the cache when the DNS customer service is started. The resource record obtained from the response from the previous DNS query response will be added to the cache and retained for a while. If this query does not match the project in the buffer, the resolution process continues, the client queries the DNS server to parse the name.
The first part: Query the DNS server as shown in the previous figure, the client will query the preferred DNS server. The actual server used in the initial client / server query section of this process is selected from the global list. For more information on how Windows 2000 assembles and updates a global list, see the client function.
When the DNS server receives the query, first check whether it can make an authoritative response based on the resource record information acquired in the server's local configuration area. If the name of the query matches the corresponding resource record in the local area information, the server makes an authoritative response and uses this information to parse the query name.
If the name of the query is not area information, the server checks whether it can parse the name through the previous query information of the local cache. If you find the matching information, the server uses it answers the query. Then, if the preferred server can use a positive match response from its cache to answer a request, the query is completed.
If the query name is not found in the preferred server, the query process can continue and use the recursive to fully resolve the name. Includes support from other DNS servers to help parse the name. By default, the DNS Customer Service Requires the server to use the recursive process before returning to reply to the client fully resolved the name. In most cases, the default configuration of the DNS server supports the recursive process, as shown in the following figure. Enlarged Graph In order to make the DNS server correctly perform the recursive process, first require some useful contact information about other DNS servers within the DNS domain space. This information is provided in the form of root clues, which is a list of initial resource records that can be used to locate other DNS servers with absolute control of the DNS domain space tree. The root server has an absolute control for the roots and top-level domains in the DNS domain space tree. For more information, see Update Root Tips.
The DNS server can complete the recursive process by searching root servers using root threads. In theory, the process allows any DNS server to locate those servers that have absolute control at any other DNS domain name used in the domain name space tree.
For example, when the client queries a single DNS server, consider using the recursive process to locate the name host-b.example.microsoft.com. This process is on the first time the DNS server and the client start and does not help parse local cache information for the name query. It assumes that the name of the client query is used for a domain name that the server does not understand according to its configuration.
First, the preferred server analyzes the full name and determines the location of the server with an absolute control of the top-level domain "COM". Subsequently, the "COM" DNS server uses iterative queries to obtain reference information for the "Microsoft.com" server. Subsequently, the reference response is transmitted from the "Microsoft.com" server to the DNS server of "eXample.microsoft.com".
Finally, contact the server eXample.microsoft.com. Because the server includes a query name as part of its configuration area, it is authoritatively responded to the start-up source server. When the source server receives the response that has obtained the authoritative response to the request query, it forwards this acknowledge to the requesting client, so that the recursive query process is completed.
Although the above recursive query process may take up a lot of resources, it still has some performance advantages for the DNS server. For example, during recursive processes, the DNS server that performs recursive queries can obtain information about the DNS domain namespace. This information is cached by the server and can be used again to improve the response speed of the subsequent query that uses this information or matching. Over time, these cache information will continue to increase and occupy a large number of server memory resources, but this information will be cleared at the end of the DNS service shutdown or one of its working cycles.
The candidate query response previously discussed for DNS queries all assumes that this process returns a positive response to the client at the end. But in fact, the query can also return to other answers. The most common response is:
Authoritative response affirmative response reference response Negative response Affirmative response is a positive response to the client and the "authorization agency" bit set together in the DNS message, "Authorization Agency" bit indicates that the answer is from the query name Direct authorized agency's server is obtained.
Affirmative response can be composed of a query RR or RR list (also known as RRSET), which is consistent with the record type specified in the query DNS domain name and query message.
Reference responses include other resource records that are not specified in the query. If a recursive process is not supported, such a response returns to the client. The role of these records is to provide some useful reference answers, and the client can use this response to continue recursive query.
Reference responses include other data, such as resource records (RRs) that are not part of the query type. For example, if the host name is "WWW" and the A rr of the name is not found in this area, the "WWW" CNAME RR is found, and the DNS server can include this information when responding to the client. If the client can use the iterative process, it can use these reference information for other queries to fully resolve this name. For more information, see the works of iteration.
The negative response from the server can indicate that two possible results will encounter when the server tries to thoroughly and authoritatively urging the query and uses a recursive mode to analyze the query:
Authoritative Server Report: DNS namespace has no query name. Authoritative Server Report: The name of the query exists, but the name does not have a record of the specified type. The parsing program transmits the query result in the form of a positive or negative response and caches the response message.
note
If the final response of the query is too long, the DNS server may fail over the TCP port 53 in a TCP port 53, so that the DNS server can be sent to the TCP port 53 to completely answer the client in the TCP connection session. When the DNS client is restricted to parse the name based on a specific DNS server (such as a DNS server on an internal web), the system usually prohibits using recursive on the DNS server. When the DNS server does not parse the external DNS name, the recursive may also be disabled, and the client may have to fail to transfer to another DNS server to resolve these names.
For Windows 2000 Server, you can disable DNS servers from using recursive processes as needed, and the "Advanced" property is configured in the DNS console on the respective server. For more information, see Disabling the recursive process on the DNS server.
By default, the Windows 2000 DNS server uses several default time settings when performing recursive queries and contacts other DNS servers. They are: 3 seconds of recursive retardation. This is the length of time before the DNS service is checked before the recursive query. 15 seconds of recursive timeout. This is the length of time for DNS services to wait before returning to recursive query. In most cases, these parameters do not need to be adjusted. However, if you use a recursive query on a slow wide area network link, you may be able to improve the performance of the server and speed up the query by tailoring the settings. For more information, see Adjusting the Advanced Server Parameters.
Iterative Working Principle Iteration is the name resolution type used between DNS clients and servers when the following conditions take effect:
The client application uses the recursive process, but is disabled on the DNS server. Query the DNS server when the client does not apply for the recursive process. Iterative requests from the client inform the DNS server: The client wants to get the best response from the DNS server without contacting other DNS servers.
When using iteration, the DNS server answers the client based on its specific understanding of the namespace, and this namespace is related to the name data currently queried. For example, if you receive a query from the local client "www.microsoft.com", it may return a response from its name cache. If the name of the query is currently not stored in the server's name cache, the server may respond to the client by providing some reference information, which is the NS and A resource records of other DNS servers close to the name of the client. List.
After getting reference, the DNS client is responsible for continuing recursive queries to other configured DNS servers to parse the name. For example, in most cases, the DNS client may extend its search to the root domain server on the Internet to locate DNS servers with absolute control of the "COM" field. Once the Internet root server is contacted, it will get a further recursive response from these DNS servers that point to the actual Internet DNS server of the "Microsoft.com" domain. When the client receives the record of these DNS servers, it can send other iteration queries to the external Microsoft DNS server on the Internet, which can respond by affirmation and authority responses. When using iteration, in addition to providing your best response to the client, the DNS server can also provide further help in the name query resolution. For most iterative queries, if its primary DNS cannot recognize the query, the client uses it in the local configuration DNS server list Contacts Other Name Server throughout the DNS Namespace.
The Cache Working Principle DNS server uses recursive or iteration to handle client queries, they will discover and obtain important information about DNS namespaces. This information is then cached by the server.
The buffer provides a subsequent query that accelerates the DNS parsing performance, while sufficiently reduces the query traffic associated with DNS on the network.
The resource record (RR) is temporarily caught when the DNS server recursively queries the client. The cached RR contains information obtained from the DNS server, and this information has absolute authority for the DNS domain name known in the recursive query executing the iterative query to the recursive query executing the client executing the client. Later, when other clients send new queries, the DNS server can use the cached RR information to respond to them when they issue a new query, apply for RR information with the cache.
When the information cache, the living time (TTL) value is suitable for all cached RRs. As long as the TTL of the cache RR does not expire, the DNS server can continue to cache and use RR again when the query matches the client with these RRs. The cache TTL value used by RR in most regional configuration is assigned a "minimum (default) TTL", which is set for the launch authorization authority (SOA) resource record for the area. By default, the smallest TTL is 3600 seconds (1 hour), but can be adjusted, or the cache TTL is set separately on each RR.
note
You can install the Windows 2000 DNS server into cache dedicated servers (no configurations). For more information, see Using a Cache server. By default, the Windows 2000 DNS server uses the root clue file cache.dns, which is stored in the% systemroot% / System32 / DNS folder of the server computer. When the service is started, the contents of the file are preloaded to the server storage area and include pointer information of the root server where the DNS namespace where the DNS server is located. For more information on this file or how to use this file, see Files related to DNS.