2

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 ...

2

The correct syntax is:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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