Overview of DNS system parsing process

Source: Internet
Author: User
Tags domain name server domain server subdomain
Overview of DNS system parsing process

DNS (domain name servive) is the most basic and important service in internet/intranet, providing automatic conversion of domain name to IP address in network access. We know that there are thousands of hosts on the Ineternet, and are constantly increasing, it is impossible for one or several DNS servers to implement such a parsing process, the traditional host table (hosts) way is more incompetent, In fact, DNS relies on a distributed database system to analyze the host domain name in the network, and to spread the information of the new host to other related parts in time, so it brings great convenience to the maintenance and expansion of the network.
  
---------------------------
  
Body:
           
Overview of DNS system parsing process
DNS (domain name servive) is the most basic and important service in internet/intranet, providing automatic conversion of domain name to IP address in network access. We know that there are thousands of hosts on the Internet, and are constantly increasing, it is not possible for one or several DNS servers to implement such an analytical process, the traditional host table (hosts) way more incompetent, in fact, DNS relies on a distributed database system to the host domain name in the network to resolve , and spread the information of the new host to other related parts in time, so it brings great convenience to the maintenance and expansion of the network.
DNS provides a service that maps people's familiar names to IP addresses. Generally there are two mechanisms to complete, one is the host table to complete, the other is the use of Domain Name Service daemon (named, or IN.NAMD) to achieve. Both of these methods can realize the mapping between domain name and IP.
The current IP address and the domain name assigned by WHO. The top-level domain name of the Internet is registered and managed by the Internet Network Association's committee responsible for network address allocation, and it also assigns a unique IP address to each host on the Internet. There are 3 large network information centers worldwide:
INTER NIC is responsible for the United States and other areas
Ripe-nic in charge of the European region
APNIC in charge of Asia Pacific
  
DNS hierarchy
DNS is a very complex concept, before you understand the DNS structure, let's take a look at some common terminology about DNS.
Table 1 lists the common DNS terminology.
  
Terminology description
A domain represents a logical entity or organization that is part of a network
A part of the domain name hostname that represents the domain that contains the host. It can be used with domain Exchange
A computer on the host network
A computer on a node network
A computer in which the DNS service is provided by the domain name server, which converts the DNS name to an IP address
Resolves the process of transforming a DNS server into a corresponding IP address
The program or library subroutine that the parser extracts DNS information from the domain name server
Reverse parsing converts the given IP address to its DNS name
Spoofing makes the network appear as if it has a different IP address or domain name
Table 1 Common DNS terminology
Well, having mastered some of the above terminology, let me introduce the DNS hierarchy so that we can have a deeper understanding of the entire architecture of DNS and the parsing process of the DNS system. DNS is actually a distributed database system, it is a hierarchical system, and DNS does not have a host table that holds all the host information, instead, it is stored in many distributed domain name servers, which form a hierarchical system with the top level being a root domain (root domain), which uses the symbol point number. "To say. In fact, the concept of domain and our geographical administrative area management is similar to the concept, a State administration consists of the central government (which is equivalent to the root domain) and provincial governments (first-level domain names), and the provincial government includes many municipalities (second-level domain names), which include many county governments (third-level domain names), And so on, each subordinate subdomain is a subdomain of the parent domain. Each domain has its own set of domain name servers, which hold the host information for the current domain and the domain name server information for the subordinate subdomains. For example, the root domain server does not need to know the information of all hosts in the root domain, as long as it knows the address of the domain name server for all subdomains.
Figure 2 shows the hierarchy of the domain name:
  
Figure 2 Hierarchical structure of DNS
In Figure 2, there are two types of geographical domain and mechanism domain, in which the geographical domain is illustrated by the example of China, and the mechanism domain is illustrated by COM. As shown in the figure above, Www.china-pub.com identifies a host on the Internet, COM is a primary domain, China-pub is a level two domain, Www,mail,dns is a host name, to indicate the type of service of the host. This example illustrates the hierarchical structure and hierarchical management mechanism of the domain Name System.
There are generally two types of first-level domains (that is, top-level domain names). One is the geographical domain, the other is the mechanism domain, geographical domain is through geographical area to divide the domain name, such as China's geographical domain name is CN, Japan is JP, Hong Kong is HK, the United States generally does not use geographical domain name; The institution domain is categorized according to the type of institution registered.
The top-level domain name of the common organization class is:
Type of domain name authority
. gov government Agencies
. EDU Educational Institutions
. int international Organization (e.g. NATO of the North Atlantic Treaty Organization)
. MIL Military Component
. COM Business Organization
. NET Network Center
. ORG Social organization, professional association
Table 3
Although the name of the institution does not tell the user about the physical location of the system, most of the systems that use the name of the organization belong to the United States, but now some domain names (such as. COM,. NET and. ORG) are available for global applications.
Other institutions class new top-level domain name:
Type of domain name authority
. FIRM Business or Company
. The STORE offers business units to buy goods.
. WEB primary activity and WWW-related entities
. ARTS activities based on cultural entertainment activities
. REC an entity based on recreational entertainment activities
. INFU entities that provide information services
. NOM the name of a targeted person or person
Table 4
(The above 7 domain names are the Internet International Special Committee IAHC on February 4, 1997 the latest expansion of the agency domain name)
The following table 5 lists some of the top-level domain names for pervasive geographical categories:
Domain name country or region domain name country or region domain name country or region
Am Armenian. AQ Antarctica. Ar Argentina, au Australia
. BB Barbados. Be Belgium. BG Bulgaria. CA Canada
. CH Switzerland. CL Chile. CN China CR Costa Rica
Cy Cyprus. de Germany. DK Denmark. EC Egypt
. Eg Salvador. ES Spain. Fi Finland GB UK (official)
. gr Greece. hk. hu Hungary. IE Ireland
. Il Israel. In India. IR . It Italy
JM Jamaica JP Japan. KR Korea. Lt Lithuania
. Lu Lucerne-mo Macau. mx Mexico ni Nicaragua
. NL Holland. No Norway NZ New Zealand. PE PUI Lou
. ph Philippines. PL Poland. PT Portugal. RU Russia
. SE swedish. SG Singapore. Si Slovenia. Th Thailand
. TN Tunisia. Tr. TW Taiwan. US USA
UK UK (GM ve Venezuela vn Viet Nam Zm Zambia
Table 5
DNS parsing process and principle
After describing the concept of the domain and the hierarchy of domains, you can learn more about how DNS works and processes, and how DNS works and processes are divided into the following steps:
The first step: the client proposes a domain name resolution request and sends the request to the local domain name server.
The second step: when the local domain name server received the request, the first query local cache, if there is this record entry, then the local domain name server directly to the query results returned.
Step three: If the local cache does not have the record, the local domain name server sends the request directly to the root domain server, and then the root domain server returns the address of the primary domain name server of the local domain name server that queries the domain (the root subdomain).
Fourth step: The local server to return a step up the domain name server to send the request, and then accept the requested server to query their own cache, if not the record, then return the relevant subordinate domain name server address.
Step Fifth: Repeat step Fourth until you find the correct record.
Step Sixth: The local domain name server saves the returned results to the cache for the next time, and returns the results to the client.
Let's give an example to illustrate the process of parsing a domain name in detail. Suppose our client wants to access the site: www.linejet.com, this customer's local domain name server is dns.company.com, a root domain server is NS.INTER.NET, The domain name server for the site you want to visit is dns.linejet.com, and the domain name resolution process looks like this:
(1) The client sends a request to resolve the message of the domain name www.linejet.com
(2) The local domain name server receives the request, queries the local cache, assumes that does not have this record, then the local domain name server dns.company.com then sends the request to the root domain name server NS.INTER.NET To resolve the domain name www.linejet.com
(3) root domain server NS.INTER.NET after receiving the request query local records to get the following result: Linejet.com NS dns.linejet.com (for the linejet.com domain domain name server is: dns.linejet.com), The dns.linejet.com address is also given, and the result is returned to the domain name server dns.company.com.
(4) Domain name Server dns.company.com received a response, and then issued a request to resolve the domain name www.linejet.com message.
(5) The Domain name server dns.linejet.com receives the request, starts to inquire the local record, finds following one record: Www.linejet.com a 211.120.3.12 (The IP address of the domain name server dns.linejet.com in the linejet.com domain is: 211.120.3.12) and returns the result to the client local domain name server dns.company.com.
(6) The client local domain name server saves the returned results to the local cache and returns the results to the client.
This completes the domain name resolution process
  
Summary
DNS is a very complex concept, before we build and configure the DNS system, we must understand the DNS system parsing process, so as not to confused, only know how to configure, but do not know why this configuration

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.