Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 686
a3.14_Infinity Avatar asked Jan 30 '14 06:01

a3.14_Infinity


People also ask

What is DNS timeout value?

The DNS timeout setting is referring to DNS server resource records with a Time To Live (TTL) value of 300 seconds.

What does etc resolv.conf do?

The /etc/resolv. conf file is used to configure hostname resolution. It may be manually configured by the system administrator, or may be automatically populated by various network configuration and management tools. It is commonly used to manage DNS requests on Linux systems.

What is search line in etc resolv.conf specified?

From man resolv.conf. The search list is normally determined from the local domain name; by default, it contains only the local domain name. This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names.


1 Answers

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

like image 132
Rahul R Dhobi Avatar answered Oct 21 '22 09:10

Rahul R Dhobi