something to trace lookup recursion?

Kevin Darcy kcd at daimlerchrysler.com
Mon Jan 24 22:48:25 UTC 2000


Phil Howard wrote:

> I'm looking for a way to, starting from the top, perform a recursive lookup
> of a name, going all the way to authoritative records (A, MX, and PTR, in
> particular), with a trace log of every step along the way.  For most things
> this would list the root servers, and the ISP DNS servers, and finally the
> data.  But it would need to handle whatever situation there might be, even
> CNAME references.  The big thing is I need to extract a list of all the DNS
> servers that are involved in the given name, and a little bit of information
> about them (what level and what role).
>
> My guess is that I could do this with "dig" by applying a script around it,
> specifying +norecurse so the servers don't do anything extra for me that I
> don't know about, and just following through the NS and CNAME records in the
> appropriate way (for other reasons I only need to follow one NS record when
> there are usually more than one).
>
> Before I delve into the design of such a thing, which would involve parsing
> the zone data from "dig", I thought it best to ask first so as to avoid
> re-inventing the wheel.
>
> Has anything like this already been done?

Sorry, I haven't done anything like this. In the way of caveats, however, you're
aware, of course, that caching is going to greatly affect how these queries are
actually resolved by a real nameserver, as is use of the "forward" mechanism?

If you want to see exactly how a nameserver resolves a given query, turn on
debugging and parse *that* output.


- Kevin




More information about the bind-users mailing list