MAN page from Trustix bind-utils-9.2.2-9tr.i586.rpm
Updated: Jun 30, 2000Index
host - DNS lookup utility
host [ -aCdlnrTwv ] [ -c class ] [ -N ndots ] [ -R number ] [ -t type ] [ -W wait ] name [ server ]
hostis a simple utility for performing DNS lookups.It is normally used to convert names to IP addresses and vice versa.When no arguments or options are given,hostprints a short summary of its command line arguments and options.
name is the domain name that is to be lookedup. It can also be a dotted-decimal IPv4 address or a colon-delimitedIPv6 address, in which case host will by defaultperform a reverse lookup for that address.server is an optional argument which is eitherthe name or IP address of the name server that hostshould query instead of the server or servers listed in/etc/resolv.conf.
The -a (all) option is equivalent to setting the-v option and asking host to makea query of type ANY.
When the -C option is used, hostwill attempt to display the SOA records for zonename from all the listed authoritative nameservers for that zone. The list of name servers is defined by the NSrecords that are found for the zone.
The -c option instructs to make a DNS query of classclass. This can be used to lookup Hesiod orChaosnet class resource records. The default class is IN (Internet).
Verbose output is generated by host when the-d or -v option is used. The twooptions are equivalent. They have been provided for backwardscompatibility. In previous versions, the -d optionswitched on debugging traces and -v enabled verboseoutput.
List mode is selected by the -l option. This makeshost perform a zone transfer for zonename. The argument is provided forcompatibility with older implementations. This option is equivalentto making a query of type AXFR.
The -noption specifies that reverse lookups of IPv6 addresses shoulduse the IP6.INT domain and "nibble" labels as defined in RFC1886.The default is to use IP6.ARPA and binary labels as defined in RFC2874.
The -N option sets the number of dots that have to bein name for it to be considered absolute. Thedefault value is that defined using the ndots statement in/etc/resolv.conf, or 1 if no ndots statement ispresent. Names with fewer dots are interpreted as relative names andwill be searched for in the domains listed in the searchor domain directive in/etc/resolv.conf.
The number of UDP retries for a lookup can be changed with the-R option. number indicateshow many times host will repeat a query that doesnot get answered. The default number of retries is 1. Ifnumber is negative or zero, the number ofretries will default to 1.
Non-recursive queries can be made via the -r option.Setting this option clears the RD --- recursiondesired --- bit in the query which host makes.This should mean that the name server receiving the query will notattempt to resolve name. The-r option enables host to mimicthe behaviour of a name server by making non-recursive queries andexpecting to receive answers to those queries that are usuallyreferrals to other name servers.
By default host uses UDP when making queries. The-T option makes it use a TCP connection when queryingthe name server. TCP will be automatically selected for queries thatrequire it, such as zone transfer (AXFR) requests.
The -t option is used to select the query type.type can be any recognised query type: CNAME,NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,host automatically selects an appropriate querytype. By default it looks for A records, but if the-C option was given, queries will be made for SOArecords, and if name is a dotted-decimal IPv4address or colon-delimited IPv6 address, host willquery for PTR records.
The time to wait for a reply can be controlled through the-W and -w options. The-W option makes host wait forwait seconds. If waitis less than one, the wait interval is set to one second. When the-w option is used, host willeffectively wait forever for a reply. The time to wait for a responsewill be set to the number of seconds given by the hardware's maximumvalue for an integer quantity.
- SEE ALSO
This document was created byman2html,using the manual pages.