This preview shows page 1. Sign up to view the full content.
Unformatted text preview: er query types in Section 14.6.
The query class is normally 1, meaning Internet address. (Some other non-IP values are also supported at some
Resource Record Portion of DNS Response Message
The final three fields in the DNS message, the answers, authority, and additional information fields, share a common
format called a resource record or RR. Figure 14.8 shows the format of a resource record. file:///D|/Documents%20and%20Settings/bigini/Docu.../homenet2run/tcpip/tcp-ip-illustrated/dns_the.htm (6 of 18) [12/09/2001 14.47.06] Chapter 14. DNS: The Domain Name System Figure 14.8 Format of DNS resource record.
The domain name is the name to which the following resource data corresponds. It is in the same format as we
described earlier for the query name field (Figure 14.6).
The type specifies one of the RR type codes. These are the same as the query type values that we described earlier. The
class is normally 1 for Internet data.
The time-to-live field is the number of seconds that the RR can be cached by the client. RRs often have a TTL of 2
The resource data length specifies the amount of resource data. The format of this data depends on the type. For a type
of 1 (an A record) the resource data is a 4-byte IP address.
Now that we've described the basic format of the DNS queries and responses, we'll see what is passed in the packets by
watching some exchanges using tcpdump. 14.4 A Simple Example
Let's start with a simple example to see the communication between a resolver and a name server. We'll run the Telnet
client on the host sun to the host gemini, connecting to the daytime server:
sun % telnet gemini daytime
Trying 18.104.22.168 ...
Connected to gemini. tuc.noao.edu.
Escape character is '^]'
Wed Mar 24 10:44:17 1993
Connection closed by foreign host. first three lines of output are from Telnet client
this is the output from the daytime server
and this is from the Telnet client For this example we direct the resolver on the host sun (where the Telnet client is r...
View Full Document
- Spring '12