大网数据广告活动
服务器运维问答

What triggers the usage of the negative time to live DNS SOA record value?

· 52CE 我爱测

I'm reading through the following dns tutorial and it has this example in it: domain.com. IN SOA ns1.domain.com. admin.domain.com. ( 12083 ; serial number 3h ; refresh interval 30m ; retry interval 3w ; expiry period 1h ; negativ…

问题原文

原帖链接 · Ole · CC BY-SA 3.0

I'm reading through the following dns tutorial and it has this example in it:

domain.com.  IN SOA ns1.domain.com. admin.domain.com. (
                                        12083   ; serial number
                                        3h      ; refresh interval
                                        30m     ; retry interval
                                        3w      ; expiry period
                                        1h      ; negative TTL
)

The description for the negative TTL value says this:

1h: This is the amount of time that the name server will cache a name error if it cannot find the requested name in this file.

What are the conditions that could trigger the server to cache a name error like this? An example would be really helpful.

已采纳解答

原帖链接 · Andrew B · CC BY-SA 3.0

The negative caching interval in the SOA comes into play when an authoritative server indicated that the requested record did not exist. The specific cases are:

  • Replies with a response code of NXDOMAIN.
  • Replies with a NODATA synthetic state, but only forms where a SOA record is present. (NOERROR rcode, 0 answers, 1 SOA record in authority section + optional NS records)

It's common for server software to enforce a locally configured maximum on this value, so even if you have a negative TTL of 86400 the non-existence isn't necessarily going to be cached for that long by remote recursive servers.

The cases are covered by section RFC 2308 if you want to read further. Read section 2 as a primer, then 5-6.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-01-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。