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

Configure BIND with no local domain or forwarder - just root servers

· 52CE 我爱测

I'm coming from Windows. As soon as DNS Server role is installed, Windows downloads list of "Root Servers", sends the query to one of them and caches the response for further use. There's no forwarder here . I want same functiona…

问题原文

原帖链接 · Omid Shojaee · CC BY-SA 4.0

I'm coming from Windows.

As soon as DNS Server role is installed, Windows downloads list of "Root Servers", sends the query to one of them and caches the response for further use. There's no forwarder here.

I want same functionality with Bind: a public DNS server with no local domain and forwarder. Just query root servers and cache the response.

I'm googling for 2 days and have read 20+ tutorials to no avail.

已采纳解答

原帖链接 · Patrick Mevzek · CC BY-SA 4.0

There is nothing specific to do as "forwarding" is an extra specific feature not needed for normal operations. Just enable recursion in bind and do not set up any zones in it, it will then be a recursive nameserver. You might also want to explore simpler alternatives, like unbound.

A recursive nameserver will do iterative queries to get the final answer. Forwarding queries is an edge case for very specific needs, or if you want to share caches/have a hierarchy of caches.

See RFC 8499 on "DNS Terminology":

Recursive mode:  A resolution mode of a server that receives DNS
  queries and either responds to those queries from a local cache or
  sends queries to other servers in order to get the final answers
  to the original queries. 

Recursive resolver:  A resolver that acts in recursive mode.  In
  general, a recursive resolver is expected to cache the answers it
  receives (which would make it a full-service resolver), but some
  recursive resolvers might not cache.

[..]

Forwarding:  The process of one server sending a DNS query with the
  RD bit set to 1 to another server to resolve that query.
  Forwarding is a function of a DNS resolver; it is different than
  simply blindly relaying queries.

Forwarder:  Section 1 of [RFC2308] describes a forwarder as "a
  nameserver used to resolve queries instead of directly using the
  authoritative nameserver chain".  [RFC2308] further says "The
  forwarder typically either has better access to the internet, or
  maintains a bigger cache which may be shared amongst many
  resolvers."  That definition appears to suggest that forwarders
  normally only query authoritative servers.  In current use,
  however, forwarders often stand between stub resolvers and
  recursive servers.  [RFC2308] is silent on whether a forwarder is
  iterative-only or can be a full-service resolver.

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

资料来源与适用范围

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

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

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