This preview shows page 1. Sign up to view the full content.
Unformatted text preview: FQDN for the host would be edu.noao.tuc.sun.
If there was not a separate branch of the DNS tree for handling this address-to-name translation, there would be no way
to do the reverse translation other than starting at the root of the tree and trying every top-level domain. This could
literally take days or weeks, given the current size of the Internet. The in-addr.arpa solution is a clever one,
although the reversed bytes of the IP address and the special domain are confusing.
Having to worry about the in-addr.arpa domain and reversing the bytes of the IP address affects us only if we're
dealing directly with the DNS, using a program such as host, or watching the packets with tcpdump. From an
application's point of view, the normal resolver function (gethostbyaddr) takes an IP address and returns
information about the host. The reversal of the bytes and appending the domain in-addr.arpa are done
automatically by this resolver function.
Let's use the host program to do a pointer lookup and watch the packets with tcpdump. We'll use the same setup as
in Figure 14.9, running the host program on the host sun, and the name server on the host noao.edu. We specify
the IP address of our host svr4:
sun % host 220.127.116.11
Since the only command-line argument is an IP address, the host program automatically generates the pointer query.
Figure 14.12 shows the tcpdump output.
1 0.0 2 0.332288 (0.3323) 18.104.22.168.1610 > 22.214.171.124.53: 1+ PTR?
126.96.36.199.53 > 188.8.131.52.1610: 1* 1/0/0 PTR
Figure 14.12 tcpdump output for a pointer query. Line 1 shows that the identifier is 1, the recursion-desired flag is set (the plus sign), and the query type is PTR. (Recall
that the question mark means this is a query and not a response.) The data size of 44 bytes is from the 12-byte DNS
header, 28 bytes for the 7 labels in the domain name, and 4 bytes for the query type and query class.
The reply has the authoritative-answer bit set (the asterisk) and contains one answer RR. The RR type is PTR and the
resource data contains the domain name.
What is passed from the r...
View Full Document
- Spring '12