bind - Removed version tag from contrib directory and updated README.DRAGONFLY.
[dragonfly.git] / contrib / bind / bin / dig / host.1
CommitLineData
bbbf71a3
JL
1.\" Copyright (C) 2004, 2005, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
2.\" Copyright (C) 2000-2002 Internet Software Consortium.
3.\"
4.\" Permission to use, copy, modify, and/or 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.
7.\"
8.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14.\" PERFORMANCE OF THIS SOFTWARE.
15.\"
16.\" $Id: host.1,v 1.28.164.4 2009/07/11 01:43:27 tbox Exp $
17.\"
18.hy 0
19.ad l
20.\" Title: host
21.\" Author:
22.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
23.\" Date: Jun 30, 2000
24.\" Manual: BIND9
25.\" Source: BIND9
26.\"
27.TH "HOST" "1" "Jun 30, 2000" "BIND9" "BIND9"
28.\" disable hyphenation
29.nh
30.\" disable justification (adjust text to left margin only)
31.ad l
32.SH "NAME"
33host \- DNS lookup utility
34.SH "SYNOPSIS"
35.HP 5
36\fBhost\fR [\fB\-aCdlnrsTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] [\fB\-m\ \fR\fB\fIflag\fR\fR] [\fB\-4\fR] [\fB\-6\fR] {name} [server]
37.SH "DESCRIPTION"
38.PP
39\fBhost\fR
40is 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,
41\fBhost\fR
42prints a short summary of its command line arguments and options.
43.PP
44\fIname\fR
45is 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
46\fBhost\fR
47will by default perform a reverse lookup for that address.
48\fIserver\fR
49is an optional argument which is either the name or IP address of the name server that
50\fBhost\fR
51should query instead of the server or servers listed in
52\fI/etc/resolv.conf\fR.
53.PP
54The
55\fB\-a\fR
56(all) option is equivalent to setting the
57\fB\-v\fR
58option and asking
59\fBhost\fR
60to make a query of type ANY.
61.PP
62When the
63\fB\-C\fR
64option is used,
65\fBhost\fR
66will attempt to display the SOA records for zone
67\fIname\fR
68from 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.
69.PP
70The
71\fB\-c\fR
72option instructs to make a DNS query of class
73\fIclass\fR. This can be used to lookup Hesiod or Chaosnet class resource records. The default class is IN (Internet).
74.PP
75Verbose output is generated by
76\fBhost\fR
77when the
78\fB\-d\fR
79or
80\fB\-v\fR
81option is used. The two options are equivalent. They have been provided for backwards compatibility. In previous versions, the
82\fB\-d\fR
83option switched on debugging traces and
84\fB\-v\fR
85enabled verbose output.
86.PP
87List mode is selected by the
88\fB\-l\fR
89option. This makes
90\fBhost\fR
91perform a zone transfer for zone
92\fIname\fR. Transfer the zone printing out the NS, PTR and address records (A/AAAA). If combined with
93\fB\-a\fR
94all records will be printed.
95.PP
96The
97\fB\-i\fR
98option specifies that reverse lookups of IPv6 addresses should use the IP6.INT domain as defined in RFC1886. The default is to use IP6.ARPA.
99.PP
100The
101\fB\-N\fR
102option sets the number of dots that have to be in
103\fIname\fR
104for it to be considered absolute. The default value is that defined using the ndots statement in
105\fI/etc/resolv.conf\fR, 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
106\fBsearch\fR
107or
108\fBdomain\fR
109directive in
110\fI/etc/resolv.conf\fR.
111.PP
112The number of UDP retries for a lookup can be changed with the
113\fB\-R\fR
114option.
115\fInumber\fR
116indicates how many times
117\fBhost\fR
118will repeat a query that does not get answered. The default number of retries is 1. If
119\fInumber\fR
120is negative or zero, the number of retries will default to 1.
121.PP
122Non\-recursive queries can be made via the
123\fB\-r\fR
124option. Setting this option clears the
125\fBRD\fR
126\(em recursion desired \(em bit in the query which
127\fBhost\fR
128makes. This should mean that the name server receiving the query will not attempt to resolve
129\fIname\fR. The
130\fB\-r\fR
131option enables
132\fBhost\fR
133to mimic the behavior of a name server by making non\-recursive queries and expecting to receive answers to those queries that are usually referrals to other name servers.
134.PP
135By default,
136\fBhost\fR
137uses UDP when making queries. The
138\fB\-T\fR
139option 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.
140.PP
141The
142\fB\-4\fR
143option forces
144\fBhost\fR
145to only use IPv4 query transport. The
146\fB\-6\fR
147option forces
148\fBhost\fR
149to only use IPv6 query transport.
150.PP
151The
152\fB\-t\fR
153option is used to select the query type.
154\fItype\fR
155can be any recognized query type: CNAME, NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
156\fBhost\fR
157automatically selects an appropriate query type. By default, it looks for A, AAAA, and MX records, but if the
158\fB\-C\fR
159option was given, queries will be made for SOA records, and if
160\fIname\fR
161is a dotted\-decimal IPv4 address or colon\-delimited IPv6 address,
162\fBhost\fR
163will query for PTR records. 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 (e.g. \-t IXFR=12345678).
164.PP
165The time to wait for a reply can be controlled through the
166\fB\-W\fR
167and
168\fB\-w\fR
169options. The
170\fB\-W\fR
171option makes
172\fBhost\fR
173wait for
174\fIwait\fR
175seconds. If
176\fIwait\fR
177is less than one, the wait interval is set to one second. When the
178\fB\-w\fR
179option is used,
180\fBhost\fR
181will effectively wait forever for a reply. The time to wait for a response will be set to the number of seconds given by the hardware's maximum value for an integer quantity.
182.PP
183The
184\fB\-s\fR
185option tells
186\fBhost\fR
187\fInot\fR
188to send the query to the next nameserver if any server responds with a SERVFAIL response, which is the reverse of normal stub resolver behavior.
189.PP
190The
191\fB\-m\fR
192can be used to set the memory usage debugging flags
193\fIrecord\fR,
194\fIusage\fR
195and
196\fItrace\fR.
197.SH "IDN SUPPORT"
198.PP
199If
200\fBhost\fR
201has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names.
202\fBhost\fR
203appropriately 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, defines the
204\fBIDN_DISABLE\fR
205environment variable. The IDN support is disabled if the variable is set when
206\fBhost\fR
207runs.
208.SH "FILES"
209.PP
210\fI/etc/resolv.conf\fR
211.SH "SEE ALSO"
212.PP
213\fBdig\fR(1),
214\fBnamed\fR(8).
215.SH "COPYRIGHT"
216Copyright \(co 2004, 2005, 2007\-2009 Internet Systems Consortium, Inc. ("ISC")
217.br
218Copyright \(co 2000\-2002 Internet Software Consortium.
219.br