DNS structure and operation

  
        

DNS is a hierarchical decentralized name correspondence system. The system tree structure is a bit like a computer. At the top is a "root"; then it is divided into several basic category names such as comorgedu, etc. Such as sonytoshibaintel and so on, but the host name such as wwwmailftp. Because the Internet was originally launched from the United States, there was no national name at the time, but with the booming Internet, DNS also added national names such as twhkau. So a complete dns name is like this www.xyz.com.tw and the entire name corresponds to an IP address.

At the beginning, there are only six organizational categories under root

category name means edu educational academic unit org organization net network communication unit com company enterprise gov government agency mil military unit

But since the opening of the organization category name, a variety of names have appeared, but the rules for how to name it are best suited to the nature of the site. In addition to the original category information managed by the US National NIC (Network Information Center), other categories below the national domain are managed by the country's NIC. Such a structure looks like this

The DNS of each organization in the structure is managed by the organization or its committee after application (usually you need to specify two DNS when you apply for a domain domain name) The host is responsible for the DNS management of the domain name).

DNS Operation

When we set up the IP network environment, we usually have to tell each host about the address of the DNS server (we can manually set it on each host). It can also be set using DHCP).

Let's see how DNS works.

When asked about the host name within this domain name, the DNS server will respond directly if the host name is queried. If it belongs to other domain names, it will check the memory to see if there is any relevant information. If it is not found, it will turn to the root server and the root server will inform the local address of the authorized server (maybe more than one) of the domain name. The server then queries one of the servers and stores the list of servers in memory for future use (removing the steps to query root again). The remote server responds to the query and responds to the query with the query results. Save the result as a backup in your own cache. If you receive the same query before the storage time has passed, you will respond with the data stored in the cache.

From this process, we can see that no DNS host will contain all the domain name DNS data is scattered in all DNS servers and the NIC only needs to know the DNS server address. .

In order to better understand the operation of DNS, let us look at the process of querying the host address of www.home.netman.com.tw in the following figure

in this example www The DNS corresponding information of the .home.netman.com.tw host is managed by the DNS server responsible for the domain name home.netman.com.tw. (In DNS terminology we refer to a domain name as "zone"; this zone can be the domain name you applied back from the NIC or the "sub-zone" that extends from the domain name. There must be a file on the DNS server for home.netman.com.tw and this file must have a record of www (any host is represented by "record”). This record can be an IP address or an alias to correspond to a host name. However, the host name corresponding to it must be corresponding to an IP address.

At the same time, DNS can also provide "anti-query" (reverse lookup) function is to use IP to query the host name. Many of the services on the network, such as FTP, IRC, WWW, etc., require this feature. In fact, the DNS service itself must use the anti-query function and must also set up a reverse zone for each network. Although some people find that DNS services can be used even without the reverse zone, the drawbacks are not easily noticeable on this (Chinese) webpage http://ns.nctu.edu.tw/Basic /WhenToUse-Rev.html You can see some problems caused by ignoring the revers zone.

Copyright © Windows knowledge All Rights Reserved