我在 Google Cloud 上设置了一个 DNS,如下所示:
但仍然无法检索:
me@machine:~$ nslookup wciel.pl ns-cloud-d1.googledomains.com
Server: ns-cloud-d1.googledomains.com
Address: 216.239.32.109#53
*** Can't find wciel.pl: No answer
me@machine:~$ dig wciel.pl @ns-cloud-d1.googledomains.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> wciel.pl @ns-cloud-d1.googledomains.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53429
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;wciel.pl. IN A
;; AUTHORITY SECTION:
wciel.pl. 300 IN SOA ns-cloud-d1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 3600 259200 300
;; Query time: 7 msec
;; SERVER: 216.239.32.109#53(216.239.32.109)
;; WHEN: Fri Aug 02 11:17:59 BST 2019
;; MSG SIZE rcvd: 130
我将非常感激您的帮助。
回答之前:
- 域名注册局指向正确的 NS
- 据我所知,没有 A 记录,据我所知,这不重要
答案1
实际上,您使用 nslookup 和 dig 进行的测试失败了,因为没有 A 记录。默认情况下,这两个命令都使用 A 作为查询类型。由于您没有指定其他类型的查询,因此这些命令会请求名称 wciel.pl 的 A 记录。您可以在下面看到我如何成功获取 NS 和 TXT 记录。但是,当我请求 A 记录时,没有答案,因为它不存在。只要您创建了正确的 A 记录,您的命令nslookup wciel.pl ns-cloud-d1.googledomains.com
就会dig wciel.pl @ns-cloud-d1.googledomains.com
返回预期的答案:
nslookup
>
>
> wciel.pl
Server: 172.16.245.40
Address: 172.16.245.40#53
Non-authoritative answer:
*** Can't find wciel.pl: No answer
>
>
> set q=ns
> wciel.pl
Server: 172.16.245.40
Address: 172.16.245.40#53
Non-authoritative answer:
wciel.pl nameserver = ns-cloud-d1.googledomains.com.
wciel.pl nameserver = ns-cloud-d2.googledomains.com.
wciel.pl nameserver = ns-cloud-d3.googledomains.com.
wciel.pl nameserver = ns-cloud-d4.googledomains.com.
Authoritative answers can be found from:
>
>
> set q=txt
> wciel.pl
Server: 172.16.245.40
Address: 172.16.245.40#53
Non-authoritative answer:
wciel.pl text = "test wciel upd 14:38"
Authoritative answers can be found from:
>
>
> set q=a
> wciel.pl
Server: 172.16.245.40
Address: 172.16.245.40#53
Non-authoritative answer:
*** Can't find wciel.pl: No answer
>