dig vs resolv.conf

Barry Margolin barmar at alum.mit.edu
Mon Dec 27 14:57:00 UTC 2004


In article <cqo8im$17ov$1 at sf1.isc.org>, "kalin mintchev" <kalin at el.net> 
wrote:

> hi all..
> 
> i have a machine that has only an ip address in it's resolv.conf like this:
> 
> nameserver     x.x.x.x
> 
> if i do:
> # dig @x.x.x.x somesite.com
> 
> this returns the correct answer right away.
> 
> if i do just:
> # dig somesite.com
> 
> i get:
> res_nsend to server default -- x.x.x.x: Operation timed out
> 
> i know that x.x.x.x has the authoritative records for somesite.com
> the nameserver on x.x.x.x is BIND 9.2.1
> 
> can somebody please explain why is this happening.

I don't think it should.  They should be equivalent.  Try adding the 
+debug flag to see what it's doing differently in each case.

> i have to mention that i don't have a search specified in the resolv.conf.
> does that matter? if so why?

No it shouldn't.  That tells the resolver (but not dig) to append 
various default domain suffixes to the name you give if it's not 
qualified.

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***



More information about the bind-users mailing list