dig - DNS lookup utility When a domain name access failure occurs, you can check the domain name resolution to determine whether the problem is caused by incorrect resolution. A simple analysis of www.baidu.com results in the following: You can see that there are request segments and response segments, and finally two A records are parsed. dig command for iterative query Add +trace after the command to track the entire parsing process: [root@jia3 ~]# dig www.baidu.com +trace ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> www.baidu.com +trace ;; global options: +cmd . 320307 IN NS a.root-servers.net. . 320307 IN NS k.root-servers.net. . 320307 IN NS i.root-servers.net. . 320307 IN NS l.root-servers.net. . 320307 IN NS b.root-servers.net. . 320307 IN NS e.root-servers.net. . 320307 IN NS h.root-servers.net. . 320307 IN NS d.root-servers.net. . 320307 IN NS g.root-servers.net. . 320307 IN NS j.root-servers.net. . 320307 IN NS f.root-servers.net. . 320307 IN NS m.root-servers.net. . 320307 IN NS c.root-servers.net. ;; Received 228 bytes from 202.106.0.20#53(202.106.0.20) in 98 ms com. 172800 IN NS c.gtld-servers.net. com. 172800 IN NS l.gtld-servers.net. com. 172800 IN NS d.gtld-servers.net. com. 172800 IN NS h.gtld-servers.net. com. 172800 IN NS m.gtld-servers.net. com. 172800 IN NS a.gtld-servers.net. com. 172800 IN NS k.gtld-servers.net. com. 172800 IN NS b.gtld-servers.net. com. 172800 IN NS e.gtld-servers.net. com. 172800 IN NS g.gtld-servers.net. com. 172800 IN NS j.gtld-servers.net. com. 172800 IN NS i.gtld-servers.net. com. 172800 IN NS f.gtld-servers.net. ;; Received 491 bytes from 192.5.5.241#53(192.5.5.241) in 93 ms baidu.com. 172800 IN NS dns.baidu.com. baidu.com. 172800 IN NS ns2.baidu.com. baidu.com. 172800 IN NS ns3.baidu.com. baidu.com. 172800 IN NS ns4.baidu.com. baidu.com. 172800 IN NS ns7.baidu.com. ;; Received 201 bytes from 192.48.79.30#53(192.48.79.30) in 501 ms www.baidu.com. 1200 IN CNAME www.a.shifen.com. a.shifen.com. 1200 IN NS ns1.a.shifen.com. a.shifen.com. 1200 IN NS ns2.a.shifen.com. a.shifen.com. 1200 IN NS ns5.a.shifen.com. a.shifen.com. 1200 IN NS ns3.a.shifen.com. a.shifen.com. 1200 IN NS ns4.a.shifen.com. ;; Received 228 bytes from 220.181.37.10#53(220.181.37.10) in 8 ms How does the dig command return when the domain name does not exist? For example, the domain name www.not-exists-domain.com does not exist. [root@jia3 ~]# dig www.not-exists-domain.com +trace ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> www.not-exists-domain.com +trace ;; global options: +cmd . 319714 IN NS b.root-servers.net. . 319714 IN NS e.root-servers.net. . 319714 IN NS h.root-servers.net. . 319714 IN NS d.root-servers.net. . 319714 IN NS g.root-servers.net. . 319714 IN NS j.root-servers.net. . 319714 IN NS f.root-servers.net. . 319714 IN NS m.root-servers.net. . 319714 IN NS c.root-servers.net. . 319714 IN NS a.root-servers.net. . 319714 IN NS k.root-servers.net. . 319714 IN NS i.root-servers.net. . 319714 IN NS l.root-servers.net. ;; Received 228 bytes from 202.106.0.20#53(202.106.0.20) in 105 ms com. 172800 IN NS e.gtld-servers.net. com. 172800 IN NS c.gtld-servers.net. com. 172800 IN NS j.gtld-servers.net. com. 172800 IN NS l.gtld-servers.net. com. 172800 IN NS k.gtld-servers.net. com. 172800 IN NS g.gtld-servers.net. com. 172800 IN NS m.gtld-servers.net. com. 172800 IN NS a.gtld-servers.net. com. 172800 IN NS i.gtld-servers.net. com. 172800 IN NS h.gtld-servers.net. com. 172800 IN NS b.gtld-servers.net. com. 172800 IN NS f.gtld-servers.net. com. 172800 IN NS d.gtld-servers.net. ;; Received 503 bytes from 192.112.36.4#53(192.112.36.4) in 228 ms com. 900 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 1524576381 1800 900 604800 86400 ;; Received 116 bytes from 192.12.94.30#53(192.12.94.30) in 333 ms nslookup - query Internet name servers interactively nslookup can be used in two ways: interactive and non-interactive. nslookup can also specify a domain name server for resolution. The command format is as follows: nslookup www.baidu.com 8.8.8.8 (domain name server address) The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Analysis of idea compiler vue indentation error problem scenario
>>: Detailed explanation of the solution to forget the password in MySQL 5.7
The code looks like this: .process{ border:1px so...
MySQL is divided into installation version and fr...
Installation introduction under Windows: Check ou...
This article shares the specific code for JavaScr...
Today I saw a blog post about input events, and o...
After reinstalling the system today, I reinstalle...
1. Docker installation and settings #Install Cent...
Previous This is a classic old question. Since a ...
1. Font properties color, specifies the color of ...
Delete the previously installed mariadb 1. Use rp...
Mixins provide distributed reusable functionality...
Preface Due to the weak typing of JS, loose writi...
1 Keep the rpm package downloaded when yum instal...
The table caption can be placed above or below th...
MySQL trigger syntax details: A trigger is a spec...