How to configure DNS

Source: Internet
Author: User
Tags domain name server domain server in domain

How to configure DNS

The Domain Name System (DNS) is a naming System used by the Internet. When users use network services, they use a domain name to access a specified website. However, the machines are handled by IP addresses. Why don't machines use domain names for processing? Because the IP address length is a fixed 32-bit, and the domain name length is not fixed, it is difficult to process the machine. Therefore, you need to resolve the domain name to an IP address.

DNS is the server used for domain name resolution. The DNS System is designed as an online distributed database using the customer-server method. DNS enables most names to be resolved locally and only a small amount of resolution needs to communicate over the Internet. Therefore, the efficiency of the DNS system is quite high.

When an application needs to resolve the host name to an IP address, the application calls the resolution program and becomes a DNS customer. The domain name to be resolved is placed in the DNS request message, send a UDP user datagram to the Local Domain Name Server (UDP is used to reduce overhead ). After the Local Domain Name Server finds the domain name, it puts the corresponding IP address in the Response Message and returns it. The application can communicate with each other after obtaining the IP address of the target host.


Domain Name Server

Before introducing the working principle of DNS, We need to divide the DNS server into several categories: Root Domain Name Server, top-level domain name server, permission Domain Name Server, and Local Domain Name Server.

 

Root Domain Name Server: the highest level of Domain Name Server is also the most important Domain Name Server. All root domain servers know the domain names and IP addresses of all top-level domain servers. The Root Domain Name Server is the most important server. To resolve any domain name on the internet, you must first seek help from the root domain name server as long as you cannot resolve it yourself. If all the root domain servers are paralyzed, the entire DNS cannot work. In many cases, the root domain name server does not directly convert the queried domain name into an IP address. Instead, it tells the local server which top-level domain name server should be queried next.

 

Top-level domain name servers: These domain name servers are responsible for managing all the second-level domain names registered in the top-level domain name server. When you receive a DNS query, you will be given the final answer, which may be the final result or the IP address of the Domain Name Server to be searched in the next step.

 

Permission Domain Name Server: Responsible for domain name servers in a zone. If a permission Domain Name Server cannot query the final result, it will tell the user which permission Domain Name Server to query next.

 

Local Domain Name Server: when a host sends a DNS query request, this query request message is sent to the Local Domain Name Server. Generally, recursive queries are used for queries from a host to a Local Domain Name Server. The so-called recursive query means that if the local Domain Name Server that the host asks does not know the IP address of the domain name to be queried, the Local Domain Name Server will act as a DNS customer, send a query request message to another Root Domain Name Server, instead of letting the host perform the next query on its own.

The Local Domain Name Server generally uses iterative queries to query the Root Domain Name Server. The so-called iterative query means that when the root domain name server receives the query request message sent by the Local Domain Name Server, it either tells the Local Domain Name Server which Domain Name Server should be queried next, then the local server performs subsequent queries. (Instead of replacing the local server for subsequent queries ).

The Domain Name Server diagram is as follows:


Working Principle and Process

 

Next we will use a complete process to understand the complete DNS workflow.

 

Assume that the host with the domain name m.xyz.com wants to know the IP address of another host (the domain name is y.abc.com. The host m.xyz.com intends to send an email to the host y.abc.com. In this case, you must know the IP address of the host y.abc.com. The procedure is as follows:

1. The host m.xyz.com first performs recursive queries on its Local Domain Name Server dns.xyz.com;

2. The Local Domain Name Server uses iterative query, which first queries a Root Domain Name Server;

3. The Root Domain Name Server tells the Local Domain Name Server that the IP address of the top-level domain name server dns.com to be queried next time;

4. The Local Domain Name Server queries the top-level domain name server dns.com;

5. The top-level domain name server dns.com informs the Local Domain Name Server that the IP address of the permission Domain Name Server dns.abc.com should be queried next time;

6. The Local Domain Name Server queries the permission Domain Name Server dns.abc.com;

7. The permission Domain Name Server dns.abc.com informs the local domain name server of the IP address of the queried host y.abc.com;

8. The Local Domain Name Server finally tells the host m.xyz.com the query result.

The preceding eight steps use a total of eight UDP User Datagram packets. After three iterative queries, the Local Domain Name Server obtains the IP address of the host y.abc.com from the permission Domain Name Server dns.abc.com, and returns the result to the host m.xyz.com that initiates the query.

To improve DNS query efficiency, reduce the load on the Root Domain Server, and reduce the number of DNS query packets on the internet, high-speed cache is widely used in domain name servers, used to store records of recently queried domain names and where domain name ing information is obtained.






Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.