2 .\" Copyright (C) 2000, 2001 Internet Software Consortium.
4 .\" Permission to use, copy, modify, and distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
9 .\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
10 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
11 .\" INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
12 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
13 .\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
14 .\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15 .\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .TH "HOST" "1" "Jun 30, 2000" "BIND9" ""
19 host \- DNS lookup utility
22 \fBhost\fR [ \fB-aCdlnrTwv\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-N \fIndots\fB\fR ] [ \fB-R \fInumber\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-W \fIwait\fB\fR ] \fBname\fR [ \fBserver\fR ]
26 is a simple utility for performing DNS lookups.
27 It is normally used to convert names to IP addresses and vice versa.
28 When no arguments or options are given,
30 prints a short summary of its command line arguments and options.
32 \fIname\fR is the domain name that is to be looked
33 up. It can also be a dotted-decimal IPv4 address or a colon-delimited
34 IPv6 address, in which case \fBhost\fR will by default
35 perform a reverse lookup for that address.
36 \fIserver\fR is an optional argument which is either
37 the name or IP address of the name server that \fBhost\fR
38 should query instead of the server or servers listed in
39 \fI/etc/resolv.conf\fR.
41 The \fB-a\fR (all) option is equivalent to setting the
42 \fB-v\fR option and asking \fBhost\fR to make
45 When the \fB-C\fR option is used, \fBhost\fR
46 will attempt to display the SOA records for zone
47 \fIname\fR from all the listed authoritative name
48 servers for that zone. The list of name servers is defined by the NS
49 records that are found for the zone.
51 The \fB-c\fR option instructs to make a DNS query of class
52 \fIclass\fR. This can be used to lookup Hesiod or
53 Chaosnet class resource records. The default class is IN (Internet).
55 Verbose output is generated by \fBhost\fR when the
56 \fB-d\fR or \fB-v\fR option is used. The two
57 options are equivalent. They have been provided for backwards
58 compatibility. In previous versions, the \fB-d\fR option
59 switched on debugging traces and \fB-v\fR enabled verbose
62 List mode is selected by the \fB-l\fR option. This makes
63 \fBhost\fR perform a zone transfer for zone
64 \fIname\fR. The argument is provided for
65 compatibility with older implementations. This option is equivalent
66 to making a query of type AXFR.
69 option specifies that reverse lookups of IPv6 addresses should
70 use the IP6.INT domain and "nibble" labels as defined in RFC1886.
71 The default is to use IP6.ARPA and binary labels as defined in RFC2874.
73 The \fB-N\fR option sets the number of dots that have to be
74 in \fIname\fR for it to be considered absolute. The
75 default value is that defined using the ndots statement in
76 \fI/etc/resolv.conf\fR, or 1 if no ndots statement is
77 present. Names with fewer dots are interpreted as relative names and
78 will be searched for in the domains listed in the \fBsearch\fR
79 or \fBdomain\fR directive in
80 \fI/etc/resolv.conf\fR.
82 The number of UDP retries for a lookup can be changed with the
83 \fB-R\fR option. \fInumber\fR indicates
84 how many times \fBhost\fR will repeat a query that does
85 not get answered. The default number of retries is 1. If
86 \fInumber\fR is negative or zero, the number of
87 retries will default to 1.
89 Non-recursive queries can be made via the \fB-r\fR option.
90 Setting this option clears the \fBRD\fR \(em recursion
91 desired \(em bit in the query which \fBhost\fR makes.
92 This should mean that the name server receiving the query will not
93 attempt to resolve \fIname\fR. The
94 \fB-r\fR option enables \fBhost\fR to mimic
95 the behaviour of a name server by making non-recursive queries and
96 expecting to receive answers to those queries that are usually
97 referrals to other name servers.
99 By default \fBhost\fR uses UDP when making queries. The
100 \fB-T\fR option makes it use a TCP connection when querying
101 the name server. TCP will be automatically selected for queries that
102 require it, such as zone transfer (AXFR) requests.
104 The \fB-t\fR option is used to select the query type.
105 \fItype\fR can be any recognised query type: CNAME,
106 NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
107 \fBhost\fR automatically selects an appropriate query
108 type. By default it looks for A records, but if the
109 \fB-C\fR option was given, queries will be made for SOA
110 records, and if \fIname\fR is a dotted-decimal IPv4
111 address or colon-delimited IPv6 address, \fBhost\fR will
112 query for PTR records.
114 The time to wait for a reply can be controlled through the
115 \fB-W\fR and \fB-w\fR options. The
116 \fB-W\fR option makes \fBhost\fR wait for
117 \fIwait\fR seconds. If \fIwait\fR
118 is less than one, the wait interval is set to one second. When the
119 \fB-w\fR option is used, \fBhost\fR will
120 effectively wait forever for a reply. The time to wait for a response
121 will be set to the number of seconds given by the hardware's maximum
122 value for an integer quantity.
125 \fI/etc/resolv.conf\fR