Domain name resolution is classified into dynamic resolution and static resolution that complement each other. During domain name resolution, static resolution is preferentially used. If static resolution fails, dynamic resolution is used. Dynamic DNS resolution takes a period of time, and the cooperation of the DNS server is required. To improve the domain name resolution efficiency, you are advised to add commonly used domain names to a static domain name resolution table.
A static domain name resolution table is manually set up, describing the mappings between domain names and IP addresses. Some common domain names are added to the table. To obtain the IP address by resolving a domain name, the client searches the static domain name resolution table for the specified domain name. In this manner, the efficiency of domain name resolution is improved.
User programs, such as ping and tracert, access the DNS server using the resolver of the DNS client.
Figure 1 shows the relationship between user programs, the resolver, the DNS server, and the cache on the resolver.
When a user accesses some applications by domain name, the user program sends a request to the resolver on the DNS client.
After receiving the response packet from the DNS server, the DNS client sends the resolution result to the user program.
Mappings between domain names and IP addresses are stored in the dynamic domain name cache. When resolving a domain name that is stored in the cache, the DNS client obtains the corresponding IP address from the cache directly and does not send a query message to the DNS server. Mappings stored in the cache will be deleted when the aging time expires to ensure that the latest mappings can be obtained from the DNS server. The aging time is set by the DNS server. The DNS client obtains the aging time from protocol packets.
Dynamic domain name resolution supports the domain name suffix list. Users can preset domain name suffixes. Users only need to enter partial content of a domain name, and the system adds a suffix to the domain name for resolution. For example, a user has set the domain name suffix com in the suffix list. To visit huawei.com, the user only needs to enter huawei. The system adds the suffix com to the domain name.
Class-A query is a common type of query, which is used to obtain the IP address corresponding to a specified domain name. For example, when you ping or tracert a domain name, the ping or tracert, as a user program, sends a query to the DNS client for the IP address corresponding to the domain name. If the corresponding IP address does not exist on the DNS client, the DNS client sends a Class-A query to the DNS server to obtain the corresponding IP address.