34 domain-name-system domain name glue-record
您好,我刚刚为我的域 example.org 设置了一个 DNS 服务器,其中有 2 个名称服务器 ns1.example.org 和 ns2.example.org。我试图在我的注册商处为 ns1 和 ns2 设置胶水记录。
当我做一个 dig example.org 时它现在似乎工作但是当我做一个 whois example.org 时它列出了 ns1.example.org 和 ns2.example.org 但不是他们的 IP 地址,应该设置为胶水记录.
所以我想知道如何检查胶水记录的存在?我是用 whois 做的吗?我看到 .com 和 .net whois 记录同时包含域名和名称服务器的 IP 地址,.org 是否不同?测试这个的正确方法是什么?
谢谢。
Aln*_*tak 52
胶水记录只存在于域名的父区域中。
因此,对于您的example.org
域名,首先找到.org
名称服务器:
% dig +short org. NS
a0.org.afilias-nst.info.
a2.org.afilias-nst.info.
b0.org.afilias-nst.org.
b2.org.afilias-nst.org.
c0.org.afilias-nst.info.
d0.org.afilias-nst.org.
Run Code Online (Sandbox Code Playgroud)
然后,对于您想要测试的尽可能多的这些,明确询问这些名称服务器以NS
获取您域的记录:
% dig +norec @a0.org.afilias-nst.info. example.org. NS
Run Code Online (Sandbox Code Playgroud)
您应该NS
在“AUTHORITY SECTION”中取回正确的记录列表。对于已正确配置胶水的任何名称服务器,您应该看到这些胶水A
(和/或AAAA
)记录出现在“附加部分”中。
要检查是否设置了 GLUE 记录:
dig +trace @a.root-servers.net ns0.nameserverhere.com
Run Code Online (Sandbox Code Playgroud)
如果设置了 GLUE,您应该会看到一条以以下内容结尾的记录:
“Recevied XXX bytes from x.GTLD-SERVERS.NET.”
Run Code Online (Sandbox Code Playgroud)
还有一些网站可以为您做这件事,例如http://www.intodns.com/
小智 5
这是一个实现 Alnitak 答案的小 shell 脚本:
#!/bin/sh
S=${IFS}
IFS=.
for P in $1; do
TLD=${P}
done
IFS=${S}
echo "TLD: ${TLD}"
DNSLIST=$(dig +short ${TLD}. NS)
for DNS in ${DNSLIST}; do
echo "Checking ${DNS}"
dig +norec +nocomments +noquestion +nostats +nocmd @${DNS} $1 NS
done
Run Code Online (Sandbox Code Playgroud)
将域的名称作为参数传递:
./checkgluerecords.sh example.org
Run Code Online (Sandbox Code Playgroud)
dig +trace
通常是检查代表团链的最直接方式。但是,粘合记录位于附加部分中,默认情况下跟踪输出不包括附加部分。您需要明确指定您希望将其包含在输出中。
dig +trace +additional example.com
Run Code Online (Sandbox Code Playgroud)
如果您的想法是检查委托链的完整性,您可能还想查看权威NS
记录,在这种情况下:
dig +trace +additional example.com NS
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
37250 次 |
最近记录: |