挖掘回應中的所有標誌是什麼?

挖掘回應中的所有標誌是什麼?

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;

dig 有哪些可能的標誌?

以下是我迄今為止找到的清單:

答案1

我在用RFC 1035作為來源,保持從那裡開始的順序,無論您是否已經在問題中提到過它。

  • QR 指定此訊息是查詢 (0) 還是回應 (1)
  • OPCODE 一個四位字段,僅有效值:0,1,2
  • AA權威解答
  • TC TrunCation(由於長度大於傳輸通道允許的長度而被截斷)
  • 需要 RD 遞迴
  • RA 遞迴可用
  • Z 保留供將來使用。必須為零

中還引入了另外兩個與 DNSSEC 相關的標誌RFC 4035

  • CD(檢查已停用):表示具有安全意識的解析器應停用簽章驗證(即不檢查 DNSSEC 記錄)
  • AD(真實資料):表示解析器認為回應是真實的 - 即由 DNSSEC 驗證

答案2

從: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 (e.g., refused zone transfer requests)

答案3

欲了解更多信息,請閱讀:

RFC1035 - 4.1.1。標頭部分格式 (https://www.rfc-editor.org/rfc/rfc1035

RFC6895 - 2. DNS 查詢/回應標頭 (https://www.rfc-editor.org/rfc/rfc6895

相關內容