14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<!ENTITY mdash "—">]>
d63ae51ba337165172a9b50fd5d84805ffe50044Tinderbox User - Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews - file, You can obtain one at http://mozilla.org/MPL/2.0/.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<!-- Converted by db4-upgrade version 1.0 -->
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.host">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentryinfo>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refentryinfo>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refnamediv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refnamediv>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </copyright>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refsynopsisdiv>
3001a1b4e6298466882a4147307b4c28a3b08f91Mark Andrews <arg choice="opt" rep="norepeat"><option>-aCdlnrsTUwv</option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">number</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">flag</replaceable></option></arg>
b7a823a402eb5c4e99f283e58d778a903d2e72f5Michał Kępień <arg choice="opt" rep="norepeat"><option>-4</option></arg>
b7a823a402eb5c4e99f283e58d778a903d2e72f5Michał Kępień <arg choice="opt" rep="norepeat"><option>-6</option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-v</option></arg>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <arg choice="opt" rep="norepeat"><option>-V</option></arg>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </cmdsynopsis>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </refsynopsisdiv>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <refsection><info><title>DESCRIPTION</title></info>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is a simple utility for performing DNS lookups.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein It is normally used to convert names to IP addresses and vice versa.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein When no arguments or options are given,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein prints a short summary of its command line arguments and options.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <para><parameter>name</parameter> is the domain name that is to be
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein up. It can also be a dotted-decimal IPv4 address or a colon-delimited
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein IPv6 address, in which case <command>host</command> will by
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein perform a reverse lookup for that address.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <parameter>server</parameter> is an optional argument which
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the name or IP address of the name server that <command>host</command>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein should query instead of the server or servers listed in
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </refsection>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <refsection><info><title>OPTIONS</title></info>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <variablelist>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Use IPv4 only for query transport.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Use IPv6 only for query transport.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews "All". The <option>-a</option> option is normally equivalent
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews to <option>-v -t <literal>ANY</literal></option>.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews It also affects the behaviour of the <option>-l</option>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews list zone option.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <term>-c <replaceable class="parameter">class</replaceable></term>
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews Query class: This can be used to lookup HS (Hesiod) or CH
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews (Chaosnet) class resource records. The default class is IN
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Check consistency: <command>host</command> will query the
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews SOA records for zone <parameter>name</parameter> from all
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews the listed authoritative name servers for that zone. The
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews list of name servers is defined by the NS records that are
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews found for the zone.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Print debugging traces.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Equivalent to the <option>-v</option> verbose option.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Use the IP6.INT domain for reverse lookups of IPv6
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews addresses as defined in RFC1886 and deprecated in RFC4159.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews The default is to use IP6.ARPA as specified in RFC3596.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews The <command>host</command> command performs a zone transfer of
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews zone <parameter>name</parameter> and prints out the NS,
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews options print all records in the zone.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <term>-N <replaceable class="parameter">ndots</replaceable></term>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews The number of dots that have to be
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews in <parameter>name</parameter> for it to be considered
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews absolute. The default value is that defined using the
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews ndots statement in <filename>/etc/resolv.conf</filename>,
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews or 1 if no ndots statement is present. Names with fewer
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews dots are interpreted as relative names and will be
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews searched for in the domains listed in
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews the <type>search</type> or <type>domain</type> directive
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Non-recursive query:
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews Setting this option clears the RD (recursion desired) bit
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews in the query. This should mean that the name server
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews receiving the query will not attempt to
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews enables <command>host</command> to mimic the behavior of a
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews name server by making non-recursive queries and expecting
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews to receive answers to those queries that can be
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews referrals to other name servers.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <term>-R <replaceable class="parameter">number</replaceable></term>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Number of retries for UDP queries:
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews If <parameter>number</parameter> is negative or zero, the
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews number of retries will default to 1. The default value is
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews 1, or the value of the <parameter>attempts</parameter>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews option in <filename>/etc/resolv.conf</filename>, if set.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Do <emphasis>not</emphasis> send the query to the next
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews nameserver if any server responds with a SERVFAIL
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews response, which is the reverse of normal stub resolver
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <term>-t <replaceable class="parameter">type</replaceable></term>
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews The <parameter>type</parameter> argument can be any
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews When no query type is specified, <command>host</command>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews automatically selects an appropriate query type. By default, it
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews looks for A, AAAA, and MX records.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews If the <option>-C</option> option is given, queries will
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews be made for SOA records.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews If <parameter>name</parameter> is a dotted-decimal IPv4
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews address or colon-delimited IPv6
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews address, <command>host</command> will query for PTR
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews If a query type of IXFR is chosen the starting serial
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews number can be specified by appending an equal followed by
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews the starting serial number
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews (like <option>-t <literal>IXFR=12345678</literal></option>).
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews By default, <command>host</command> uses UDP when making
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews queries. The <option>-T</option> option makes it use a TCP
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews connection when querying the name server. TCP will be
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews automatically selected for queries that require it, such
3001a1b4e6298466882a4147307b4c28a3b08f91Mark Andrews as zone transfer (AXFR) requests. Type ANY queries default
3001a1b4e6298466882a4147307b4c28a3b08f91Mark Andrews to TCP but can be forced to UDP initially using <option>-U</option>.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <term>-m <replaceable class="parameter">flag</replaceable></term>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Memory usage debugging: the flag can
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews be <parameter>record</parameter>, <parameter>usage</parameter>,
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews or <parameter>trace</parameter>. You can specify
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews the <option>-m</option> option more than once to set
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews multiple flags.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Verbose output.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Equivalent to the <option>-d</option> debug option.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Verbose output can also be enabled by setting
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews Print the version number and exit.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews Wait forever: The query timeout is set to the maximum possible.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews <term>-W <replaceable class="parameter">wait</replaceable></term>
28784b996be9f5f8939883a77a8fa4daccd873c3Mark Andrews Timeout: Wait for up to <parameter>wait</parameter>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews seconds for a reply. If <parameter>wait</parameter> is
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews less than one, the wait interval is set to one second.
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews By default, <command>host</command> will wait for 5
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews seconds for UDP responses and 10 seconds for TCP
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews connections. These defaults can be overridden by
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </varlistentry>
cf69e3d8b23f473dce7d07a926a3284d614f363bMark Andrews </variablelist>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt <refsection><info><title>IDN SUPPORT</title></info>
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews If <command>host</command> has been built with IDN (internationalized
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews domain name) support, it can accept and display non-ASCII domain names.
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews <command>host</command> appropriately converts character encoding of
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews domain name before sending a request to DNS server or displaying a
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews reply from the server.
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews If you'd like to turn off the IDN support for some reason, defines
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews the <envar>IDN_DISABLE</envar> environment variable.
6cf369f528c4acd8182eada41ad83b8d97623db8Mark Andrews The IDN support is disabled if the variable is set when
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </citerefentry>,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <citerefentry>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </citerefentry>.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt </refsection>