doc, dnswalk, and lamers

204 As you can see, a simple dig provides a lot more information, by default at least, than does nslookup. It begins with information about the name server and resolver flags used. The flags are documented in the manpage for bind s resolver. Next come the header fields and flags followed by the query being answered. These are followed by the answer, authority records, and additional records. The format is the domain name, TTL field, type code for the record, and the data field. Finally, summary information about the exchange is included. You can also use dig to get other types of information. For example, the -x option is used to do a reverse name lookup: bsd2 dig -x 205.153.63.30 ; DiG 8.3 -x ;; res options: init recurs defnam dnsrch ;; got answer: ;; -HEADER- opcode: QUERY, status: NOERROR, id: 4 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUERY SECTION: ;; 30.63.153.205.in-addr.arpa, type = ANY, class = IN ;; ANSWER SECTION: 30.63.153.205.in-addr.arpa. 1D IN PTR sloan.lander.edu. ;; AUTHORITY SECTION: 63.153.205.in-addr.arpa. 1D IN NS lander.edu. ;; ADDITIONAL SECTION: lander.edu. 1D IN A 205.153.60.5 ;; Total query time: 10 msec ;; FROM: bsd2.lander.edu to SERVER: default -- 205.153.60.5 ;; WHEN: Mon Nov 6 10:54:17 2000 ;; MSG SIZE sent: 44 rcvd: 127 The mx option no hyphen will return mail records, the soa option will return zone authority records, and so on. See the manpage for details. nslookup and dig are not unique. For example, host and dnsquery are other alternatives you may want to look at. host is said to be designed as a successor for nslookup and dig. But it does everything online and can generate a lot of traffic as a result. While very useful tools, all of them rely on your ability to go back and analyze the information returned. There are other tools that help to fill this gap.

10.1.4.2 doc, dnswalk, and lamers

doc is one such tool. It was originally written by Steve Hotz and Paul Mockapetris with later modifications by Brad Knowles. Built on top of dig, doc is a script that attempts to validate the consistency of information within a domain: bsd2 doc lander.edu. Doc-2.1.4: doc lander.edu. Doc-2.1.4: Starting test of lander.edu. parent is edu. Doc-2.1.4: Test date - Mon Nov 6 11:55:07 EST 2000 ;; res_nsend to server g.root-servers.net. 192.112.36.4: Operation timed out DIGERR UNKNOWN: dig g.root-servers.net. for SOA of parent edu. failed Summary: ERRORS found for lander.edu. count: 3 WARNINGS issued for lander.edu. count: 1 205 Done testing lander.edu. Mon Nov 6 11:55:40 EST 2000 The results are recorded in a log file; in this case log.lander.edu. is the filename. Note its trailing period. dnswalk, written by David Barr, is a similar tool. It is a Perl script that does a zone transfer and checks the database for internal consistency. Be aware that more and more systems are disabling zone transfers from unknown sites. bsd2 dnswalk lander.edu. Checking lander.edu. BAD: lander.edu. has only one authoritative nameserver Getting zone transfer of lander.edu. from lander.edu...done. SOA=lab.lander.edu contact=root.lander.edu WARN: bookworm.lander.edu A 205.153.62.205: no PTR record WARN: library.lander.edu A 205.153.61.11: no PTR record WARN: wamcmaha.lander.edu A 205.153.62.11: no PTR record WARN: mrtg.lander.edu CNAME elmer.lander.edu: unknown host 0 failures, 4 warnings, 1 errors. Be sure to include the period at the end of the domain name. This can produce a lot of output, so you may want to redirect output to a file. A number of options are available. Consult the manpage. Youll want to take the output from these tools with a grain of salt. Even though these tools do a lot of work for you, youll need a pretty good understanding of DNS to make sense of the error messages. And, as you can see, for the same domain, one found three errors and one warning while the other found one error and four warnings for a fully functional DNS domain. There is no question that this domains database, which was being updated when this was run, has a few minor problems. But it does work. The moral is, dont panic when you see an error message. Another program you might find useful is lamers. This was written by Bryan Beecher and requires both doc and dig. It is used to find lame delegations, i.e., a name server that is listed as authoritative for a domain but is not actually performing that service for the listed domain. This problem most often arises when name services are moved from one machine to another, but the parent domain is not updated. lamers is a simple script that can be used to identify this problem.

10.1.4.3 Other tools