The process of DNS resolving domain names

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

First, the process of DNS resolution domain name

1, the large process can be divided into three steps:

(1), find in cache whether previously resolved

(2), find in the host file of Windows system

(3), requesting a DNS server

2, the small process can be divided into 10 steps:

(1), the browser first check itself has not resolved the domain name, if resolved directly to get the IP before the cache, the end of the resolution. The time that the domain is cached can also be set by the TTL attribute.

(2), if the browser does not, will go to find the operating system Hosts file, there is a configured domain name address and IP, see if the domain name has a corresponding IP, if there is, the browser will first use this IP address.

      

      

Like this:

      

      But this operating system-level domain name resolution procedures are also used by many hackers, by modifying the contents of your Hosts file to resolve the specific domain name to his designated IP address, resulting in the so-called domain name hijacking. So the Hosts file is set to ReadOnly in Windows7 to prevent malicious tampering.

(3), at this time the front two are not found (professional terminology called No hit), the request for local domain name server ldns (DNS server) to resolve, this server in the city is a close to you corner, not very far from you, and this server performance is very good, Usually cache the domain name resolution results, about 80% of the domain name resolution here to complete.

(4), if Ldns has not yet, can only jump to root server request parsing

(5), the root server returns LDNS the primary domain name server address of a queried domain (primary domain server: GTLD server, International top name server, such as. com. cn. org, etc.)

(6), at this time Ldns send the request to the gTLD Server

(7), the requested gTLD server finds and returns the address of the name server that corresponds to this domain, which is the name server registered by the Web site

(8), name server finds the IP corresponding to the domain name based on the relational mapping table and returns it to Ldns

(9), Ldns received the IP first cache this domain name and the corresponding IP

(10), ldns the results of the resolution is returned to the user, the user according to the TTL value cache to the local system cache, the domain name resolution process to this end

Figure of the specific analysis:

    

Original Blog Address:

78775629

  

The process of DNS resolving domain names

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.