VxRail:如何使用 dig 验证 DNS 功能

Summary: 本知识库文章讨论了在存在可疑名称解析问题时使用 Linux Domain Information Groper (dig) 验证客户域名系统 (DNS) 配置。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

使用 Dig 验证 DNS 功能

本文讨论在存在可疑名称解析问题时使用 Linux dig 工具验证客户 DNS 配置。

基本 DNS 查询

默认情况下,在未指定名称服务器的情况下,将使用 /etc/resolv.conf 文件中的 DNS 解析器。挖掘部门还寻找 A 未指定其他选项进行录制。

mystic@qvxrm:~> dig esxi-vxrail-quanta-01.domain.com +short
192.0.2.100
mystic@qvxrm:~> dig esxi-vxrail-quanta-01.domain.com
; <<>> DiG 9.9.9-P1 <<>> esxi-vxrail-quanta-01.domain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14171
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;esxi-vxrail-quanta-01.domain.com.        IN      A

;; ANSWER SECTION:
esxi-vxrail-quanta-01.domain.com. 3600 IN A       192.0.2.100

;; Query time: 0 msec
;; SERVER: 192.0.2.200#53(192.0.2.200)
;; WHEN: Mon Oct 01 06:53:43 UTC 2018
;; MSG SIZE  rcvd: 75

查询特定的名称服务器

指定要将查询发送到的名称服务器,使用 @ 符号,后跟要与之通信的名称服务器的主机名或 IP 地址。

mystic@qvxrm:~> dig esxi-vxrail-quanta-01.domain.com +short
192.0.2.100

mystic@qvxrm:~> dig @192.0.2.200 esxi-vxrail-quanta-01.domain.com +short
192.0.2.100

mystic@qvxrm:~> dig @192.0.2.200 esxi-vxrail-quanta-01.domain.com

; <<>> DiG 9.9.9-P1 <<>> @192.0.2.200 esxi-vxrail-quanta-01.domain.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35841
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;esxi-vxrail-quanta-01.domain.com.        IN      A

;; ANSWER SECTION:
esxi-vxrail-quanta-01.domain.com. 3600 IN A       192.0.2.100

;; Query time: 0 msec
;; SERVER: 192.0.2.200#53(192.0.2.200)
;; WHEN: Mon Oct 01 06:54:40 UTC 2018
;; MSG SIZE  rcvd: 75

反向 DNS 查找

使用 dig 工具运行反向 DNS 查找、查询 IP 以及从指针记录 (PTR) 查找域名。这是通过使用 -x 选项后跟 IP 地址。

mystic@qvxrm:~> dig -x 192.0.2.100 +short
esxi-vxrail-quanta-01.domain.com.

mystic@qvxrm:~> dig @192.0.2.200 -x 192.0.2.100 +short
esxi-vxrail-quanta-01.domain.com.

mystic@qvxrm:~> dig -x 192.0.2.100

; <<>> DiG 9.9.9-P1 <<>> -x 192.0.2.100
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42434
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;100.2.0.192.in-addr.arpa.     IN      PTR

;; ANSWER SECTION:
100.2.0.192.in-addr.arpa. 3600 IN      PTR     esxi-vxrail-quanta-01.domain.com.

;; Query time: 0 msec
;; SERVER: 192.0.2.200#53(192.0.2.200)
;; WHEN: Mon Oct 01 06:55:57 UTC 2018
;; MSG SIZE  rcvd: 98
如果客户 DNS 不支持 eDNS 扩展,请参阅相关的知识库文章。

Additional Information

有关其他示例,请参阅 https://www.rootusers.com/12-dig-command-examples-to-query-dns-in-linux/此超链接会将您带往 Dell Technologies 之外的网站。(外部链接)

Affected Products

VxRail Appliance Series, VxRail Software
Article Properties
Article Number: 000009594
Article Type: How To
Last Modified: 14 Jul 2026
Version:  9
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.