DNS子域委托问题

Cat*_*lin 6 domain-name-system subdomain dig

(用更详细的示例更新了帖子)


我的域名:example.com在 DNS 提供商 1 处设置。提供商 1 有域名服务器:

  1. ns1.dns1.com
  2. ns2.dns1.com

我想将subdomain.example.com的权限委托给另一个 DNS 提供商(提供商 2),该提供商拥有名称服务器:

  1. ns1.dns2.com
  2. ns2.dns2.com

为此,我在提供商 1 的区域如下所示:

example.com IN NS ns1.dns1.com
example.com IN NS ns2.dns1.com
example.com IN A 127.0.0.1
subdomain.example.com IN NS ns1.dns2.com
subdomain.example.com IN NS ns2.dns2.com
Run Code Online (Sandbox Code Playgroud)

在提供商 2 处,我设置了区域:subdomain.example.com,如下所示:

subdomain.example.com IN NS ns1.dns2.com
subdomain.example.com IN NS ns2.dns2.com
subdomain.example.com IN A 1.1.1.1
test.subdomain.example.com IN A 1.1.1.2
Run Code Online (Sandbox Code Playgroud)

考试:

# i get a reply (OK here)
dig a subdomain.example.com     

# i don't get a reply for this (error)
dig a test.subdomain.example.com 
Run Code Online (Sandbox Code Playgroud)

这是正常的吗?

更新 2:对于命令dig a test.subdomain.example.com我在结果中获取了域example.com的 SOA 记录。

;; QUESTION SECTION:
;test.subdomain.example.com.            IN      A

;; AUTHORITY SECTION:
example.com.              86400   IN      SOA     ns1.dns1.com. hostmaster.example.com. 2011032805 28800 7200 604800 86400
Run Code Online (Sandbox Code Playgroud)

Cak*_*mox 3

我首先确保您得到 ns1/2.provider-dns.com 作为此查询的答案:

dig subdomain.example.com ns
Run Code Online (Sandbox Code Playgroud)

您可能还想检查该区域是否已加载到您委托的名称服务器上。检查您是否获得了正确的序列号:

dig @ns1.provider-dns.com subdomain.example.com soa
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,请与运行 ns1/2.provider-dns.com 的任何人联系,以确保您的区域已加载。