DNS service rationale explained

Source: Internet
Author: User
Tags domain server

Introduction:DNS (domain Name System, domainname), Internet as domain name and IP addressa distributed, mutually mappedDatabase, enabling users to access the Internet more easily, instead of remembering the number of IP strings that can be read directly by the machine. Through the hostname, the process of eventually getting the IP address for that hostname is called Domain name resolution (or hostname resolution). The DNS protocol runs on TCP and UDPprotocol, use the port number 53.


DNS is made up of C/s architecture, which provides data parsing by the server, and the client accepts the final result of parsing.

DNS is a server to map the IP address into a domain name, and then the client access to the domain name by the server to resolve the IP address of the domain name, so as to access the Internet through the domain name. While the DNS server is resolved by different levels of domain servers to complete the non-level domain.

Structure Analysis:

Client >> DNS resolution server >> root server >> primary domain server >> level two domain server >> host

From the above can be seen, the top of the root server, and then a first-class domain server, and then the two-level domain server, and finally reach the host that needs to access, where the root server only do one-level domain resolution, first-class domain only do two-level domain resolution, and so on, each domain server just own part, do not do

Root server: The root server is a globally resolved server. The root server is a point (.) is generally omitted, the root server directly manages a primary domain server, do not do direct domain name resolution, only do a primary server allocation resolution, if you need to access a non-visited domain name, will first go to the root server, but if you do not access the external Internet, you can not need to use the root server.

For example: www.baidu.com.

The client sends a message to the DNS resolution server, the root server is accessed by the resolution server, and the root server resolves the domain name to give the first-level domain server address. www.baidu.com. The domain name is COM and needs to be forwarded to a COM domain server, and then DNS will go to the COM server

First-level Domain servers: first-level domains are managed directly by the root domain, meaning that the root domain assigns the next hop to the domain resolution server, depending on what the primary domain is.

First-level domain:

Organization domain:. com,.org,.net,.mil,.edu,.gov, a total of seven earlier. Now added:. Info,.cc,.me,.tv, managed by IANA

Country domain:. Cn,.us,.uk,.jp,.tw,.hk,.iq,ir, managed by DNS service providers across countries

For example: www.baidu.com.

First-level domain server accept the domain name will also be analyzed this is not their own tube, if it is not the DNS resolution server to find root, if it is the domain name will be analyzed, assigned a matching level two domain IP to the DNS resolution server, and then the DNS resolution server to find a level two domain server

Secondary domain server: A level Two domain is managed by a first-level domain that assigns the next address according to the field analysis in front of the domain name.

For example: www.baidu.com.

Second-level domain server is Baidu, he will check the next www is not their own internal domain name, if there is that will be with the DNS server said this domain name is my this, the domain name of the host IP to the DNS server

Through the root server, level two domain server, the last DNS server obtains the IP address of the destination host, saves the IP address to the DNS server's cache, and sends the host address to the client, and the client accesses the host based on the destination IP address sent by the DNS server.


At this point, the principle of the DNS service should have been said again, but the DNS service also has some instructions.

1, if the local host already has the destination address of the cache will be directly based on the local cache access, if the cache address is wrong, only wait until the cache is cleared before the DNS server will be re-access, ask the server to resolve the address to obtain the destination address. General cache cleanup is about 2 hours.

2, as above, the DNS server also has its own address cache, if the cache address error to wait for the cache to clear and then re-resolve to obtain the address. General cache cleanup is about 2 hours.

3, the DNS service access relationship, the client Access DNS server is recursive, the DNS server must give the client a result. While the DNS server accesses each domain server for the iteration (Die Dai) by each domain server to give the next hop address, and then by the DNS server to access the domain server address and then resolve the final destination host IP address


DNS service:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/21/wKioL1WyMHvDlknZAADl5B_XiWk743.jpg "title=" _0vi{ zcx%wa4q0_a9{' Ik5w.png "alt=" Wkiol1wymhvdlknzaadl5b_xiwk743.jpg "/>

DNS service rationale explained

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.