2014-01-30 22 views
4

例如,resolv.conf的在/ etc /看起來像這樣: -/etc/resolv.conf中指定的超時值是什麼?

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

這裏,超時3裝置3秒。 但是,超時值有什麼意義? 是否需要連接到DNS服務器? OR 是否允許等待DNS服務器返回URL的IP地址值?

回答

6

是完全相同,超時值時,通過DNS服務器的主機名從解析IP地址,超時選項是爲了減少主機名查找時間

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. 

參考http://man7.org/linux/man-pages/man5/resolver.5.html瞭解更多信息

相關問題