System Resolver Test App?

david at from525.com david at from525.com
Thu Nov 12 02:06:11 UTC 2009


On Thu, 12 Nov 2009 10:01:38 +0900, Stephane Bortzmeyer <bortzmeyer at nic.fr>
wrote:
> On Wed, Nov 11, 2009 at 05:00:03PM -0600,
>  david at from525.com <david at from525.com> wrote 
>  a message of 60 lines which said:
> 
>> I am wondering if anyone knows of an app similar to nslookup or
>> dig that actually uses the system resolver. 
> 
> C source attached. Compile, for instance, with:
> 
> gcc -o resolve-name resolve-name.c
> 
>> I am basically trying to uinderstand why the system resolver was
>> getting stuck on the third entry within the resolv.conf while it
>> should have tried one of the first two working DNS servers first.
> 
> Not sure it will help.

Stephane,

Thanks for that bit of c it works great and does just what I was hoping
for.  I was able to reproduce the almost 13 second delay while looking up a
specific hostname.  Funny thing is, when I perform other queries for other
hostnames the third invalid DNS server mentioned in the resolv.conf does
not seem to be a problem.  When I remove the third invalid entry and
perform the same query with your application the delay is non existent.  I
have captured previous tcpdumps and didn't notice anything out of the norm,
but there was alot of other network chatter.  The app should let me capture
a more concise tcpdump for further examination.  Is there any way you could
incorporate resolver errors being sent to stdout?

Thanks,
David Porsche



More information about the bind-users mailing list