2019-04-21 11:50:48 +08:00

38 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="host">host</h1>
<p>常用的分析域名查询工具</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>host命令</strong> 是常用的分析域名查询工具,可以用来测试域名系统工作是否正常。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">host(选项)(参数)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-a显示详细的DNS信息
-c&lt;类型&gt;指定查询类型默认值为“IN“
-C查询指定主机的完整的SOA记录
-r在查询域名时不使用递归的查询方式
-t&lt;类型&gt;:指定查询的域名信息类型;
-v显示指令执行的详细信息
-w如果域名服务器没有给出应答信息则总是等待直到域名服务器给出应答
-W&lt;时间&gt;:指定域名查询的最长时间,如果在指定时间内域名服务器没有给出应答信息,则退出指令;
-4使用IPv4
-6使用IPv6.</code></pre>
<h3 id="参数">参数</h3>
<p>主机:指定要查询信息的主机信息。</p>
<h3 id="实例">实例</h3>
<pre><code class="language-bash">[root@localhost ~]# host www.jsdig.com
www.jsdig.com is an alias for host.1.jsdig.com.
host.1.jsdig.com has address 100.42.212.8
[root@localhost ~]# host -a www.jsdig.com
Trying &quot;www.jsdig.com&quot;
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 34671
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.jsdig.com. IN ANY
;; ANSWER SECTION:
www.jsdig.com. 463 IN CNAME host.1.jsdig.com.
Received 54 bytes from 202.96.104.15#53 in 0 ms</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->