]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ldns-host/ldns-host.1
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ldns-host / ldns-host.1
1 .\" (c) Magerya Vitaly
2 .\"
3 .\" Copying and distribution of this file, with or without modification,
4 .\" are permitted in any medium without royalty provided the copyright
5 .\" notice and this notice are preserved. This file is offered as-is,
6 .\" without any warranty.
7 .Dd Aug 27, 2012
8 .Dt LDNS-HOST 1
9 .Os
10 .Sh NAME
11 .Nm ldns-host
12 .Nd DNS lookup utility
13 .Sh SYNOPSIS
14 .Nm
15 .Op Fl aCdilrsTvw46
16 .Op Fl c Ar class
17 .Op Fl N Ar ndots
18 .Op Fl R Ar number
19 .Op Fl t Ar type
20 .Op Fl W Ar wait
21 .Ar name
22 .Op Ar server
23 .Sh DESCRIPTION
24 .Nm
25 is a simple utility for performing DNS lookups.  It is normally
26 used to convert names to IP addresses and vice versa.
27 .Pp
28 .Ar name
29 is the domain name that is to be looked up.  It can also be a
30 dotted-decimal IPv4 address or a colon-delimited IPv6 address,
31 in which case
32 .Nm
33 will by default perform a reverse lookup for that address.
34 .Pp
35 When
36 .Ar name
37 is not provided,
38 .Nm
39 prints a short summary of it's usage.
40 .Pp
41 .Ar server
42 is an optional argument which is either a domain name or an IP
43 address of the name server that
44 .Nm
45 should query instead of the server or servers listed in
46 .Pa /etc/resolv.conf .
47 When
48 .Ar server
49 is a domain name, system resolver is used to obtain it's address.
50 .Pp
51 Supported options:
52 .Bl -tag -width indent
53 .It Fl a
54 Make a verbose query of type
55 .Cm ANY .
56 Equivalent to
57 .Fl v Fl t Cm ANY .
58 .It Fl C
59 Query for
60 .Cm SOA
61 records for zone
62 .Ar name
63 from all of it's authoritative name servers.  The list of name
64 servers is obtained via
65 .Cm NS
66 query for
67 .Ar name .
68 .It Fl c Ar class
69 Perform DNS query of class
70 .Ar class .
71 Recognized classes are 
72 .Cm IN Pq Internet ,
73 .Cm CH Pq Chaosnet ,
74 .Cm HS Pq Hesiod ,
75 .Cm NONE ,
76 .Cm ANY
77 and
78 .Cm CLASS Ns Ar N 
79 (where
80 .Ar N
81 is a number from 1 to 255).  Default is
82 .Cm IN .
83 .It Fl d
84 Produce verbose output.  This is a synonym for
85 .Fl v ,
86 and is provided for backward compatibility.
87 .It Fl i
88 Use IP6.INT domain for reverse lookups of IPv6 addresses (as
89 defined in RFC1886; note that RFC4159 deprecates IP6.INT).
90 By default IP6.ARPA is used.
91 .It Fl l
92 List all
93 .Cm NS, PTR, A
94 and
95 .Cm AAAA
96 records in zone
97 .Ar name
98 by performing a zone transfer
99 .Pq Cm AXFR .
100 You can combine this option with
101 .Fl a
102 to print all records, or with
103 .Fl t
104 to only print specific ones.
105 .It Fl N Ar ndots
106 Consider names with at least this many dots as absolute.  That
107 is, try to resolve them directly before consulting
108 .Ic domain
109 or
110 .Ic search
111 options from
112 .Pa /etc/resolv.conf .
113 .It Fl r
114 Perform non-recursive query to the name server by clearing RD
115 .Pq Dq recursion desired
116 bit of the query.
117 .It Fl R Ar number
118 Retry this many times when a query does not receive an answer
119 in time.  The default is 1 retry.  If
120 .Ar number
121 is negative or zero, 1 is used instead.
122 .It Fl s
123 Report SERVFAIL responses as they are, do not ignore them.
124 .It Fl T
125 Query name server over TCP.  By default UDP is used, except for
126 .Cm AXFR
127 and
128 .Cm IXFR
129 queries, which require TCP.
130 .Nm
131 will also retry UDP queries in TCP mode if the UDP response was
132 truncated (i.e. had TC bit set).
133 .It Fl t Ar type
134 Perform DNS query of type
135 .Ar type ,
136 which can be any standard query type name
137 .Pq Cm A , CNAME , MX , TXT , No etc ,
138 a wildcard query
139 .Pq Cm ANY ,
140 or
141 .Cm TYPE Ns Ar N ,
142 where
143 .Ar N
144 is a number from 1 to 65535.  For
145 .Cm IXFR Pq incremental zone transfer
146 queries the starting serial number can be specified by appending
147 an equal sign followed by the number
148 .Pq e.g. Fl t Cm IXFR Ns =12345678 .
149 .Pp
150 The default is to query for
151 .Cm A , AAAA , No and Cm MX
152 records, unless
153 .Fl C
154 or
155 .Fl l
156 options are given (in which case
157 .Cm SOA
158 or
159 .Cm AXFR
160 queries are made) or
161 .Ar name
162 is a valid IP address
163 (in which case reverse lookup using
164 .Cm PTR
165 query is performed).
166 .It Fl v
167 Produce verbose output.
168 .It Fl w
169 Wait forever (or for a very long time) for response from the
170 name server.
171 .It Fl W Ar wait
172 Wait this many seconds for a reply from name server before timing
173 out.  If
174 .Ar wait
175 is negative or zero, value of 1 is used.  The default is to wait
176 10 seconds for TCP connections, and 5 seconds for UDP (both are
177 subject to retries, see option
178 .Fl R ) .
179 .It Fl 4
180 Only use IPv4 transport.
181 .It Fl 6
182 Only use IPv6 transport.
183 .El
184 .Sh FILES
185 .Pa /etc/resolv.conf
186 .Sh SEE ALSO
187 .Xr drill 1 ,
188 .Xr resolv.conf 5
189 .Sh COMPATIBILITY
190 .Nm
191 aims to be reasonably compatible with
192 .Sq host
193 utility from BIND9 distribution, both in supported options and
194 in produced output.  Here is a list of known notable differences:
195 .Bl -bullet
196 .It
197 Debugging options
198 .Pq Fl D No and Fl m
199 are not supported.
200 .It
201 Query class
202 .Cm CLASS0
203 and type
204 .Cm TYPE0
205 are not supported.
206 .It
207 Backslashes in domain names are treated especially.
208 .It
209 The maximum of 255 retries (option
210 .Fl R )
211 are supported.
212 .It
213 Some resource records are formatted differently.  For example,
214 .Cm RRSIG
215 and
216 .Cm DNSKEY
217 records are displayed without spaces in them.
218 .It
219 When parsing
220 .Pa /etc/resolv.conf
221 commands
222 .Ic sortlist
223 and
224 .Ic options
225 are ignored.  When multiple
226 .Ic search
227 and/or
228 .Ic domain
229 commands are present,
230 .Nm
231 first uses the last
232 .Ic domain
233 command, and then all of
234 .Ic search
235 commands, while
236 .Sq host
237 from BIND9 uses whatever command was specified last.
238 .It
239 Multi-packet zone transfers are not supported; only the first
240 response packet is printed.
241 .It
242 .Sq Pseudosection TSIG
243 is missing from verbose packet output.
244 .El
245 .Sh AUTHORS
246 .An Vitaly Magerya Aq magv@tx97.net