|
» |
|
|
|
NAMEhost — DNS lookup utility SYNOPSIShost
[-4|-6]
[-aCdilrTwv]
[-c
class]
[-N
ndots]
[-R
number]
[-t
type]
[-W
wait]
name
[server] DESCRIPTIONhost
is a simple utility for performing DNS lookups.
It is normally used to convert names to IP addresses and vice versa.
With no options or operands,
host
prints an annotated usage summary. Options- -4
Use only the IPv4 query transport. - -6
Use only the IPv6 query transport. - -a
Equivalent to using
-v -t ANY. - -C
Attempt to display the
SOA
records for zone
name
from all the listed authoritative name servers for that zone.
The list of name servers is defined by the
NS
records that are found for the zone. - -c class
Make a DNS query of class
class.
This can be used to look up class resource records.
The values for
class
are:
- IN
The Internet class (default). - CH, CHAOS
The MIT Chaosnet class. - HS, HESIOD
The MIT Athena Hesiod class.
The
class
values are case-insensitive. - -d
Generate verbose output.
Now equivalent to the
-v
option.
-d
is provided for backwards compatibility.
In previous versions, it switched on debugging traces. - -i
Use the IP6.INT domain, as defined in RFC 1886,
to perform reverse lookups of IPv6 addresses.
The default is to use IP6.ARPA. - -l
Select list mode.
host
performs a zone transfer for zone
name.
Transfer the zone, printing out the
NS,
PTR
and address records
(A/AAAA).
If
-l
is combined with
-a,
all records will be printed. - -N ndots
Set the number of dots that have to be in
name
for it to be considered absolute.
The default value is defined using the
ndots
statement in
/etc/resolv.conf,
or is
1
if no
ndots
statement is present.
Names with fewer dots are interpreted as relative names
and will be searched for in the domains listed in the
search
or
domain
directive in
/etc/resolv.conf. - -R number
Set the number of UDP retries for a lookup.
number
indicates how many times
host
will repeat a query that does not get answered.
The default number of retries is 1.
If
number
is negative or zero, the number of retries is set to 1. - -r
Make nonrecursive queries.
Setting this option clears the RD (recursion desired) bit in the query which
host
makes.
This should mean that the name server receiving the query will not attempt
to resolve the
name
operand. This option enables
host
to mimic the behavior of a name server by making nonrecursive queries
and expecting to receive answers to those queries that are usually
referrals to other name servers. - -T
Use a TCP connection when querying the name server.
TCP is automatically selected for queries that require it,
such as zone transfer
(AXFR)
requests.
By default
host
uses UDP when making queries. - -t type
Select the query type.
type
can be any recognized query type:
A,
AAAA,
ANY,
AXFR,
CNAME,
IXFR,
KEY,
NS,
PTR,
SIG,
SOA,
and so on.
For potential values,
see the
set querytype
command in
nslookup(1)
and the
Zone File
discussion in
named.conf(4). The
type
values are case-insensitive. When the
-t
option is omitted,
host
automatically selects an appropriate query type.
By default, it looks for
A
records, but if the
-C
option is given, queries are made for
SOA
records.
If the
name
operand is an IPv4 or IPv6 address,
host
queries for
PTR
records. For a query type of
IXFR,
you can specify the starting serial number by appending an equals sign
followed by the starting serial number (for example,
-t IXFR=12345678). - -v
Generate verbose output. - -W wait
Set the time to wait for a reply to
wait
seconds.
If
wait
is less than 1,
the wait interval is set to 1. - -w
Effectively wait forever for a reply.
The time to wait for a response is set to the number of seconds
given by the hardware's maximum value for an integer quantity.
Operands- name
The domain name that is to be looked up.
It can also be an IPv4 or IPv6 address,
in which case
host
will, by default, perform a reverse lookup for that address. - server
The name or IP address of the name server that
host
should query.
The default is the server or servers listed in
/etc/resolv.conf.
EXAMPLESUsing a host name:
$ host example.com
example.com has address 192.0.34.166 Using an IP address:
$ host 192.0.34.166
166.34.0.192.in-addr.arpa domain name pointer www.example.com. AUTHORdnssec-signzone
was developed by the Internet Systems Consortium (ISC). SEE ALSOdig(1),
nslookup(1),
named(1M),
named.conf(4),
resolver(4). Requests for Comments (RFC):
1886,
available online at
http://www.rfc-editor.org/. HP-UX IP Address and Client Management Administrator's Guide,
available online at
http://docs.hp.com. BIND 9 Administrator Reference Manual,
available from the Internet Systems Consortium at
http://www.isc.org/sw/bind/arm93.
|