挖掘响应中的所有标志是什么?

在评论部分dig响应返回标志:

 $ dig example.com +noall +comments ; <<>> DiG 9.8.3-P1 <<>> example.com +noall +comments ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29045 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 

在这里的最后一行,有一些标志:

 flags: qr rd ra; 

挖有什么可能的标志?

以下是我迄今为止发现的列表:

  • rd – recursion期望的
  • ra – recursion可用
  • aa – 权威答案
  • qr – 查询?
  • CD – 检查禁用(不知道这是什么意思)
  • 其他?

我使用的RFC 1035作为源,保持从那里的序列,无论你是否已经在你的问题中提到它。

  • QR指定该消息是查询(0)还是响应(1)
  • 操作码四位字段,只有有效值:0,1,2
  • AA权威答案
  • TC TrunCation(由于长度大于传输信道允许的长度而截断)
  • RDrecursion期望的
  • RArecursion可用
  • Z保留供将来使用。 必须为零

没有提到CD。

来自: http : //www.perdisci.com/useful-links/dig-info

 DIG response header: Flags: AA = Authoritative Answer TC = Truncation RD = Recursion Desired (set in a query and copied into the response if recursion is supported) RA = Recursion Available (if set, denotes recursive query support is available) AD = Authenticated Data (for DNSSEC only; indicates that the data was authenticated) CD = Checking Disabled (DNSSEC only; disables checking at the receiving server) Response code: 0 = NOERR, no error 1 = FORMERR, format error (unable to understand the query) 2 = SERVFAIL, name server problem 3= NXDOMAIN, domain name does not exist 4 = NOTIMPL, not implemented 5 = REFUSED (eg, refused zone transfer requests) 

更多信息请阅读:

RFC1035 – 4.1.1。 标题部分格式( https://tools.ietf.org/html/rfc1035

RFC6895 – 2. DNS查询/响应头( https://tools.ietf.org/html/rfc6895