a3.14_Infinity
a3.14_Infinity

Reputation: 5841

What will timeout value specified in /etc/resolv.conf do?

For example, resolv.conf in /etc/ looks like this:-

search example.com 
nameserver 172.16.1.254
nameserver 172.16.2.254
options timeout:3
options attempts:2

Here, timeout 3 means 3 seconds. But, what is the significance for timeout value? Is it the time taken to connect to DNS server? OR Is it the time allowed to wait for DNS server to return IP address value for a URL?

Upvotes: 16

Views: 43024

Answers (1)

Rahul R Dhobi
Rahul R Dhobi

Reputation: 5816

Yes exactly. Timeout value is time to resolving IP address from hostname through DNS. server,timeout option is to reduce hostname lookup time

timeout:n
sets the amount of time the resolver will wait for a
response from a remote name server before retrying the
query via a different name server.  Measured in
seconds, the default is RES_TIMEOUT (currently 5, see
<resolv.h>).  The value for this option is silently
capped to 30.

Refer http://man7.org/linux/man-pages/man5/resolver.5.html for more information

Upvotes: 18

Related Questions