VxRail:如何使用 dig 來確認 DNS 功能
Summary: 本 KB 文章討論在有疑似名稱解析問題時,使用 Linux 網域資訊收集器 (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 查詢
使用挖掘工具運行反向 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 延伸,請參閱相關的 KB 文章。
Additional Information
如需其他範例,請參閱 https://www.rootusers.com/12-dig-command-examples-to-query-dns-in-linux/ 。(外部連結)
Affected Products
VxRail Appliance Series, VxRail SoftwareArticle 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.