dig 応答のすべてのフラグとは何ですか?

dig 応答のすべてのフラグとは何ですか?

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 4ビットフィールド、有効な値: 0、1、2
  • AA 権威ある回答
  • TC 切り捨て (伝送チャネルで許可されている長さを超えるため切り捨て)
  • RD 再帰が必要
  • RA 再帰が利用可能
  • Z 将来の使用のために予約されています。ゼロである必要があります

さらに2つのDNSSEC関連のフラグが導入されました。RFC 4035:

  • CD (チェック無効): セキュリティ対応リゾルバが署名検証を無効にする必要があることを示します (つまり、DNSSEC レコードをチェックしない)
  • AD (Authentic Data): リゾルバが応答が本物であると信じていることを示します。つまり、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

関連情報