The primary request process for DNS domain name resolution

Source: Internet
Author: User
Tags domain name server

In-depth analysis of Java Web Technology Insider

When a user enters www.abc.com in a browser, the DNS resolution will be nearly 10 steps, as described in the following procedure.

When the user enters the domain name in the browser and presses the ENTER key.

In the 1th step, the browser will check if there is a resolved IP address in the cache, and if so, the parsing process will end. Browser cache domain name is also limited, not only the browser cache size is limited, and the cache time is also limited, usually a few minutes to a few hours, the domain name is cached time limit can be set by the TTL attribute. This cache time is too long and too short is not good, if the cache time is too long, once the domain name is resolved to the IP has changed, it will cause the domain name cached by the client can not resolve to the changed IP address, so that the domain name can not be resolved properly, during this time there may be some users can not access the site. If the time setting is too short, it causes the user to re-resolve the domain name each time they visit the site.

2nd, if the user does not have a browser cache, the browser looks for the DNS resolution results for the domain name in the operating system cache. In fact, the operating system will also have a domain name resolution process, in Windows can be set through the C:\Windows\System32\drivers\etc\hosts file, you can resolve any domain name to any access to the IP address. If you specify an IP address for a domain name here, the browser will first use that IP address. For example, we can resolve a domain name to a test server when testing, so that you can test the correct business logic for code on a separate server without modifying any code. Because of this local DNS resolution procedures, it is possible for hackers to modify your domain name resolution to the specific domain name resolution to its designated IP address, resulting in these domain names are hijacked. The previous two steps are completed in this machine, to here has not involved the real domain name resolution server, if in this machine still can not complete the resolution of the domain name, will really request the domain name server to resolve the domain name.

3rd step, how, how to know the name server? In our network configuration will have "DNS server address" this, this address is used to solve the above if two process can not be resolved when to do, the operating system will send this domain name to set here Ldns, that is, the domain name server in the region. This DNS is usually provided to your local Internet access to a DNS resolution service, such as you are in school access to the Internet, then your DNS server must be in your school, if you are in a cell access to the Internet, then this DNS is to provide you access to the Internet application provider, namely telecommunications or unicom, Commonly referred to as an ISP, this DNS is usually located somewhere in your city, usually not very far away.

4th step, if Ldns still does not hit, go directly to the root server domain name server to request resolution.

5th, the ROOT name server returns the primary Domain name server (GTLD server) address of a queried domain to the local domain name server. gTLD is an international top-level domain name server, such as. com,. cn,. org, etc., only about 13 units worldwide.

6th step, the local DNS server sends the request back to the GTLD server in one step.

The 7th step is to accept the requested gTLD server to find and return the address of the name server that corresponds to this domain name, which is usually your registered domain name server, such as the domain name you are applying for in a domain Name service provider. Then this domain name resolution task is done by the server of the domain name provider.

8th, the name Server name server queries the stored domain name and IP mapping relationship table, and normally gets the destination IP record based on the domain name, along with a TTL value returned to the DNS server domain name server.

In the 9th step, the IP and TTL values for the domain name are returned, and the Local DNS server caches the corresponding relationship between the domain name and the IP, and the cached time is controlled by the TTL value.

The 10th step, the result of the resolution is returned to the user, the user according to the TTL value cache in the local system cache, the domain name resolution process is finished.

In the actual DNS resolution process, there may be more than 10 steps, such as name server may have multiple levels, or there is a GTM to load balance control, which may affect the process of domain name resolution.

The primary request process for DNS domain name resolution

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.