[WEB] DNS domain name resolution process

DNS domain name resolution, people who have studied the Internet are familiar with this term, but what exactly is DNS? Let me explain~
DNS, or Domain Name System (English: Domain Name System), is a service of the Internet. As a distributed database that maps domain names and IP addresses to each other, it can make it easier for people to access the Internet.

Next, I will focus on how DNS is resolved.
DNS resolution, also called domain name resolution, is to resolve the domain name entered by the browser into an IP address. The specific process can be divided into the following steps!

  1. Check whether there is a resolved IP address corresponding to this domain name in the browser cache . If so, return the result directly and the resolution process ends.

  2. If the required record is not found in the browser's cache, the browser will make a system call to find out whether there is a DNS resolution result corresponding to the domain name in the system's cache . If so, the result will be returned directly and the resolution process will end.

  3. If the domain name resolution process cannot be completed in this machine, it will initiate a domain name resolution request to the local domain name resolution service system. The local domain name system LDNS is generally the domain name server in the region. LDNS generally caches most of the domain name resolution results. Of course, the cache time is also controlled by the domain name expiration time. Most of the resolution work is almost over here. LDNS Responsible for most of the analysis work.

  4. Local DNS domain name resolver is not yet complete resolution, then the local DNS server will root name server initiates resolution request, the root name server returns gTLD DNS server address.

  5. Then LDNS initiates a resolution request to the gTLD server according to the address returned in the previous step , and the gTLD server receives the request and returns the address of the Name Server server. Normally, this Name Server server is your registered domain name server, then the server of the service provider of your registered domain name will take on the task of domain name resolution. At this time, the Name Server server looks up the IP address corresponding to the domain name, and returns the IP address together with the TTL value to the local domain name server.

  6. The local domain name server caches the resolved results, and the cache time is controlled by the TTL time. The resolution result will be directly returned to the user , and the user system will cache the IP address. The cache time is controlled by TTL. At this point, the resolution process ends.

Insert picture description here
So far, it is the domain name resolution that I have learned about. In this detailed DNS resolution process blog, there is a detailed case, you can also refer to it~~

Guess you like

Origin blog.csdn.net/ly_6699/article/details/113061002