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

Under which circumstances will the NS records at the apex of a zone be queried?

· 52CE 我爱测

At what point do the NS records defined at the apex of a zone are queried during normal operations? From what I've researched these records are used by: DNS NOTIFY, for the master to signal slave servers to pull its SOA and updat…

问题原文

原帖链接 · German · CC BY-SA 4.0

At what point do the NS records defined at the apex of a zone are queried during normal operations?

From what I've researched these records are used by:

  • DNS NOTIFY, for the master to signal slave servers to pull its SOA and update their zone files when the master changes.

  • Some tools, to verify the correctness of the DNS zone definitions

  • Iterative DNS resolvers, if they have cached the authoritative NS records for a zone they will use them to answers queries for that zone instead of going to root/TLD/parent servers

  • The server itself, to declare itself as authoritative for its zone (though I'm not convinced this is the case, I believe that is set either externally by each DNS implementation plus the parent DNS server referral NS records and not in the zone file, or via the SOA record)

What I don't understand is under which circumstances would an iterative DNS resolver ever cache the NS records for a zone unless he receives a query specifically for the NS records of that zone

Let me elaborate. From what I understand when iterative resolver that has an empty cache is given a query for a resource (for example IN A www.example.com.), it will:

  1. Query a root DNS server for IN A www.example.com.

1.1. It will receive an empty Answer section

1.2. Authority section with the NS records for the .com. zone (these are not authoritative).

1.3. It will cache these non-authoritative NS records (if it is Child Centric non sticky or Parent Centric). Though RFC 2181 says you SHOULD NOT do this.

  1. Query a TDL .com. DNS server for IN A www.example.com.

2.1. Same deal as above but the non-authoritative NS records are for example.com.

  1. Query an NS server of example.com. for IN A www.example.com.

3.1 Receive an authoritative answer for www.example.com.

3.2 It will cache the A record received.

3.3 It will return an answer to the client

At no point during the above exchange did the iterative resolver emitted the query IN NS example.com. or IN NS .com. or any other query for the authoritative NS records for any zone. So, from what I gather, unless some client/user of the iterative DNS resolver happens to emit the exact query IN NS example.com., the iterative resolver will never cache the authoritative NS records for IN NS example.com.

Is the above the case? or do iterative DNS resolvers implementations fire NS queries for zones for the purpose of caching their authoritative NS records and speed up future queries for the same domain? Or do they only cache authoritative NS records if a client randomly queries the NS records for a zone? Is there even a common or most popular pattern across DNS resolver implementations?

References:

已采纳解答

原帖链接 · Håkan Lindqvist · CC BY-SA 4.0

I think there is really one main case that will deviate from your stated expectation and an additional case that is less common, both being implementation specific:

  • The authoritative server for example.com tacks on the NS records to its response for www.example.com. IN A. It is not required to do so, but it can. Traditionally this has been quite common behavior.

    • Example: BIND does this unless the minimal-responses option is enabled.
  • The resolver server looks up example.com. IN NS as part of following the referral. Not traditionally a common behavior.

    • Example: Unbound will do this (and more) if the harden-referral-path option is enabled.

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

资料来源与适用范围

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

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

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