Imported upstream version 1.5
[manpages-zh.git] / raw / man1 / host.1
blob38a1ef6548ebedeb3756057471cc241e25e78fc6
1 .\"
2 .\" Copyright (C) 2000, 2001  Internet Software Consortium.
3 .\"
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.
7 .\"
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.
16 .\"
17 .TH "HOST" "1" "Jun 30, 2000" "BIND9" ""
18 .SH NAME
19 host \- DNS lookup utility
20 .SH SYNOPSIS
21 .sp
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 ] 
23 .SH "DESCRIPTION"
24 .PP
25 \fBhost\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,
29 \fBhost\fR
30 prints a short summary of its command line arguments and options.
31 .PP
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.
40 .PP
41 The \fB-a\fR (all) option is equivalent to setting the
42 \fB-v\fR option and asking \fBhost\fR to make
43 a query of type ANY.
44 .PP
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.
50 .PP
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).
54 .PP
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
60 output.
61 .PP
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.
67 .PP
68 The \fB-n\fR
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.
72 .PP
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.
81 .PP
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.
88 .PP
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.
98 .PP
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.
123 .SH "FILES"
125 \fI/etc/resolv.conf\fR
126 .SH "SEE ALSO"
128 \fBdig\fR(1),
129 \fBnamed\fR(8).