(1) What is a DNS server?
DNS (Domain Name System) is a distributed database on the Internet used for mapping domain names and IP addresses, allowing users to access the internet more conveniently without memorizing IP number strings that can be directly read by machines. On the Internet, the relationship between domain names and IP addresses is either one-to-one or many-to-one. It is obviously not easy to memorize all IP addresses. Although domain names are easier for people to remember, hosts can only recognize IP addresses, so DNS is needed for their conversion.

The above image shows the IP address resolved by DNS for www.baidu.com is: 119.75.217.109
(2) DNS System Structure
Across the entire internet, if the relationship between the domain names and IP addresses of billions of hosts were to be managed by a single DNS server and handle the domain name resolution requests of all clients on the internet, it would be difficult to find a computer capable of bearing such a massive load. Therefore, the entire domain name system uses a distributed database approach, assigning the relationship between domain names and IP addresses within different scopes to different DNS servers. This distributed database uses a tree structure. As shown below:

(3) DNS System Resolution Process
Next, the process of DNS system resolution is explained using the example of the domain name www.abc.com.cn
a: The DNS client sends a recursive query to the local DNS server, requesting to find the IP address of www.abc.com.cn.
b: The local DNS server uses an iterative query. It first queries a root DNS server.
c: The root DNS server tells the local DNS server the IP address of the top-level domain server for the next query, which is cn.
d: The local DNS service queries the top-level domain server cn, and the top-level domain server tells the local DNS server to query the secondary domain server com.cn next.
e: The local DNS server then sends a query request to the secondary domain server com.cn, and the secondary domain server tells the local DNS server to query the third-level domain server abc.com.cn next.
f: The local DNS server sends a query request to abc.com.cn, and the third-level domain server abc.com.cn finds www.abc.com.cn and sends this address to the local DNS server.
g: The local DNS server sends this address to the DNS client, which initiates a connection to www.abc.com.cn.
The above describes the DNS domain name resolution process, which typically involves two types of queries: recursive and iterative.
The so-called recursive query: The host queries the local DNS server usually using a recursive query. If the local DNS server does not know the IP address of the domain name being queried, the local server will continue to send query requests to other root DNS servers as a DNS client.
So-called iterative query: The local DNS server usually uses an iterative query to query the root DNS server. When the root DNS server receives an iterative request from the local DNS server, it will either provide the required IP address or inform which domain server should be queried next.

The above image shows the iterative query method used by the local DNS server.

The above image shows the recursive query method used by the local DNS server.