Jump to content

DNS: Difference between revisions

1,052 bytes added ,  4 years ago
Line 48:
== Fields ==
 
;ID: - Identifier (2 Bytes Identifier:)
A 16-bit identification field generated by the device that creates the DNS query.
It is copied by the server into the response, so it can be used by that device to match that query to the corresponding reply received from a DNS server.
This is used in a manner similar to how the Identifier field is used in many of the ICMP message types.
 
;QR - Query/Response Flag (1/8 bytes or 1 bit)
;QR: 1/8 (1 bit) Query/Response Flag:
Differentiates between queries and responses.
Set to 0 when the query is generated; changed to 1 when that query is changed to a response by a replying server.
 
;Opcode: (1/2 (bytes or 4 bits)
Specifies the type of query
Set by creator of the message
Copied unchanged into Response
 
0 Query A Standard Query
1 IQuery Inverse Query (Obsolete)
2 Status Server Status Request
3 (Reserved)
4 Notify Used by Primary to tell secondary that Data for Zone has changed; prompt them to request zone transfer
4 Notify
5 Update Implements Dynamic DNS; allows resource records to be Added, Deleted or Updated selectively.
5 Update
 
;DNS Flags
 
* AA: - Authoritative Answer Flag:
This bit is set to 1 in a response to indicate that the server that created the response is authoritative for the zone in which the domain name specified in the Question section is located.
If it is 0, the response is non-authoritative.
 
* TC: - Truncation Flag:
When set to 1, indicates that the message was truncated due to its length being longer than the maximum permitted for the type of transport mechanism used.
TCP doesn't have a length limit for messages, while UDP messages are limited to 512 bytes, so this bit being sent usually is an indication that the message was sent using UDP and was too long to fit.
Line 81:
On the other hand, if the portion truncated was part of the Additional section, it may choose not to bother.
 
* RD: - Recursion Desired:
When set in a query, requests that the server receiving the query attempt to answer the query recursively, if the server supports recursive resolution.
The value of this bit is not changed in the response.
 
* RA: - Recursion Available:
Set to 1 or cleared to 0 in a response to indicate whether the server creating the response supports recursive queries.
This can then be noted by the device that sent the query for future use.
 
* Z - Zero
* Z: Zero: Three reserved bits set to zero.
 
;RCode: - Response Code (1/2 (bytes or 4 bits) Response Code
Set to 0 in Queries.
Changed by Replying Server in ResponceResponse
Conveys Success or Error
 
0 No Error Success
1 Format Error
2 Server Failure
3 Name Error Name specified in query does not exist in domain, This code can be used by Authoritative Server for a zone (as it knows all objects & subdomains) or by caching server that implements negative caching.
3 Name Error
4 Not Implemented Type of Query not supported by server.
5 Refused Server refused to process the query, generally for policy reasons - operations such as Zone Transfer are restricted, Server will honor Zone Transfer only from certain devices.
5 Refused
6 YX Domain A name exists when it should not.
6 YX DOmain
7 YX RR Set A RR set exists that should not.
8 NX RR Set A RR set that should exists does not.
9 Not Auth Server receiving the query is not Authoritative for the zone specified.
9 Not Auth
10 Not Zone Name specified in message is not within the zone specified in the message.
10 Not Zone
 
 
 
;QDCount:
Cookies help us deliver our services. By using our services, you agree to our use of cookies.