Member-only story

Linux — Tips for Troubleshooting DNS Issues

Tony
7 min readJan 25, 2025

In TCP/IP stacks, DNS protocol belongs to the application layer, but the actual transmission is still based on the UDP or TCP (mostly UDP), and the domain name server generally listens on port 53.

Since the domain name is managed in a hierarchical structure, correspondingly, the domain name resolution is actually recursive (starting from the top level, and so on), and sent to the domain name server at each level until the resolution result is obtained.

Generally speaking, each level of DNS server has a cache of the most recently resolved records. When the cache hits, it is enough to reply directly with the record in the cache. If the cache expires or does not exist, it then will do the recursive query.

Therefore, when the system administrator configures the network of the Linux system, in addition to configuring the IP address, it also needs to configure the DNS server, so that it can access external services through the domain name. For example:

$ cat /etc/resolv.conf
nameserver 114.114.114.114

Trace DNS Request

When we visit a certain website, we need to query the IP address corresponding to the domain name through the A record of DNS, and then access the Web service through this IP.

--

--

Tony
Tony

No responses yet