例如,假设您df.uba.ar
通过查询uba.ar
的名称服务器来查找 ns 记录,比如ns.uba.ar
。
该查询中的记录是否可以将您引导至位于df.uba.ar
被查询名称服务器域完全之外的地址的名称服务器(比如说)mynameserver.net
,这可能吗?
答案1
是的,你当然可以使用 NS 记录委托子域名- 这是 DNS 的设计方式 - 事实上,这可能已经在更高级别上发生了。(有一种递归名称服务器的概念 - 即客户端使用的通用服务器 - 它们广泛使用这种机制)
假设您有一个域名 example.co.uk。
根名称服务器知道在哪里可以找到“.uk”CCTLD 域名(它们是使用胶水记录进行硬编码的)。然后,您查询的递归名称服务器将执行以下操作:
- 查询英国名称服务器以获取 co.uk 名称服务器。
- 查询 .co.uk 域名服务器以获取 example.co.uk 域名服务器
因此如果您有 my.example.co.uk,它只是另一个级别的查询 - 3. 查询 example.co.uk 名称服务器以获取 my.example.co.uk 4. 查询 my.example.co.uk 名称服务器以获取 A 或其他记录。
为了演示,我通过指定名称服务器和 test.host.net.nz 的单独区域设置了一个子域“test.host.net.nz”(我拥有 host.net.nz)。(虽然我将自己的名称服务器用于子域,但如果您指向不同的名称服务器,其工作原理也类似)
如果你使用 Linux,你可以使用如下命令来查看此行为
dig +trace test.host.net.nz
我得到的输出是
$ dig +trace test.host.net.nz
; <<>> DiG 9.18.12-0ubuntu0.22.04.3-Ubuntu <<>> +trace test.host.net.nz
;; global options: +cmd
. 7051 IN NS b.root-servers.net.
. 7051 IN NS f.root-servers.net.
. 7051 IN NS l.root-servers.net.
. 7051 IN NS k.root-servers.net.
. 7051 IN NS m.root-servers.net.
. 7051 IN NS h.root-servers.net.
. 7051 IN NS i.root-servers.net.
. 7051 IN NS g.root-servers.net.
. 7051 IN NS c.root-servers.net.
. 7051 IN NS d.root-servers.net.
. 7051 IN NS a.root-servers.net.
. 7051 IN NS e.root-servers.net.
. 7051 IN NS j.root-servers.net.
;; Received 811 bytes from 127.0.0.53#53(127.0.0.53) in 4 ms
nz. 172800 IN NS ns1.dns.net.nz.
nz. 172800 IN NS ns2.dns.net.nz.
nz. 172800 IN NS ns3.dns.net.nz.
nz. 172800 IN NS ns4.dns.net.nz.
nz. 172800 IN NS ns5.dns.net.nz.
nz. 172800 IN NS ns6.dns.net.nz.
nz. 172800 IN NS ns7.dns.net.nz.
nz. 86400 IN DS 13646 8 2 569B1BAE369FD18F03D088FBA91BD58A830E4E21D2C96155CED26754 4CAC14B1
nz. 86400 IN DS 49157 8 2 44628E9BF710B40D5A5B19087A119EAF2C0B5CED7E7BA4268F4FC35B EF14B1C0
nz. 86400 IN DS 63529 8 2 65C9663EACC1AD314058A5A7B127D409D144BBA9A58EC0B6A7F4F028 574DF47B
nz. 86400 IN RRSIG DS 8 1 86400 20231006170000 20230923160000 11019 . Mo/4OJSg4zaXeJw0QMt4RwUqS2uXDlD0BFw4BvNSwomfVILPoH0JI6jC b/AgP4uQdyyR9DPO6iXBsBrOkOkp2BWIbMjyhfLmO8GRT/+cxfVKcp6B PVO2jdrKHHN0EBj3kFUUhcdU/ZMgki4wJpMmuhMJT9uPOYrEBZQsUN5E P0s8zCfoqoFY86SMJRs1S57bRGCpyKoN0kdc2kvxP1RfCUNRmcMhS67J 00Fqhv8M7VgBuL+GoF//OfHDK9txtrmEquJPqAXG3Y70Aj3b2kKUZtWe xFBUr+K3n+eADBRO1AlUEs2VC909KW553pZ+n7i0nr4y8RX/6Bz41/9t OJGyPw==
;; Received 914 bytes from 192.58.128.30#53(j.root-servers.net) in 28 ms
;; UDP setup with 2001:67c:1010:13::53#53(2001:67c:1010:13::53) for test.host.net.nz failed: network unreachable.
;; UDP setup with 2001:67c:1010:13::53#53(2001:67c:1010:13::53) for test.host.net.nz failed: network unreachable.
;; UDP setup with 2001:67c:1010:13::53#53(2001:67c:1010:13::53) for test.host.net.nz failed: network unreachable.
;; UDP setup with 2620:10a:80aa::130#53(2620:10a:80aa::130) for test.host.net.nz failed: network unreachable.
host.net.nz. 86400 IN NS dns2.networksavvy.org.
host.net.nz. 86400 IN NS dns2.host.net.nz.
host.net.nz. 86400 IN NS dns1.host.net.nz.
host.net.nz. 86400 IN NS dns1.networksavvy.org.
ftq1sc65oboavpm01b73vht98aj0j7s4.net.nz. 3600 IN NSEC3 1 1 5 A28B2E20D85645FC FUJ14F0PIO5AL96LCFM2L3JH1E7UTRTM NS SOA RRSIG DNSKEY NSEC3PARAM
ftq1sc65oboavpm01b73vht98aj0j7s4.net.nz. 3600 IN RRSIG NSEC3 8 3 3600 20230929233149 20230923151828 55531 net.nz. GfoNDCz/ybU9LbfNzTf9knywysakZv6SL4hUVllv5OPXQyv3iPtKZdOg hngu+PyeSrfMlfDGuLTNQk3kOqS+iGGXZMpnFSdZweHevtJgY8Whqzz0 YP1R1p8XakEJ997RGf2IePCRBp9ZgLNeg+wC3PLOjW3tPXeWAkuT8+Pi V+Q=
9ct1bpg4b0gddtpcq1pburmco2sepqf4.net.nz. 3600 IN NSEC3 1 1 5 A28B2E20D85645FC 9JCPVKID50C1OU9KTMJ30RA7SMV8P01M NS DS RRSIG
9ct1bpg4b0gddtpcq1pburmco2sepqf4.net.nz. 3600 IN RRSIG NSEC3 8 3 3600 20230929191943 20230924034536 55531 net.nz. VpOzawDkNFCy+pPyM3qE0m4/B1yN/vVgQNYM4yoKdIOEayj3wF8J8UVv 1z9vOK1lOORCe1Jg3cJ+ysocogqdV9ER1mCTuvp3PqXmWP1eSOpXYqBj O6ez6mR2wHTkk8mbXO0mD1y1MicNnSHCu2dRBVWJr06slE/SDtjCh/XM 6fk=
;; Received 704 bytes from 202.46.188.130#53(ns3.dns.net.nz) in 12 ms
test.host.net.nz. 3600 IN A 60.234.77.236
;; Received 61 bytes from 60.234.77.225#53(dns2.host.net.nz) in 0 ms
davidgo@blisscms:/var/www/virtual/cms.networksavvy.org/public_html/bliss3$ dig +trace test.host.net.nz
; <<>> DiG 9.18.12-0ubuntu0.22.04.3-Ubuntu <<>> +trace test.host.net.nz
;; global options: +cmd
. 7047 IN NS b.root-servers.net.
. 7047 IN NS e.root-servers.net.
. 7047 IN NS m.root-servers.net.
. 7047 IN NS i.root-servers.net.
. 7047 IN NS j.root-servers.net.
. 7047 IN NS c.root-servers.net.
. 7047 IN NS k.root-servers.net.
. 7047 IN NS g.root-servers.net.
. 7047 IN NS a.root-servers.net.
. 7047 IN NS f.root-servers.net.
. 7047 IN NS h.root-servers.net.
. 7047 IN NS d.root-servers.net.
. 7047 IN NS l.root-servers.net.
;; Received 811 bytes from 127.0.0.53#53(127.0.0.53) in 0 ms
;; UDP setup with 2001:500:a8::e#53(2001:500:a8::e) for test.host.net.nz failed: network unreachable.
;; UDP setup with 2001:500:a8::e#53(2001:500:a8::e) for test.host.net.nz failed: network unreachable.
;; UDP setup with 2001:500:a8::e#53(2001:500:a8::e) for test.host.net.nz failed: network unreachable.
;; UDP setup with 2001:500:200::b#53(2001:500:200::b) for test.host.net.nz failed: network unreachable.
nz. 172800 IN NS ns3.dns.net.nz.
nz. 172800 IN NS ns7.dns.net.nz.
nz. 172800 IN NS ns5.dns.net.nz.
nz. 172800 IN NS ns1.dns.net.nz.
nz. 172800 IN NS ns2.dns.net.nz.
nz. 172800 IN NS ns4.dns.net.nz.
nz. 172800 IN NS ns6.dns.net.nz.
nz. 86400 IN DS 13646 8 2 569B1BAE369FD18F03D088FBA91BD58A830E4E21D2C96155CED26754 4CAC14B1
nz. 86400 IN DS 63529 8 2 65C9663EACC1AD314058A5A7B127D409D144BBA9A58EC0B6A7F4F028 574DF47B
nz. 86400 IN DS 49157 8 2 44628E9BF710B40D5A5B19087A119EAF2C0B5CED7E7BA4268F4FC35B EF14B1C0
nz. 86400 IN RRSIG DS 8 1 86400 20231006170000 20230923160000 11019 . Mo/4OJSg4zaXeJw0QMt4RwUqS2uXDlD0BFw4BvNSwomfVILPoH0JI6jC b/AgP4uQdyyR9DPO6iXBsBrOkOkp2BWIbMjyhfLmO8GRT/+cxfVKcp6B PVO2jdrKHHN0EBj3kFUUhcdU/ZMgki4wJpMmuhMJT9uPOYrEBZQsUN5E P0s8zCfoqoFY86SMJRs1S57bRGCpyKoN0kdc2kvxP1RfCUNRmcMhS67J 00Fqhv8M7VgBuL+GoF//OfHDK9txtrmEquJPqAXG3Y70Aj3b2kKUZtWe xFBUr+K3n+eADBRO1AlUEs2VC909KW553pZ+n7i0nr4y8RX/6Bz41/9t OJGyPw==
;; Received 950 bytes from 192.33.4.12#53(c.root-servers.net) in 272 ms
;; UDP setup with 2001:67c:1010:13::53#53(2001:67c:1010:13::53) for test.host.net.nz failed: network unreachable.
host.net.nz. 86400 IN NS dns2.networksavvy.org.
host.net.nz. 86400 IN NS dns1.networksavvy.org.
host.net.nz. 86400 IN NS dns1.host.net.nz.
host.net.nz. 86400 IN NS dns2.host.net.nz.
ftq1sc65oboavpm01b73vht98aj0j7s4.net.nz. 3600 IN NSEC3 1 1 5 A28B2E20D85645FC FUJ14F0PIO5AL96LCFM2L3JH1E7UTRTM NS SOA RRSIG DNSKEY NSEC3PARAM
ftq1sc65oboavpm01b73vht98aj0j7s4.net.nz. 3600 IN RRSIG NSEC3 8 3 3600 20230929233149 20230923151828 55531 net.nz. GfoNDCz/ybU9LbfNzTf9knywysakZv6SL4hUVllv5OPXQyv3iPtKZdOg hngu+PyeSrfMlfDGuLTNQk3kOqS+iGGXZMpnFSdZweHevtJgY8Whqzz0 YP1R1p8XakEJ997RGf2IePCRBp9ZgLNeg+wC3PLOjW3tPXeWAkuT8+Pi V+Q=
9ct1bpg4b0gddtpcq1pburmco2sepqf4.net.nz. 3600 IN NSEC3 1 1 5 A28B2E20D85645FC 9JCPVKID50C1OU9KTMJ30RA7SMV8P01M NS DS RRSIG
9ct1bpg4b0gddtpcq1pburmco2sepqf4.net.nz. 3600 IN RRSIG NSEC3 8 3 3600 20230929191943 20230924034536 55531 net.nz. VpOzawDkNFCy+pPyM3qE0m4/B1yN/vVgQNYM4yoKdIOEayj3wF8J8UVv 1z9vOK1lOORCe1Jg3cJ+ysocogqdV9ER1mCTuvp3PqXmWP1eSOpXYqBj O6ez6mR2wHTkk8mbXO0mD1y1MicNnSHCu2dRBVWJr06slE/SDtjCh/XM 6fk=
;; Received 710 bytes from 194.146.106.54#53(ns7.dns.net.nz) in 72 ms
test.host.net.nz. 60 IN NS dns2.networksavvy.org.
test.host.net.nz. 60 IN NS dns1.host.net.nz.
;; Received 115 bytes from 169.197.131.74#53(dns1.networksavvy.org) in 168 ms
test.host.net.nz. 60 IN NS dns2.networksavvy.org.
test.host.net.nz. 60 IN NS dns1.host.net.nz.
;; BAD (HORIZONTAL) REFERRAL
;; Received 115 bytes from 60.234.77.241#53(dns1.host.net.nz) in 4 ms
test.host.net.nz. 3600 IN A 60.234.77.236
;; Received 61 bytes from 77.68.75.47#53(dns2.networksavvy.org) in 332 ms