
0为Query, 1为Response。Operator Code: 0占 4 bits,其对应代码如下:0 QUERY, Standard query. 1 IQUERY, Inverse query. 2 STATUS, Server status request. 3 Reserved. 4 Notify. 5 Update. 6-15 Reserved.Authoritative Answer: 01-bit field. When set to 1, identifies the response as one made by an authoritative name server. 0 Not authoritative. 1 Is authoritativeTruncation: 01-bit field. When set to 1, indicates the message has been truncated. 0 Not truncated. 1 Message truncatedRecursion Desired: 1 Recursion desired: 1-bit field. May be set in a query and is copied into the response. If set, the name server is directed to pursue the query recursively. Recursive query support is optional.0 Recursion not desired. 1 Recursion desired.Approve Recursion: 11 bit field. Indicates if recursive query support is available in the name server.0 Recursive query support not available. 1 Recursive query support available.Reserved: 01 bit field. Indicates in a response that all data included in the answer and authority sections of the response have been authenticated by the server according to the policies of that server. It should be set only if all data in the response has been cryptographically verified or otherwise meets the server's local security policy.Respond code: 00 No error. The request completed successfully. 1 Format error. The name server was unable to interpret the query. 2 Server failure. 3 Name Error. 4 Not Implemented.5 Refused. 6 YXDomain. Name Exists when it should not. 7 YXRRSet. RR Set Exists when it should not. 8 NXRRSet. RR Set that should exist does not. 9 NotAuth. Server Not Authoritative for zone. 10 NotZone. Name not contained in zone. 11-15 Reserved. 16 BADVERS. Bad OPT Version.BADSIG. TSIG Signature Failure. 17 BADKEY. Key not recognized. 18 BADTIME. Signature out of time window. 19 BADMODE. Bad TKEY Mode. 20 BADNAME.Duplicate key name. 21 BADALG.Algorithm not supported. 22-38403841-4095 Private use. 4096-65535Questions: 116-bit field that defines the number of entries in the question section.Answers: 216-bit field that defines the number of resource records in the answer section.Authority: 016-bit field that defines the number of name server resource records in the authority section.Additional: 016-bit field that defines the number of resource records in the additional records section.Question: 数据结构1 1617 32Query NameTypeClass我们对上图的Question进行说明:字段表明Domain Name: .请求的域名。

Type: 11为A, IPv4 address.Class: 11为IN, Internet.Answer: 数据结构1 1617 32NameTypeClassTTLRdata Length我们对上图的Answer进行说明:字段表明Domain Name: .解析的域名。Type: 11为A, IPv4 address.Class: 11为IN, Internet.Time to Live: 1200生存周期为1200秒Data Length 4数据长度为4 字节IP Address: 03IP地址为03成都科来软件2005年月数据包解码详解 成都科来软件电话:028Email:sales@传真:028support@12 / 130x0800 (IP协议) 目标MAC地址 源MAC地址
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-134130-2.html
他也是命好
同时公积金不变
@CYAdol