1834406 Members
1822 Online
110067 Solutions
New Discussion

Re: resolv.conf

 
Wilfred Chau_1
Respected Contributor

resolv.conf

Hi
Which applications would benefit from a lower values of retrans and retry in /etc/resolv.conf?

The default values of retrans and retry are 5 seconds and 4 retries.

5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: resolv.conf

Shalom Wilfred,

Appliations that do a high volume of DNS requests would benefit from lower values. Their response would improve significantly.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: resolv.conf

Anything that relies on DNS.

retrans 1000
retry 2

retrans

Retransmission timeout. It is interpreted during
the res_init() (see resolver(3N)) call. It has
higher precedence than setting it through the
set_resfeild() (see resolver(3N)) API and lower
precedence than setting it through the RES_RETRANS
(see resolver(3N)) environment variable. Whenever
an invalid value is specified for retrans, a
message is flagged in syslog. The default value
is 5000 milliseconds.

retry

Number of retries. This is interpreted during the
res_init() (see resolver(3N)) call. It has higher
precedence than setting it through the
set_resfeild() (see resolver(3N)) API and lower
precedence than setting it through the RES_RETRY
(see resolver(3N)) environment variable. Whenever
an invalid value is specified for retry, a message
is flagged in syslog. The default value is 4.


That will speed up any delays going from 1 nameserver to another - unfortunately, Windows does a better job - if it can't get to the first one, it goes to the second - if successful, it's next query will automatically go to the second. In unix, this is not the case - we will always try the nameservers in order based on resolv.conf.


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Wilfred Chau_1
Respected Contributor

Re: resolv.conf

Thanks Steven for your quick response.

Do you think web server and ssh are such application?

I was tweaking the values and only see improvement for the commerical version of ssh but not openssh. And nslookup or dig do not take advantage of the lower values for some reason?
Wilfred Chau_1
Respected Contributor

Re: resolv.conf

Thanks Geoff for your prompt response.

If an application does not use the resolver routine to resolve DNS names, setting small values would be useless?
Geoff Wild
Honored Contributor

Re: resolv.conf

That is correct - if the application doesn't use the resolver - then what you put in there has no effect.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.