DNS resolution process and principle

Step one: The client asked domain name resolution request, and the request is sent to the local domain name server.

Step Two: When the local domain name server receives the request, it first check the local cache, if the record entry, the local name server directly to the results of the query returns.
    Step 3: If the local cache does not have the record, the local domain name server directly to the request sent to the root name servers, root name servers and then back to the local domain name server a primary domain (the root of the subdomain) queried address of the server.
    Step four: local server and then return to step up the domain name server sends a request, and then query the server to accept the request of its own cache, if there is no such record, the address associated with lower levels of the domain name server is returned.
    Step five: Repeat Step Four until you find the correct record.
    Step Six: The local domain name server to save the results returned to the cache, in order to prepare for the next use, and will also return the results to the client.
    Let's process to resolve domain names give an example to illustrate the detailed assumptions of our clients If you want to access the site:. Www.linejet.com, this customer is the local domain name server dns.company.com, a root name server is NS. INTER.NET, to be visited site's domain name server is dns.linejet.com, domain name resolution process is as follows:
   (1) client sends a request message to resolve the domain name www.linejet.com
   (2) the local domain name server after receiving the request, queries the local cache, assuming that there is no such record, the local domain name server dns.company.com the request to resolve a domain name www.linejet.com root name server NS.INTER.NET
   (3) the root name server receives the request to query the local records NS.INTER.NET following results were obtained: linejet.com NS dns.linejet.com (expressed as a domain name server linejet.com: dns.linejet.com), dns.linejet.com also given address, and returns the results to the domain name server dns.company.com.
   (4) domain name server dns.company.com after receipt of the response, and then send the message request to resolve the domain name www.linejet.com.
   (5) dns.linejet.com domain name server receives a request, it began querying the local record, find a record as follows: www.linejet.com A 211.120.3.12 (represents a DNS server in a domain dns.linejet.com of linejet.com IP address is: 211.120.3.12), and returns the results to the client's local name server dns.company.com.
   (6) Save the client's local name server returns the results to the local cache, and returns the results to the client.
  This completes a name resolution process 

Reproduced in: https: //www.cnblogs.com/henryhappier/archive/2010/01/25/1656173.html

Guess you like

Origin blog.csdn.net/weixin_34007879/article/details/93537510