Interviewer: Please tell me what the process of DNS domain name resolution is like? The DNS protocol is an application layer protocol based on UDP. It is used to convert the website's URL, that is, the domain name, into an IP address so that users can access the website. picture DNS links domain names and IP addresses together. With a DNS server that stores the correspondence between website domain names and IP addresses, we don't have to enter the IP address to visit a website. Instead, we enter the URL and then access the website by requesting the DNS server to obtain the IP corresponding to the domain name. picture The namespace of a DNS domain is a tree-like hierarchical structure, which can generally be divided into a root domain, a first-level domain (also called a top-level domain), a second-level domain, a subdomain, and a host name. picture Correspondingly, there will be a domain name server at each layer of the domain name to provide domain name resolution services at the corresponding level. picture The process of DNS domain name resolution is that the host first checks the DNS cache on the local browser, then checks the DNS cache and hosts file in the local operating system. If there is no DNS domain name resolution, it will initiate a DNS domain name resolution request to the local DNS server. If the local DNS server has the IP address corresponding to the requested domain name, it will directly return to tell the host. If not, it will send a request to the root domain name server. The root domain name server is the highest level and is not directly used for domain name resolution, but it will tell the local DNS server to find the corresponding top-level domain name server. Then, the local DNS server will find the corresponding top-level domain name server for request. The top-level domain name server will tell the local DNS server to find the corresponding authoritative DNS server. The local DNS will then turn to ask the authoritative DNS server. After the authoritative DNS server queries, it will tell the local DNS the corresponding IP address, and the local DNS will return the IP address to the host. At this time, in order to avoid the above resolution process again when the DNS resolution is initiated for this domain name next time, the host and the local DNS will cache the domain name resolution result just now. The next time the resolution is performed, if there is a cache, the resolution result can be directly obtained from the cache. picture picture picture picture picture From the above process, we can see that there are two types of DNS query methods, one is recursive and the other is iterative. Recursive query means that if A requests B, then B, as the recipient of the request, must give A the answer he wants. picture Iterative query means that if receiver B does not have the exact content required by requester A, receiver B will tell requester A how to obtain the content, but will not make a request itself. picture In actual applications, recursive queries are usually used for queries from the requesting host to the local DNS server, while iterative queries are used for the local DNS server to send query requests to the root domain name server or top-level domain name server. picture
|
<<: What are the differences between HTTP and HTTPS besides security?
>>: Quick introduction to IM communication technology: short polling, long polling, SSE, WebSocket
As the number of employees or departments increas...
No matter you unplug the SIM card or turn off the...
IMIDC is a local operator in Hong Kong. The busin...
The networking industry is changing rapidly, and ...
On September 28, the "5G Gigabit Network Ind...
The tribe once shared information about Megalayer...
Finnish operator Elisa said its 5G network has be...
Software-defined WAN (SD-WAN) has obvious advanta...
So far, the three major operators have released t...
Have you ever encountered occasional slow Interne...
With the advancement of technology, the commercia...
With the continuous development of information te...
As the largest communications exhibition in Asia ...
It is very necessary to understand the user licen...
November 12, 2017, 2:00 p.m. The autumn is crisp,...