DNS Records and Messages
Two types of records are used DNS. The question records are used in the question section of the query and response messages. The resource records are used in the answer authoritative and additional information sections of the response message.
Question Record: A questions records in used by the client to get information from a server. This contains the domain name.
Resource Record: Each domain name is associated with a record called the resource record. The server database consists or resource returned by the server to the client.
A resource records is a quadruple that contains the following fields.
Name , Value , Type , TTL
TTL is the time to live of the resource records. It determines when a resource should be removed from a cache form a cache. In the example records given below we ignore the TTL field.
The meaning of name and value depend on type:
If a DNS server is authoritative for a particular host name then the DNS server will contain a type a record for the hostname. If a server is not authoritative for a hostname then the server will contain a type NS record for the domain that includes the hostname. It will also contain a Type a record that provides the IP address of the DNS server in the value field of the NS records. As an example suppose an edu TLD server is not authoritative for the host gain cs un mass edu. Then this server will contains a record for a domain that includes the host cs mass. Edu. For example ( umass edu dns unmass. Edu NS) the du TLD server would also contain a Type a record which maps the DNS. Server dns umass.edu to an IP address for example ( dns umass edu 128.119.111A)