1HOST(1)                              BIND9                             HOST(1)
2
3
4

NAME

6       host - DNS lookup utility
7

SYNOPSIS

9       host [-aCdlnrsTUwv] [-c class] [-N ndots] [-R number] [-t type]
10            [-W wait] [-m flag] [[-4] | [-6]] [-v] [-V] {name} [server]
11

DESCRIPTION

13       host is a simple utility for performing DNS lookups. It is normally
14       used to convert names to IP addresses and vice versa. When no arguments
15       or options are given, host prints a short summary of its command line
16       arguments and options.
17
18       name is the domain name that is to be looked up. It can also be a
19       dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which
20       case host will by default perform a reverse lookup for that address.
21       server is an optional argument which is either the name or IP address
22       of the name server that host should query instead of the server or
23       servers listed in /etc/resolv.conf.
24

OPTIONS

26       -4
27           Use IPv4 only for query transport. See also the -6 option.
28
29       -6
30           Use IPv6 only for query transport. See also the -4 option.
31
32       -a
33           "All". The -a option is normally equivalent to -v -t ANY. It also
34           affects the behaviour of the -l list zone option.
35
36       -c class
37           Query class: This can be used to lookup HS (Hesiod) or CH
38           (Chaosnet) class resource records. The default class is IN
39           (Internet).
40
41       -C
42           Check consistency: host will query the SOA records for zone name
43           from all the listed authoritative name servers for that zone. The
44           list of name servers is defined by the NS records that are found
45           for the zone.
46
47       -d
48           Print debugging traces. Equivalent to the -v verbose option.
49
50       -i
51           Obsolete. Use the IP6.INT domain for reverse lookups of IPv6
52           addresses as defined in RFC1886 and deprecated in RFC4159. The
53           default is to use IP6.ARPA as specified in RFC3596.
54
55       -l
56           List zone: The host command performs a zone transfer of zone name
57           and prints out the NS, PTR and address records (A/AAAA).
58
59           Together, the -l -a options print all records in the zone.
60
61       -N ndots
62           The number of dots that have to be in name for it to be considered
63           absolute. The default value is that defined using the ndots
64           statement in /etc/resolv.conf, or 1 if no ndots statement is
65           present. Names with fewer dots are interpreted as relative names
66           and will be searched for in the domains listed in the search or
67           domain directive in /etc/resolv.conf.
68
69       -r
70           Non-recursive query: Setting this option clears the RD (recursion
71           desired) bit in the query. This should mean that the name server
72           receiving the query will not attempt to resolve name. The -r option
73           enables host to mimic the behavior of a name server by making
74           non-recursive queries and expecting to receive answers to those
75           queries that can be referrals to other name servers.
76
77       -R number
78           Number of retries for UDP queries: If number is negative or zero,
79           the number of retries will default to 1. The default value is 1, or
80           the value of the attempts option in /etc/resolv.conf, if set.
81
82       -s
83           Do not send the query to the next nameserver if any server responds
84           with a SERVFAIL response, which is the reverse of normal stub
85           resolver behavior.
86
87       -t type
88           Query type: The type argument can be any recognized query type:
89           CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
90
91           When no query type is specified, host automatically selects an
92           appropriate query type. By default, it looks for A, AAAA, and MX
93           records. If the -C option is given, queries will be made for SOA
94           records. If name is a dotted-decimal IPv4 address or
95           colon-delimited IPv6 address, host will query for PTR records.
96
97           If a query type of IXFR is chosen the starting serial number can be
98           specified by appending an equal followed by the starting serial
99           number (like -t IXFR=12345678).
100
101       -T, -U
102           TCP/UDP: By default, host uses UDP when making queries. The -T
103           option makes it use a TCP connection when querying the name server.
104           TCP will be automatically selected for queries that require it,
105           such as zone transfer (AXFR) requests. Type ANY queries default to
106           TCP but can be forced to UDP initially using -U.
107
108       -m flag
109           Memory usage debugging: the flag can be record, usage, or trace.
110           You can specify the -m option more than once to set multiple flags.
111
112       -v
113           Verbose output. Equivalent to the -d debug option. Verbose output
114           can also be enabled by setting the debug option in
115           /etc/resolv.conf.
116
117       -V
118           Print the version number and exit.
119
120       -w
121           Wait forever: The query timeout is set to the maximum possible. See
122           also the -W option.
123
124       -W wait
125           Timeout: Wait for up to wait seconds for a reply. If wait is less
126           than one, the wait interval is set to one second.
127
128           By default, host will wait for 5 seconds for UDP responses and 10
129           seconds for TCP connections. These defaults can be overridden by
130           the timeout option in /etc/resolv.conf.
131
132           See also the -w option.
133

IDN SUPPORT

135       If host has been built with IDN (internationalized domain name)
136       support, it can accept and display non-ASCII domain names.  host
137       appropriately converts character encoding of domain name before sending
138       a request to DNS server or displaying a reply from the server. If you'd
139       like to turn off the IDN support for some reason, define the
140       IDN_DISABLE environment variable. The IDN support is disabled if the
141       variable is set when host runs.
142

FILES

144       /etc/resolv.conf
145

SEE ALSO

147       dig(1), named(8).
148

AUTHOR

150       Internet Systems Consortium, Inc.
151
153       Copyright © 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet
154       Systems Consortium, Inc. ("ISC")
155
156
157
158ISC                               2009-01-20                           HOST(1)
Impressum