Lecture 10: DNS Format Flashcards
What are the 3 parts requests and responses consist of?
- Header
- Questions
- Answers
A request will contain __ questions
At least 1
A request will contain __ answers
0
A response will include the ___ in addition to answers
original question
A DNS question contains 3 parts
- QNAME
- QTYPE
- QCLASS
What does the QNAME field specify?
The domain name we are attempting to retrieve
What does the QNAME field do?
Splits the domain name on periods to produce labels
Each get a length byte prepended on stating how long the label is with 0x00 on the end
What does the QTYPE field specify?
What DNS record type we want to fetch
What does the QCLASS field specify?
Assigns internet queries to the internet (1)
Which field is considered obsolete?
QCLASS
How are DNS requests sent
UDP uses no ACKnowledgements
DNS aggressively sends new DNS requests if a response isn’t received
How does a DNS cache or resolver answer a request?
- Sets QR flag to 1
- Set/Unset recursion requested/available flag in control field
- Updates the answer count to reflect the number of answers returned
- Appends the answer directly to the end of the message after the question and then returns it to the client
What are the fields in the answer format
- QNAME
- QTYPE
- QCLASS
- TTL
- RDLENGTH
- RDATA
What is the difference between the QNAME in an answer and a question?
Uses a two octet sequence as an offset to a previous instance of the label
To save space
Why use the add two true bits rule?
To help differentiate it from the domain name format