-1

The title says everything about me question. How does a resolver know the response comes from an authoritative name server? An equivalent question: what flag or field is marked by a name server to say to the resolver that its response wasn't authoritative? And last related question, secondary DNS servers are always non-authoritative?

  • 1
    What do you mean by "secondary DNS servers"? If you mean servers with slave zones, those will answer authoritatively. – Håkan Lindqvist Oct 30 '14 at 18:43
8

The DNS Response message header contains a bit indicating whether the resolved name came from an authoritative server, this would be the field called AA in the header reference table listed below:

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                      ID                       | 
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|QR|   Opcode  |AA|TC|RD|RA|   Z    |   RCODE   |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    QDCOUNT                    |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    ANCOUNT                    |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    NSCOUNT                    |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|                    ARCOUNT                    |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

See RFC 1035 §4.1.1 for header format details

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.