HOST(1) | MidnightBSD General Commands Manual | HOST(1) |
host
— DNS lookup
utility
host |
[-aCdilrsTvw46 ] [-c
class] [-N
ndots] [-R
number] [-t
type] [-W
wait] name
[server] |
host
is a simple utility for performing
DNS lookups. It is normally used to convert names to IP addresses and vice
versa.
name is the domain name that is to be looked
up. It can also be a dotted-decimal IPv4 address or a colon-delimited IPv6
address, in which case host
will by default perform
a reverse lookup for that address.
When name is not provided,
host
prints a short summary of it's usage.
server is an optional argument which is
either a domain name or an IP address of the name server that
host
should query instead of the server or servers
listed in /etc/resolv.conf. When
server is a domain name, system resolver is used to
obtain it's address.
Supported options:
-a
ANY
. Equivalent to
-v
-t
ANY
.-C
SOA
records for zone
name from all of it's authoritative name servers.
The list of name servers is obtained via NS
query
for name.-c
classIN
(Internet), CH
(Chaosnet), HS
(Hesiod),
NONE
, ANY
and
CLASS
N (where
N is a number from 1 to 255). Default is
IN
.-d
-v
,
and is provided for backward compatibility.-i
-l
NS, PTR, A
and
AAAA
records in zone name by
performing a zone transfer (AXFR
). You can combine
this option with -a
to print all records, or with
-t
to only print specific ones.-N
ndotsdomain
or
search
options from
/etc/resolv.conf.-r
-R
number-s
-T
AXFR
and IXFR
queries,
which require TCP. host
will also retry UDP
queries in TCP mode if the UDP response was truncated (i.e. had TC bit
set).-t
typeA
,
CNAME
, MX
,
TXT
, etc), a wildcard
query (ANY
), or
TYPE
N, where
N is a number from 1 to 65535. For
IXFR
(incremental zone transfer) queries the
starting serial number can be specified by appending an equal sign
followed by the number (e.g. -t
IXFR
=12345678).
The default is to query for A
,
AAAA
, and
MX
records, unless -C
or
-l
options are given (in which case
SOA
or AXFR
queries are
made) or name is a valid IP address (in which case
reverse lookup using PTR
query is
performed).
-v
-w
-W
wait-R
).-4
-6
/etc/resolv.conf
host
aims to be reasonably compatible with
‘host’ utility from BIND9 distribution, both in supported
options and in produced output. Here is a list of known notable
differences:
-D
and
-m
) are not supported.CLASS0
and type
TYPE0
are not supported.-R
) are
supported.RRSIG
and DNSKEY
records
are displayed without spaces in them.sortlist
and options
are
ignored. When multiple search
and/or
domain
commands are present,
host
first uses the last
domain
command, and then all of
search
commands, while ‘host’ from
BIND9 uses whatever command was specified last.Vitaly Magerya ⟨magv@tx97.net⟩
August 27, 2012 | midnightbsd-3.1 |