Less-Common Tasks

The following sections describe tricks you’ll probably have to use less often but are still handy to have in your repertoire. Most of these will be helpful when you’re trying to troubleshoot a DNS problem; they’ll enable you to grub around in the messages the resolver sees and mimic a name server querying another name server or transferring zone data.

Seeing the Query and Response Messages

If you need to, you can direct nslookup to show you the queries it sends out and the responses it receives. Turning on debug shows you the responses. Turning on d2 shows you the queries as well. When you want to turn off debugging completely, you have to use set nodebug, since set nod2 turns off only level 2 debugging. After the following trace, we’ll explain some parts of the message output. If you want, you can pull out your copy of RFC 1035, turn to page 25, and read along with our explanation.

C:\> nslookup 
Default Server:  terminator.movie.edu 
Address:  192.249.249.3 

> set q=mx
> acmebw.com. Server: terminator.movie.edu Address: 192.249.249.3 ------------ Got answer: HEADER: opcode = QUERY, id = 9, rcode = NOERROR header flags: response, want recursion, recursion avail. questions = 1, answers = 2, authority records = 0, additional = 2 QUESTIONS: acmebw.com, type = MX, class = IN ANSWERS: -> acmebw.com type = MX, class = IN, dlen = 29 MX preference = 10, mail exchanger = store-forward.MSPRING.NET ttl = 86400 (1 day) -> acmebw.com type = MX, class = IN, dlen = 17 MX preference ...

Get DNS on Windows 2000, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.