 Today, I am going to give the lecture on DNS messages and records. Now, let us see the learning outcomes. At the end of this session, students will be able to explain the types of DNS messages, students will be able to explain the types of DNS records. These are the two topics I am going to explain in this lecture, DNS messages, DNS records. DNS has two types of messages that are query messages and response messages. Both query messages and response messages have a same format and the query message consisting of header and question records. The response message consisting of header, question records, answer records, authoritative records and it's null records that I have represented through diagrammatically here. These DNS query and response messages, both query and response messages have a same header format and question section, ok. In the response message have a answer session, authoritative session and additional session. Now, let us see one by one in detail, ok. Query message header format, both query and response message have a same header format with field set to, some field set to 0 for query message. This header field is 12 bytes, ok, identification flags, identification, the number of question records and then number of answer records, the number of authoritative records and number of additional records. Here I have mentioned the number of question record is there in identification and the number of answer records in bracket I have written all 0s in query message means it is not present in a query, ok, it is only present in response message, ok. The number of authoritative records here all 0s in query, it means it is not present in query, ok, all 0s in query message, it means it is not present in that, ok. Now, let us see identification, it is 16-bit field used by the client to match the response with query message, ok. Flags, it is a 16-bit field consisting of 8 surf fields that are qr, upcode, aa, tc, rd, ra, 3 0s and rcodes, ok. Let us see one by one in detail. What is qr? qr is in query and response, it is a 1-bit field that defines a 2 types of messages, ok. If it is 0, it is type query, if it is 1, it is a type of responses, ok, upcode. It is a 4-bit field or 1-bit field subfield that defines a type of query or responses, ok. If it is 0 standard, 1 is inverse to server status request, ok, aa, authoritative answer, it is a 1-bit subfield, when it is set to 1, the name server is an authoritative server, it is used only in a response messages, ok. Next one is tc, truncated, 1-bit subfield, when it is set to 1, it means that this response was more than 512 bytes and truncated to 512, ok, rd, recursive, desired, 1-bit subfield, when it is set to 1, it means that client decides recursive answer, ok, ra, recursion, desired, 1-bit subfield, it is set to, set only in the response messages, reserved, 3-bit subfield set to 3-0s, ok, r-codes, this is a 4-bit subfield that shows the status of error in the responses. Here values and meaning, if it is contains 0, no error, 1, format error, if it is 2, then problem at name server, then if it is 3, domain reference problem, 4, query type, not supported, 5, and then 6 to 15, it is reserved. Number of question records, yeah, the number of question records, it is a 16-bit subfield, it can contains the number of questions, ok, one or more questions, and then number of answer records, it is also 16-bit subfield, it can contains the number of answer records, ok, then authoritative, it is also 16-bit field, it can contains the one or more authoritative answer records, ok, additional, it is also 16-bit subfield, it can contains the one or more additional records, ok. Next one is response messages, the response message contains a question section, an answer section, ok, this is a section consisting of one or more records, it is present on both query as well as response messages, ok. Second one is answer section, the answer session is consisting of one or more resource records, it is present only on response messages, this section includes the answers from the server to the client. Next one is authoritative section, ok, this is a, this section consisting of one or more resource record, it is present only on response messages, in the second slide we have discussed about these things, ok, additional information section, this is present only on response messages, this section provides the additional information that may help the user. If the user want to keep some sensitive information or some other information in a message, then that time they can go to this additional information section. Next, think and write, draw and, it can contains one question that is draw and explain the DNS question record format, now pass the video and answer the above question. Now, let us see the answer for this question, DNS question record format, ok, this is a DNS question record format, it can contains three fields that are query name, query type and query class, ok. Query name, this is a variable length field consisting of domain name, there are so many domain names we have discussed in the last lecture, it may contain any one of the domain name. Second one is query type, this is a 16 bit field defining the type of query, it means it may be the question type or it may be the answer type and what are the different types we have to identify in this one, type of query, ok, query, query class, ok, this is a 16 bit field defining the specific protocol using DNS, it means it may be the internet protocol or I internet network and which type of class and then we have to mention in this query. Next one is question records and resource record, DNS records, there are two types of records are there that are question record and resource record, first one is question record, in the previous slide we have discussed about the question record, the question record is used by the client to get the information from the server, this contains the domain name, there are so many domain name we have discussed in the previous slide that are dot edu, dot or j dot com, the dot mill like this, there are so many domains are there, any one domain it can contains, ok, DNS records, resource record, each domain name, each domain name and the tree is associated with record called the resource record, the server database consisting of resource record, that is this is a block diagram for the resource record, it can contain so many soft fields that are domain name, domain type, domain class, time to live and then resource data, resource data, let us see one by one in detail, first one is domain name, first one is domain name, this is a variable length field consisting the domain name, it is a duplication of the domain name in the question record, we have already discussed in the last slide that is question record, domain name we have to and then domain type, ok, this second one is a domain type, this field is the same as the query type field in the question record except the last two types are not allowed in this one, domain class, this field is the same as query class field in the question record, time to live, this is a 32 bit field that defines the number of seconds that the answer is valid, the server can catch the answer for this period of time, after sending the question to the server and how many seconds the question is live in the server side, after getting the acknowledgement from the server, the client can in the client side also how many seconds the response is live in the server side, client side, resource data length, this is a 16 bit field defining the length of the resource data, it means if the user have some data then what is the length of the user data, we have to measure in this field that is resource data length, ok, next one is resource data, this is a variable length field containing the answer to the user, it means whatever the user want to forward the data, the user can keep all the data in the resource data field, it is we won't mention the size of the data because it is variable length, it may be the less or it may be the high, ok, this data the user can forward it to the user, ok, these are the references I have referred for preparing the above PPT, thank you.