resolv.conf 支持名为 options 的行,允许对解析器的行为进行一些微调。在我的环境中,我们使用 ISC 的 DHCPD 为我们的服务提供 DHCP 服务。目前我可以通过 DHCP 在 resolv.conf 中设置搜索和名称服务器字段,但我也希望能够创建以下行:
options timeout:2 attempts:4
Run Code Online (Sandbox Code Playgroud)
有谁知道这是否可能?
我目前设置了以下与解析器相关的 DHCPD 选项:
option domain-search "example.com";
option domain-name-servers 192.168.1.1, 192.168.1.2, 192.168.1.3, 192.168.1.4;
Run Code Online (Sandbox Code Playgroud)
在这种特殊情况下,系统都运行 CentOS 5/6。