What's DNS service and DNS server?

The Internet is a huge network of computers, and each device connected to the Internet is assigned a unique IP address (such as 203.119.101.61) that helps other computers identify it. But if you have to enter an IP address every time you want to visit a website, then people must memorize a lot of numbers. It is easy to make mistakes and lead to wrong visits. Thus, domain names were invented to solve this problem and play an important role in Internet communication.

What is DNS service?

DNS service, also called the Domain Name System, is a core service of the Internet. Its main function is to convert domain names into IP addresses that can be easily recognized by computers, so that users can easily direct to a website without needing to memorize lengthy strings of specific numbers and letters.

Specifically, DNS service can be divided into recursive resolution service, root domain name service, TLD domain name service and authoritative domain name service.

What is a DNS server?

A DNS server (Domain Name Server), also known as a name server and is responsible for providing DNS services. It maintains various types of records. The DNS servers include recursive resolvers, root servers, TLD servers and authoritative servers, which work together to provide users with IP addresses.

The following figure is the flow chart of DNS servers.

dns_workflow
  • Recursive resolver:Also known as a DNS resolver, generally managed by an ISP. It is the first step in a DNS query. The recursive resolver caches the final answer for each query executed and saves it for a period of time (called time-to-live). When a recursive resolver receives a recursive query request from a user, if there is caches, it will directly use the cached answer to quickly response without having to communicate with any other DNS server. If not, it will send requests to the root server in turn, and then send another request to the TLD server after getting the initial answer, and then send the last request to the authoritative server, and finally get the IP address as a response and return it to the user.
  • Root server:There are 13 root domain name servers in the world, and one is the main root server in the United States, which is operated by Network Solutions, an American Internet agency. The other 12 are secondary root servers, of which 9 are in the United States, 2 are in Europe (placed in the UK and Sweden), and 1 is in Asia (placed in Japan). If there isn't cached answer, the resolver will initiate a query request to the root server. The root server records the top-level domain name (.com, .net, .org, etc.) and the corresponding hoster. After the recursive resolver gets the initial answer, it sends another request to the TLD name server.
  • TLD server:TLD is the highest-level domain name in the domain name system, and the TLD name server manages all domain name information of the generic top-level domain. As of July 2015, there were 1,058 top-level domains, divided into two categories: generic top-level domains and country/region top-level domains. The most common gTLDs are: .com, .org, .net, .edu, and .gov. A country top-level domain refers to a domain that is specific to a country or state. For example, .cn, .uk, .us, .de, .jp, etc. When the TLD server receives a query request for a certain top-level domain from the recursive resolver, the corresponding top-level domain server informs the recursive resolver of the answer and directs it to the authoritative server to start the next query.
  • Authoritative server:An authoritative server is set by the domain name registrar for a specific domain name (such as "www.ipshu.com"), which is used for the management (addition, deletion, modification, etc.) of the specific domain name itself. Here the recursive resolver finds the IP address of the web server corresponding to the domain and returns the IP address to the recursive resolver. An authoritative server is usually the last step in the processing of finding an IP address.

When the ISP's recursive resolver receives the IP address, it returns the information to the web server through the user's PC, and the web server returns the corresponding information to the user according to the content requested by the domain name, so that the user can finally acquire their expected contents.

📚 Comment

Languages