Name

host — query a proxy/content DNS server using the DNS protocol

Synopsis

host [-4] [-6] [-r] [-a] [-t t] {n} [s]

Description

host looks up resource records for n. If s is supplied it makes a Domain Name System request to a server at s, otherwise it makes a Domain Name System request to the configured local proxy DNS server(s). It prints the results in the same human-readable format as employed by dnsq(1) and dnsqr(1).

If t is supplied, that is the type of resource record that it looks up. t can be numeric or symbolic, just as for dnsq(1) and dnsqr(1). The -a option is equivalent to -t any .

  1. If the -6 option is not used and n is a human-readable IPv4 address, host defaults t to "ptr" if it is not supplied and looks up the "a.b.c.d.in-addr.arpa." reverse-lookup domain corresponding to that IPv4 address.

  2. If the -4 option is not used and n is a human-readable IPv6 address, host defaults t to "ptr" if it is not supplied and looks up the "a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.ip6.arpa." reverse-lookup domain corresponding to that IPv6 address.

  3. If the -6 option is not used host feeds n through name qualification and defaults t to "a" if it is not supplied.

  4. If the -4 option is not used host feeds n through name qualification and defaults t to "aaaa" if it is not supplied.

The -6 and -4 options are mutually exclusive.

The -r option causes the lookup to use a non-recursive query. Note that this usually will not work if s is not supplied and host is thus defaulting to the configured local proxy DNS server(s), or s denotes proxy DNS servers.

host has no "debug" mode, and its output is already verbose. It does not support non-Internet class queries, performing zone transfers (for which axfr-get(1) is the proper tool), or variations from the normal UDP/TCP timeout and fallback mechanisms. It only employs one query type for any given invocation.

See also

dnsqr(1)

a similar tool that makes requests to the locally configured proxy DNS server

dnsq(1)

a similar tool that makes requests to content DNS servers

tinydns-get(1)

a tool that makes direct queries against a content DNS server's database

History

host was an addition to Daniel J. Bernstein's djbdns toolset by Jonathan de Boyne Pollard.

Author

Original code and documentation by Jonathan de Boyne Pollard.