专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 网络通信

DNS 报文结构分析有关问题

发布时间:2011-07-03 07:15:23 文章来源:www.iduyao.cn 采编人员:星星草
DNS 报文结构分析问题
我用Ethereal抓取dns报文信息,知道各个字段的名称,但字段的长度、字段值、字段表达信息怎么理解?不是很明白。
麻烦达人解释下。谢谢。

------解决方案--------------------
Flags参数字段有2个字节-16个比特:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR| Opcode |AA|TC|RD|RA| Z | RCODE |


RFC1035上对这16个比特中各个比特的含义有详细解释:

QR A one bit field that specifies whether this message is a
query (0), or a response (1).

OPCODE A four bit field that specifies kind of query in this
message. This value is set by the originator of a query
and copied into the response. The values are:

0 a standard query (QUERY)

1 an inverse query (IQUERY)

2 a server status request (STATUS)

3-15 reserved for future use

AA Authoritative Answer - this bit is valid in responses,
and specifies that the responding name server is an
authority for the domain name in question section.

Note that the contents of the answer section may have
multiple owner names because of aliases. The AA bit
corresponds to the name which matches the query name, or
the first owner name in the answer section.

TC TrunCation - specifies that this message was truncated
due to length greater than that permitted on the
transmission channel.

RD Recursion Desired - this bit may be set in a query and
is copied into the response. If RD is set, it directs
the name server to pursue the query recursively.
Recursive query support is optional.

RA Recursion Available - this be is set or cleared in a
response, and denotes whether recursive query support is
available in the name server.

Z Reserved for future use. Must be zero in all queries
and responses.

RCODE Response code - this 4 bit field is set as part of
responses. The values have the following
interpretation:

0 No error condition

1 Format error - The name server was
unable to interpret the query.

2 Server failure - The name server was
unable to process this query due to a
problem with the name server.

3 Name Error - Meaningful only for
responses from an authoritative name
server, this code signifies that the
domain name referenced in the query does
not exist.

4 Not Implemented - The name server does
not support the requested kind of query.

5 Refused - The name server refuses to
perform the specified operation for
policy reasons. For example, a name
server may not wish to provide the
information to the particular requester,
or a name server may not wish to perform
a particular operation (e.g., zone


- 千里孤行
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: