1HOST(1) BIND9 HOST(1)
2
3
4
6 host - DNS lookup utility
7
9 host [-aCdlnrsTUwv] [-c class] [-N ndots] [-p port] [-R number]
10 [-t type] [-W wait] [-m flag] [[-4] | [-6]] [-v] [-V] {name}
11 [server]
12
14 host is a simple utility for performing DNS lookups. It is normally
15 used to convert names to IP addresses and vice versa. When no arguments
16 or options are given, host prints a short summary of its command line
17 arguments and options.
18
19 name is the domain name that is to be looked up. It can also be a
20 dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which
21 case host will by default perform a reverse lookup for that address.
22 server is an optional argument which is either the name or IP address
23 of the name server that host should query instead of the server or
24 servers listed in /etc/resolv.conf.
25
27 -4
28 Use IPv4 only for query transport. See also the -6 option.
29
30 -6
31 Use IPv6 only for query transport. See also the -4 option.
32
33 -a
34 "All". The -a option is normally equivalent to -v -t ANY. It also
35 affects the behaviour of the -l list zone option.
36
37 -c class
38 Query class: This can be used to lookup HS (Hesiod) or CH
39 (Chaosnet) class resource records. The default class is IN
40 (Internet).
41
42 -C
43 Check consistency: host will query the SOA records for zone name
44 from all the listed authoritative name servers for that zone. The
45 list of name servers is defined by the NS records that are found
46 for the zone.
47
48 -d
49 Print debugging traces. Equivalent to the -v verbose option.
50
51 -i
52 Obsolete. Use the IP6.INT domain for reverse lookups of IPv6
53 addresses as defined in RFC1886 and deprecated in RFC4159. The
54 default is to use IP6.ARPA as specified in RFC3596.
55
56 -l
57 List zone: The host command performs a zone transfer of zone name
58 and prints out the NS, PTR and address records (A/AAAA).
59
60 Together, the -l -a options print all records in the zone.
61
62 -N ndots
63 The number of dots that have to be in name for it to be considered
64 absolute. The default value is that defined using the ndots
65 statement in /etc/resolv.conf, or 1 if no ndots statement is
66 present. Names with fewer dots are interpreted as relative names
67 and will be searched for in the domains listed in the search or
68 domain directive in /etc/resolv.conf.
69
70 -p port
71 Specify the port on the server to query. The default is 53.
72
73 -r
74 Non-recursive query: Setting this option clears the RD (recursion
75 desired) bit in the query. This should mean that the name server
76 receiving the query will not attempt to resolve name. The -r option
77 enables host to mimic the behavior of a name server by making
78 non-recursive queries and expecting to receive answers to those
79 queries that can be referrals to other name servers.
80
81 -R number
82 Number of retries for UDP queries: If number is negative or zero,
83 the number of retries will default to 1. The default value is 1, or
84 the value of the attempts option in /etc/resolv.conf, if set.
85
86 -s
87 Do not send the query to the next nameserver if any server responds
88 with a SERVFAIL response, which is the reverse of normal stub
89 resolver behavior.
90
91 -t type
92 Query type: The type argument can be any recognized query type:
93 CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc.
94
95 When no query type is specified, host automatically selects an
96 appropriate query type. By default, it looks for A, AAAA, and MX
97 records. If the -C option is given, queries will be made for SOA
98 records. If name is a dotted-decimal IPv4 address or
99 colon-delimited IPv6 address, host will query for PTR records.
100
101 If a query type of IXFR is chosen the starting serial number can be
102 specified by appending an equal followed by the starting serial
103 number (like -t IXFR=12345678).
104
105 -T, -U
106 TCP/UDP: By default, host uses UDP when making queries. The -T
107 option makes it use a TCP connection when querying the name server.
108 TCP will be automatically selected for queries that require it,
109 such as zone transfer (AXFR) requests. Type ANY queries default to
110 TCP but can be forced to UDP initially using -U.
111
112 -m flag
113 Memory usage debugging: the flag can be record, usage, or trace.
114 You can specify the -m option more than once to set multiple flags.
115
116 -v
117 Verbose output. Equivalent to the -d debug option. Verbose output
118 can also be enabled by setting the debug option in
119 /etc/resolv.conf.
120
121 -V
122 Print the version number and exit.
123
124 -w
125 Wait forever: The query timeout is set to the maximum possible. See
126 also the -W option.
127
128 -W wait
129 Timeout: Wait for up to wait seconds for a reply. If wait is less
130 than one, the wait interval is set to one second.
131
132 By default, host will wait for 5 seconds for UDP responses and 10
133 seconds for TCP connections. These defaults can be overridden by
134 the timeout option in /etc/resolv.conf.
135
136 See also the -w option.
137
139 If host has been built with IDN (internationalized domain name)
140 support, it can accept and display non-ASCII domain names. host
141 appropriately converts character encoding of domain name before sending
142 a request to DNS server or displaying a reply from the server. If you'd
143 like to turn off the IDN support for some reason, define the
144 IDN_DISABLE environment variable. The IDN support is disabled if the
145 variable is set when host runs.
146
148 /etc/resolv.conf
149
151 dig(1), named(8).
152
154 Internet Systems Consortium, Inc.
155
157 Copyright © 2000-2002, 2004, 2005, 2007-2009, 2014-2020 Internet
158 Systems Consortium, Inc. ("ISC")
159
160
161
162ISC 2009-01-20 HOST(1)