今天客服美眉问我如果客户端nslookup一个域名的时候提示如下错误,有什么原因可以造成:

wKioL1LOXWfyw6btAAX_tBS0rYE611.bmp

先看一下爱正确的解析过程:

wKiom1LOXibDkRSeABAB2KHNoMg158.bmp

我当初说如果这个域名本地的DNS解析不出来就是提示域名不存在,而如果解析除了这个域名cname给咱们,但是这个cname解析不出来,应该提示解析失败,后来感觉不妥,就自己找了个域名试试,果然我理解错了,如果这个域名cname的域名也解析不出来,也提示域名不存在


比如我把te4.sportsvc.cn  CNAME到www.fanfeildld.com,而这个www.fanfeildld.com是解析不出来的,

wKioL1LOXqHDX1D7AAM4iJ63VOM149.bmp

先看一下dig图:

wKioL1LOXvLjPQjnAA3ByHJfRN4666.bmp

看出解析出cname,因为解析不到cname,所以提示nxdomain

然后再看nslookup图:

wKiom1LOXzeRrH9DAAAt3abHGso432.bmp

看到也是提示域名不存在

结果就是这样,我们可以开启nslookup的set d2模式,看具体的解析过程,也可以看到解析出cname后,就没有解析了

> set d2

> te3.sportsvc.cn.

服务器:  cc-core.chinacache.local

Address:  192.168.1.199


------------

SendRequest(), len 33

   HEADER:

       opcode = QUERY, id = 10, rcode = NOERROR

       header flags:  query, want recursion

       questions = 1,  answers = 0,  authority records = 0,  additional = 0


   QUESTIONS:

       te3.sportsvc.cn, type = A, class = IN


------------

------------

Got answer (140 bytes):

   HEADER:

       opcode = QUERY, id = 10, rcode = NXDOMAIN

       header flags:  response, want recursion, recursion avail.

       questions = 1,  answers = 1,  authority records = 1,  additional = 0


   QUESTIONS:

       te3.sportsvc.cn, type = A, class = IN

   ANSWERS:

   ->  te3.sportsvc.cn

       type = CNAME, class = IN, dlen = 22

       canonical name = www.fantefeildld.com

       ttl = 3515 (58 mins 35 secs)

   AUTHORITY RECORDS:

   ->  com

       type = SOA, class = IN, dlen = 61

       ttl = 815 (13 mins 35 secs)

       primary name server = a.gtld-servers.net

       responsible mail addr = nstld.verisign-grs.com

       serial  = 1389254445

       refresh = 1800 (30 mins)

       retry   = 900 (15 mins)

       expire  = 604800 (7 days)

       default TTL = 86400 (1 day)


------------