353 lines
7.8 KiB
HTML
353 lines
7.8 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of HOST</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>HOST</H1>
|
|
Section: BIND9 (1)<BR>Updated: 2009-01-20<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
host - DNS lookup utility
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>host</B> [<B>-aACdlnrsTUwv</B>] [<B>-c </B><B></B><I>class</I>] [<B>-N </B><B></B><I>ndots</I>] [<B>-R </B><B></B><I>number</I>] [<B>-t </B><B></B><I>type</I>] [<B>-W </B><B></B><I>wait</I>] [<B>-m </B><B></B><I>flag</I>] [[<B>-4</B>] | [<B>-6</B>]] [<B>-v</B>] [<B>-V</B>] {name} [server]
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>host</B>
|
|
<DD>is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given,
|
|
<B>host</B>
|
|
prints a short summary of its command line arguments and options.
|
|
<P>
|
|
|
|
<I>name</I>
|
|
is the domain name that is to be looked up. It can also be a dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which case
|
|
<B>host</B>
|
|
will by default perform a reverse lookup for that address.
|
|
<I>server</I>
|
|
is an optional argument which is either the name or IP address of the name server that
|
|
<B>host</B>
|
|
should query instead of the server or servers listed in
|
|
/etc/resolv.conf.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
-4
|
|
<DL COMPACT><DT id="2"><DD>
|
|
Use IPv4 only for query transport. See also the
|
|
<B>-6</B>
|
|
option.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-6
|
|
<DL COMPACT><DT id="3"><DD>
|
|
Use IPv6 only for query transport. See also the
|
|
<B>-4</B>
|
|
option.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-a
|
|
<DL COMPACT><DT id="4"><DD>
|
|
"All". The
|
|
<B>-a</B>
|
|
option is normally equivalent to
|
|
<B>-v -t </B><B>ANY</B>. It also affects the behaviour of the
|
|
<B>-l</B>
|
|
list zone option.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-A
|
|
<DL COMPACT><DT id="5"><DD>
|
|
"Almost all". The
|
|
<B>-A</B>
|
|
option is equivalent to
|
|
<B>-a</B>
|
|
except RRSIG, NSEC, and NSEC3 records are omitted from the output.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-c <I>class</I>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Query class: This can be used to lookup HS (Hesiod) or CH (Chaosnet) class resource records. The default class is IN (Internet).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-C
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Check consistency:
|
|
<B>host</B>
|
|
will query the SOA records for zone
|
|
<I>name</I>
|
|
from all the listed authoritative name servers for that zone. The list of name servers is defined by the NS records that are found for the zone.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-d
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Print debugging traces. Equivalent to the
|
|
<B>-v</B>
|
|
verbose option.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-l
|
|
<DL COMPACT><DT id="9"><DD>
|
|
List zone: The
|
|
<B>host</B>
|
|
command performs a zone transfer of zone
|
|
<I>name</I>
|
|
and prints out the NS, PTR and address records (A/AAAA).
|
|
<P>
|
|
Together, the
|
|
<B>-l -a</B>
|
|
options print all records in the zone.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-N <I>ndots</I>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
The number of dots that have to be in
|
|
<I>name</I>
|
|
for it to be considered absolute. The default value is that defined using the ndots statement in
|
|
/etc/resolv.conf, or 1 if no ndots statement is present. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
|
|
<B>search</B>
|
|
or
|
|
<B>domain</B>
|
|
directive in
|
|
/etc/resolv.conf.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-r
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Non-recursive query: Setting this option clears the RD (recursion desired) bit in the query. This should mean that the name server receiving the query will not attempt to resolve
|
|
<I>name</I>. The
|
|
<B>-r</B>
|
|
option enables
|
|
<B>host</B>
|
|
to mimic the behavior of a name server by making non-recursive queries and expecting to receive answers to those queries that can be referrals to other name servers.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-R <I>number</I>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
Number of retries for UDP queries: If
|
|
<I>number</I>
|
|
is negative or zero, the number of retries will default to 1. The default value is 1, or the value of the
|
|
<I>attempts</I>
|
|
option in
|
|
/etc/resolv.conf, if set.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-s
|
|
<DL COMPACT><DT id="13"><DD>
|
|
Do
|
|
<I>not</I>
|
|
send the query to the next nameserver if any server responds with a SERVFAIL response, which is the reverse of normal stub resolver behavior.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-t <I>type</I>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
Query type: The
|
|
<I>type</I>
|
|
argument can be any recognized query type: CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
|
|
<P>
|
|
When no query type is specified,
|
|
<B>host</B>
|
|
automatically selects an appropriate query type. By default, it looks for A, AAAA, and MX records. If the
|
|
<B>-C</B>
|
|
option is given, queries will be made for SOA records. If
|
|
<I>name</I>
|
|
is a dotted-decimal IPv4 address or colon-delimited IPv6 address,
|
|
<B>host</B>
|
|
will query for PTR records.
|
|
<P>
|
|
If a query type of IXFR is chosen the starting serial number can be specified by appending an equal followed by the starting serial number (like
|
|
<B>-t </B><B>IXFR=12345678</B>).
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-T, -U
|
|
<DL COMPACT><DT id="15"><DD>
|
|
TCP/UDP: By default,
|
|
<B>host</B>
|
|
uses UDP when making queries. The
|
|
<B>-T</B>
|
|
option makes it use a TCP connection when querying the name server. TCP will be automatically selected for queries that require it, such as zone transfer (AXFR) requests. Type ANY queries default to TCP but can be forced to UDP initially using
|
|
<B>-U</B>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-m <I>flag</I>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
Memory usage debugging: the flag can be
|
|
<I>record</I>,
|
|
<I>usage</I>, or
|
|
<I>trace</I>. You can specify the
|
|
<B>-m</B>
|
|
option more than once to set multiple flags.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-v
|
|
<DL COMPACT><DT id="17"><DD>
|
|
Verbose output. Equivalent to the
|
|
<B>-d</B>
|
|
debug option. Verbose output can also be enabled by setting the
|
|
<I>debug</I>
|
|
option in
|
|
/etc/resolv.conf.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-V
|
|
<DL COMPACT><DT id="18"><DD>
|
|
Print the version number and exit.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-w
|
|
<DL COMPACT><DT id="19"><DD>
|
|
Wait forever: The query timeout is set to the maximum possible. See also the
|
|
<B>-W</B>
|
|
option.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
-W <I>wait</I>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
Timeout: Wait for up to
|
|
<I>wait</I>
|
|
seconds for a reply. If
|
|
<I>wait</I>
|
|
is less than one, the wait interval is set to one second.
|
|
<P>
|
|
By default,
|
|
<B>host</B>
|
|
will wait for 5 seconds for UDP responses and 10 seconds for TCP connections. These defaults can be overridden by the
|
|
<I>timeout</I>
|
|
option in
|
|
/etc/resolv.conf.
|
|
<P>
|
|
See also the
|
|
<B>-w</B>
|
|
option.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>IDN SUPPORT</H2>
|
|
|
|
<P>
|
|
|
|
If
|
|
<B>host</B>
|
|
has been built with IDN (internationalized domain name) support, it can accept and display non-ASCII domain names.
|
|
<B>host</B>
|
|
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, define the
|
|
<B>IDN_DISABLE</B>
|
|
environment variable. The IDN support is disabled if the variable is set when
|
|
<B>host</B>
|
|
runs.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<P>
|
|
|
|
/etc/resolv.conf
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dig">dig</A></B>(1),
|
|
<B><A HREF="/cgi-bin/man/man2html?8+named">named</A></B>(8).
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
<B>Internet Systems Consortium, Inc.</B>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
<BR>
|
|
|
|
Copyright © 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet Systems Consortium, Inc. ("ISC")
|
|
<BR>
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="21"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="22"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="23"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="24"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="25"><A HREF="#lbAF">IDN SUPPORT</A><DD>
|
|
<DT id="26"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="27"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="28"><A HREF="#lbAI">AUTHOR</A><DD>
|
|
<DT id="29"><A HREF="#lbAJ">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:16 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|