This preview shows page 1. Sign up to view the full content.
Unformatted text preview: rned on instead. This means it is a 16-bit pointer
and not an 8-bit count byte. The 14 bits that follow in the pointer specify an offset in the DNS message of a
label to continue with. (The offset of the first byte in the identification field is 0.) We purposely said that this
pointer can occur wherever a label can occur, not just where a complete domain name can. occur, since it's
possible for a pointer to form either a complete domain name or just the ending portion of a name. (This is
because the ending labels in the names from a given domain tend to be identical.)
Figure 14.11 shows the format of the DNS reply, line 2 from Figure 14.10. We also show the IP and UDP headers to
reiterate that DNS messages are normally encapsulated in UDP datagrams. We explicitly show the count bytes in the
labels of the domain name in the question. The two answers returned are the same, except for the different IP addresses
returned in each answer. In this example the pointer in each answer would have a value of 12, the offset from the start file:///D|/Documents%20and%20Settings/bigini/Docu.../homenet2run/tcpip/tcp-ip-illustrated/dns_the.htm (9 of 18) [12/09/2001 14.47.06] Chapter 14. DNS: The Domain Name System of the DNS header of the complete domain name.
The final point to note from this example is from the second line of output from the Telnet command, which we repeat
sun % telnet gemini daytime
... Connected to
gemini.tuc.noao.edu. we only type gemini but the Telnet client outputs FQDN We typed just the hostname (gemini), not the FQDN, but the Telnet client output the FQDN. What's happening is that
the Telnet client looks up the name we type by calling Figure 14.11 Format of DNS reply corresponding to line 2 of Figure 14.10.
the resolver (gethostbyname), which returns the IP addresses and the FQDN. Telnet then prints the IP address that
it's trying to establish a TCP connection with, and when the connection is established, it outputs the FQDN.
View Full Document
- Spring '12