How DNS works

Source: Internet
Author: User
Tags fully qualified domain name
Article Title: How DNS works. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

DNS (Domain Name System) is developed by Berkeley University. Simply put, its main application is to complete the resolution from domain name to IP address. In the early stages of Internet development, people can access each other by writing IP addresses to the/etc/hosts file. However, the rapid development of the Internet soon led to the elimination of this method, because no one could tolerate the consequences of writing all the IP addresses in the world into a file and putting them on their own machines. Let's take a look at several important concepts!

FQDN (Fully Qualified Name): complete domain Name, also known as a Fully Qualified domain Name, known as "", note that there is a "." at the end ".".

Domain: the domain is a subtree of the domain name space. The domain name is the domain name of the node on the top of the subtree. One domain can be divided into multiple subdomains.

ZONE: the scope of a server's responsibilities or permissions. When a domain has no subdomain, the domain and zone are the same.

Positive Solution: query the IP address by the domain name. This method is generally used.

Reverse Solution: query the domain name by IP address.

DNS principle: such as client A:

Server B:

Server C:

Server D:

Server E:. cn.

Root server: F :.

From top to bottom, we can regard the following as the above Domain Name Server, and each server only provides services to machines in its own zone. For example, provides services for Or But it never manages Which is

When the machine G (not in the same zone as A, it would be too easy to be there .) To access A, it provides the name of A to its Domain Name Server H. If the cache of the server H contains the IP address of A (generally, the cache will be stored for 24 hours ), it directly returns the IP address of A to the requester G. Without it, it will request another server. This process is also one of the two methods of recursive resolution and domain name resolution. Assume that the IP address of A is not in the cache. In this example, H will access the root server F. However, F still does not have the information required by H, but it will tell H that you can try at E and give H the address of E. Similarly, E still does not exist, therefore, it is processed in a similar way. Until H finds B, B finds A in its own zone, so it returns the IP address of A to H. This resolution method is called iterative Resolution, and the second DNS resolution method. In the end, H sends the IP address of A to G and saves it to its own cache. G finds A according to this IP address. Of course, this is the positive solution.

In the case of positive resolution, DNS is layered. However, the IP addresses of machines in each layer can be of different network segments. The reverse solution does not work. The IP address of each layer must be a network segment.

DNS works perfectly. If host A wants to modify its own name, it only needs to legally modify its IP address and name in host B. Other people can still find it. This method is efficient and secure. Of course, the premise of security is that there is an slave server!

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: 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.