缓存名称服务器通常是否缓存否定的DNS响应SERVFAIL

时间:2020-03-05 18:56:15  来源:igfitidea点击:

缓存名称服务器通常是否缓存否定的DNS响应SERVFAIL?

编辑:
为了澄清这个问题,我可以看到缓存名称服务器缓存否定响应NXDOMAIN,NODATA。但是,对于SERVFAIL响应,它不会这样做。这是故意的吗?

解决方案

回答

SOA中的超时字段之一是"负超时"。通常将其设置为较短的时间,例如30或者60秒。因此,是的,但是比"肯定"的响应时间短。

回答

RFC 1034描述了如何缓存否定响应,但是未定义将这些缓存结果返回给对等解析器的机制。 RFC 2308定义了这些属性。

负缓存是DNS规范的可选部分。

回答

SERVFAIL被RFC2308的7.1涵盖:

Server failures fall into two major
  classes.  The first is where a 
  server can determine that it has been
  misconfigured for a zone.  This may
  be where it has been listed as a server, but not configured to be    a
  server for the zone, or where it has
  been configured to be a server    for
  the zone, but cannot obtain the zone
  data for some reason.  This    can
  occur either because the zone file
  does not exist or contains    errors,
  or because another server from which
  the zone should have    been available
  either did not respond or was unable
  or unwilling to    supply the zone.
  
  The second class is where the
  server needs to obtain an answer from 
  elsewhere, but is unable to do so, due
  to network failures, other    servers
  that don't reply, or return server
  failure errors, or    similar.
  
  In either case a resolver MAY cache
  a server failure response.  If it 
  does so it MUST NOT cache it for
  longer than five (5) minutes, and it 
  MUST be cached against the specific
  query tuple <query name, type, 
  class, server IP address>.

因此,基本上,这取决于名称服务器的实现。