/etc/resolv.conf中指定的超时值是什么?

 pop6959140 发布于 2023-01-30 14:16

例如,/ 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服务器所需的时间吗?或者是否允许等待DNS服务器返回URL的IP地址值?

1 个回答
  • 确切地说,Timeout值是从主机名通过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

    2023-01-30 14:17 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有