/contrib/bind9/bin/dig/host.docbook

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 279 lines · 251 code · 28 blank · 0 comment · 0 complexity · fe8e1ff8de5ef46d2008be777b803970 MD5 · raw file

  1. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY mdash "&#8212;">]>
  4. <!--
  5. - Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
  6. - Copyright (C) 2000-2002 Internet Software Consortium.
  7. -
  8. - Permission to use, copy, modify, and/or distribute this software for any
  9. - purpose with or without fee is hereby granted, provided that the above
  10. - copyright notice and this permission notice appear in all copies.
  11. -
  12. - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  13. - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  14. - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  15. - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  16. - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  17. - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  18. - PERFORMANCE OF THIS SOFTWARE.
  19. -->
  20. <!-- $Id: host.docbook,v 1.20 2009/01/20 23:47:56 tbox Exp $ -->
  21. <refentry id="man.host">
  22. <refentryinfo>
  23. <date>Jun 30, 2000</date>
  24. </refentryinfo>
  25. <refmeta>
  26. <refentrytitle>host</refentrytitle>
  27. <manvolnum>1</manvolnum>
  28. <refmiscinfo>BIND9</refmiscinfo>
  29. </refmeta>
  30. <refnamediv>
  31. <refname>host</refname>
  32. <refpurpose>DNS lookup utility</refpurpose>
  33. </refnamediv>
  34. <docinfo>
  35. <copyright>
  36. <year>2004</year>
  37. <year>2005</year>
  38. <year>2007</year>
  39. <year>2008</year>
  40. <year>2009</year>
  41. <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
  42. </copyright>
  43. <copyright>
  44. <year>2000</year>
  45. <year>2001</year>
  46. <year>2002</year>
  47. <holder>Internet Software Consortium.</holder>
  48. </copyright>
  49. </docinfo>
  50. <refsynopsisdiv>
  51. <cmdsynopsis>
  52. <command>host</command>
  53. <arg><option>-aCdlnrsTwv</option></arg>
  54. <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
  55. <arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
  56. <arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
  57. <arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
  58. <arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
  59. <arg><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
  60. <arg><option>-4</option></arg>
  61. <arg><option>-6</option></arg>
  62. <arg choice="req">name</arg>
  63. <arg choice="opt">server</arg>
  64. </cmdsynopsis>
  65. </refsynopsisdiv>
  66. <refsect1>
  67. <title>DESCRIPTION</title>
  68. <para><command>host</command>
  69. is a simple utility for performing DNS lookups.
  70. It is normally used to convert names to IP addresses and vice versa.
  71. When no arguments or options are given,
  72. <command>host</command>
  73. prints a short summary of its command line arguments and options.
  74. </para>
  75. <para><parameter>name</parameter> is the domain name that is to be
  76. looked
  77. up. It can also be a dotted-decimal IPv4 address or a colon-delimited
  78. IPv6 address, in which case <command>host</command> will by
  79. default
  80. perform a reverse lookup for that address.
  81. <parameter>server</parameter> is an optional argument which
  82. is either
  83. the name or IP address of the name server that <command>host</command>
  84. should query instead of the server or servers listed in
  85. <filename>/etc/resolv.conf</filename>.
  86. </para>
  87. <para>
  88. The <option>-a</option> (all) option is equivalent to setting the
  89. <option>-v</option> option and asking <command>host</command> to make
  90. a query of type ANY.
  91. </para>
  92. <para>
  93. When the <option>-C</option> option is used, <command>host</command>
  94. will attempt to display the SOA records for zone
  95. <parameter>name</parameter> from all the listed
  96. authoritative name
  97. servers for that zone. The list of name servers is defined by the NS
  98. records that are found for the zone.
  99. </para>
  100. <para>
  101. The <option>-c</option> option instructs to make a DNS query of class
  102. <parameter>class</parameter>. This can be used to lookup
  103. Hesiod or
  104. Chaosnet class resource records. The default class is IN (Internet).
  105. </para>
  106. <para>
  107. Verbose output is generated by <command>host</command> when
  108. the
  109. <option>-d</option> or <option>-v</option> option is used. The two
  110. options are equivalent. They have been provided for backwards
  111. compatibility. In previous versions, the <option>-d</option> option
  112. switched on debugging traces and <option>-v</option> enabled verbose
  113. output.
  114. </para>
  115. <para>
  116. List mode is selected by the <option>-l</option> option. This makes
  117. <command>host</command> perform a zone transfer for zone
  118. <parameter>name</parameter>. Transfer the zone printing out
  119. the NS, PTR
  120. and address records (A/AAAA). If combined with <option>-a</option>
  121. all records will be printed.
  122. </para>
  123. <para>
  124. The <option>-i</option>
  125. option specifies that reverse lookups of IPv6 addresses should
  126. use the IP6.INT domain as defined in RFC1886.
  127. The default is to use IP6.ARPA.
  128. </para>
  129. <para>
  130. The <option>-N</option> option sets the number of dots that have to be
  131. in <parameter>name</parameter> for it to be considered
  132. absolute. The
  133. default value is that defined using the ndots statement in
  134. <filename>/etc/resolv.conf</filename>, or 1 if no ndots
  135. statement is
  136. present. Names with fewer dots are interpreted as relative names and
  137. will be searched for in the domains listed in the <type>search</type>
  138. or <type>domain</type> directive in
  139. <filename>/etc/resolv.conf</filename>.
  140. </para>
  141. <para>
  142. The number of UDP retries for a lookup can be changed with the
  143. <option>-R</option> option. <parameter>number</parameter>
  144. indicates
  145. how many times <command>host</command> will repeat a query
  146. that does
  147. not get answered. The default number of retries is 1. If
  148. <parameter>number</parameter> is negative or zero, the
  149. number of
  150. retries will default to 1.
  151. </para>
  152. <para>
  153. Non-recursive queries can be made via the <option>-r</option> option.
  154. Setting this option clears the <type>RD</type> &mdash; recursion
  155. desired &mdash; bit in the query which <command>host</command> makes.
  156. This should mean that the name server receiving the query will not
  157. attempt to resolve <parameter>name</parameter>. The
  158. <option>-r</option> option enables <command>host</command>
  159. to mimic
  160. the behavior of a name server by making non-recursive queries and
  161. expecting to receive answers to those queries that are usually
  162. referrals to other name servers.
  163. </para>
  164. <para>
  165. By default, <command>host</command> uses UDP when making
  166. queries. The
  167. <option>-T</option> option makes it use a TCP connection when querying
  168. the name server. TCP will be automatically selected for queries that
  169. require it, such as zone transfer (AXFR) requests.
  170. </para>
  171. <para>
  172. The <option>-4</option> option forces <command>host</command> to only
  173. use IPv4 query transport. The <option>-6</option> option forces
  174. <command>host</command> to only use IPv6 query transport.
  175. </para>
  176. <para>
  177. The <option>-t</option> option is used to select the query type.
  178. <parameter>type</parameter> can be any recognized query
  179. type: CNAME,
  180. NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
  181. <command>host</command> automatically selects an appropriate
  182. query
  183. type. By default, it looks for A, AAAA, and MX records, but if the
  184. <option>-C</option> option was given, queries will be made for SOA
  185. records, and if <parameter>name</parameter> is a
  186. dotted-decimal IPv4
  187. address or colon-delimited IPv6 address, <command>host</command> will
  188. query for PTR records. If a query type of IXFR is chosen the starting
  189. serial number can be specified by appending an equal followed by the
  190. starting serial number (e.g. -t IXFR=12345678).
  191. </para>
  192. <para>
  193. The time to wait for a reply can be controlled through the
  194. <option>-W</option> and <option>-w</option> options. The
  195. <option>-W</option> option makes <command>host</command>
  196. wait for
  197. <parameter>wait</parameter> seconds. If <parameter>wait</parameter>
  198. is less than one, the wait interval is set to one second. When the
  199. <option>-w</option> option is used, <command>host</command>
  200. will
  201. effectively wait forever for a reply. The time to wait for a response
  202. will be set to the number of seconds given by the hardware's maximum
  203. value for an integer quantity.
  204. </para>
  205. <para>
  206. The <option>-s</option> option tells <command>host</command>
  207. <emphasis>not</emphasis> to send the query to the next nameserver
  208. if any server responds with a SERVFAIL response, which is the
  209. reverse of normal stub resolver behavior.
  210. </para>
  211. <para>
  212. The <option>-m</option> can be used to set the memory usage debugging
  213. flags
  214. <parameter>record</parameter>, <parameter>usage</parameter> and
  215. <parameter>trace</parameter>.
  216. </para>
  217. </refsect1>
  218. <refsect1>
  219. <title>IDN SUPPORT</title>
  220. <para>
  221. If <command>host</command> has been built with IDN (internationalized
  222. domain name) support, it can accept and display non-ASCII domain names.
  223. <command>host</command> appropriately converts character encoding of
  224. domain name before sending a request to DNS server or displaying a
  225. reply from the server.
  226. If you'd like to turn off the IDN support for some reason, defines
  227. the <envar>IDN_DISABLE</envar> environment variable.
  228. The IDN support is disabled if the variable is set when
  229. <command>host</command> runs.
  230. </para>
  231. </refsect1>
  232. <refsect1>
  233. <title>FILES</title>
  234. <para><filename>/etc/resolv.conf</filename>
  235. </para>
  236. </refsect1>
  237. <refsect1>
  238. <title>SEE ALSO</title>
  239. <para><citerefentry>
  240. <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
  241. </citerefentry>,
  242. <citerefentry>
  243. <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
  244. </citerefentry>.
  245. </para>
  246. </refsect1>
  247. </refentry><!--
  248. - Local variables:
  249. - mode: sgml
  250. - End:
  251. -->