According to the man page for resolv.conf, I should be able to specify a few options for how the resolver will resolve a given hostname for lookup: http://linux.die.net/man/5/resolv.conf

I know my nameservers are local and should respond quickly, therefore I want the timeout to be 2 seconds (maybe 1S). I also want to randomly swap which nameserver I will be hitting. So Ip ut together the following config according to the docs:

nameserver 10.10.1.15
nameserver 10.10.1.16
option timeout:1
option rotate
option attempts:1

However, it still takes about 5 seconds between each ping when I nerf my first name server entry :

nameserver 10.10.1.250
nameserver 10.10.1.16
option timeout:1
option rotate
option attempts:1

Further, I don't get the expected 5s, 1s, 5s, 1s delay I would expect if the resolver was round-robin-ing the requests between the first and second NS... Does anybody know why, or how to make it do what I want?

Thanks ...

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

The correct syntax is:

nameserver 10.10.1.15
nameserver 10.10.1.16
options timeout:1 rotate attempts:1
link|improve this answer
you are my hero.. Thanks! – Zak Dec 16 '10 at 22:56
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.