Dns 如何确定“的适当值”;“缓存最小ttl”;

Dns 如何确定“的适当值”;“缓存最小ttl”;,dns,freebsd,Dns,Freebsd,我在FreeBSD 10桌面上使用Unbound作为本地DNS缓存解析程序,但是,我不确定如何在其配置文件中确定“cache min ttl”的正确值。我在谷歌上搜索过,但似乎没有什么明确的答案。目前,1800是我的选择,但不确定。以下是我的未绑定配置文件: server: interface: 0.0.0.0 verbosity: 1 cache-min-ttl: 1800 logfile: /var/unbound/unbound.log pidfil

我在FreeBSD 10桌面上使用Unbound作为本地DNS缓存解析程序,但是,我不确定如何在其配置文件中确定“cache min ttl”的正确值。我在谷歌上搜索过,但似乎没有什么明确的答案。目前,1800是我的选择,但不确定。以下是我的未绑定配置文件:

server:
    interface: 0.0.0.0
    verbosity: 1
    cache-min-ttl: 1800
    logfile: /var/unbound/unbound.log
    pidfile: /var/run/local_unbound.pid

forward-zone:
      name: "."
      forward-addr: 114.114.114.114        # 114 DNS
      forward-addr: 114.114.115.115        # 114 DNS
      forward-addr: 8.8.8.8        # Google Public DNS
      forward-addr: 8.8.4.4        # Google Public DNS
      forward-addr: 199.85.126.10        # Norton DNS
      forward-addr: 199.85.127.10        # Norton DNS

对于桌面,您不需要自己编写配置文件。脚本
本地解除绑定设置将自动为您执行此操作。自动生成的设置如下所示:

# Generated by local-unbound-setup
server:
        username: unbound
        directory: /var/unbound
        chroot: /var/unbound
        pidfile: /var/run/local_unbound.pid
        auto-trust-anchor-file: /var/unbound/root.key
(您在
resolv.conf
中拥有的名称服务器将添加到
/var/unbound/forward.conf
。请参阅
/usr/sbin/local unbound setup

这意味着,
cache min ttl
保持其默认值,根据unbound.conf(5)手册页面,该值为零

   cache-min-ttl: <seconds>
          Time to live minimum for  RRsets  and  messages  in  the  cache.
          Default  is  0.  If the the minimum kicks in, the data is cached
          for longer than the domain owner intended, and thus less queries
          are  made  to look up the data.  Zero makes sure the data in the
          cache is as the domain owner intended, higher values, especially
          more  than an hour or so, can lead to trouble as the data in the
          cache does not match up with the actual data any more.
缓存最小ttl:
缓存中RRSET和消息的最短生存时间。
默认值为0。如果达到最小值,则缓存数据
比域所有者预期的时间长,因此查询更少
是用来查找数据的。Zero确保
缓存正如域所有者所期望的那样,具有更高的值,尤其是
超过一个小时左右,可能会导致故障,因为数据在
缓存不再与实际数据匹配。

那么您的意思是不需要手动更改
缓存最小ttl
?附言:谢谢,我以前从来都不知道脚本
本地未绑定设置
。它为我生成了更健壮、更合理的配置文件。@JustinYang是的,我会保持原样。