The arguments can be either hostnames or host numbers. The program
first attempts to interpret them as host numbers. If this fails,
it will treat them as hostnames. A host number consists of
integers separated by dots: for example, ``126.96.36.199''.
A hostname consists of names separated by dots: for example,
Unless the name ends in a dot, the local domain
is automatically tacked on the end. Thus, a Rutgers user can enter:
and it will actually look up ``topaz.rutgers.edu''. If this fails, the name is tried unchanged (in this case, ``topaz''). This same convention is used for mail and other network utilities. The actual suffix to tack on the end is obtained from the results of a hostname(ADMN) call, and using everything starting at the first dot. (See below for a description of customizing hostname lookup.)
The first argument is the hostname you want to look up. If this is a number, an inverse query is done: the domain system looks in a separate set of databases used to convert numbers to names.
The second argument is optional. It allows you to specify a particular server to query. If you don't specify this argument, the default server (normally the local machine) is used.
If a name is specified, you may see output of three different kinds. Here is an example that shows all of them:
%host sun4 sun4.rutgers.edu is a nickname for ATHOS.RUTGERS.EDU ATHOS.RUTGERS.EDU has address 188.8.131.52 ATHOS.RUTGERS.EDU has address 184.108.40.206 ATHOS.RUTGERS.EDU mail is handled by ARAMIS.RUTGERS.EDUThe first line of output indicates that the name ``sun4.rutgers.edu'' is actually a nickname. The official hostname is ``ATHOS.RUTGERS.EDU''. The next two lines show the address. If a system has more than one network interface, there will be a separate address for each. The last line indicates that ATHOS.RUTGERS.EDU does not receive its own mail. Mail for it is taken by ARAMIS.RUTGERS.EDU. There may be more than one such line, since some systems have more than one system that will handle mail for them. Technically, every system that can receive mail is supposed to have an entry of this kind. If the system receives its own mail, there should be an entry that mentions the system itself; for example:
XXX mail is handled by XXXHowever, many systems that receive their own mail do not bother to mention that fact. If a system has a ``mail is handled by'' entry, but no address, this indicates that it is not really part of the Internet: a system that is on the network will forward mail to it. Systems on Usenet, Bitnet, and a number of other networks have entries of this kind.
mail is handled by, and
is a nickname for(respectively), and TTL and class fields are not shown.
gives a listing of all hosts in the rutgers.edu domain. The
option is used to filter what information is presented.
The default is address information, which also
includes PTR and NS records. The command:
host -l -v -t any rutgers.edu
gives a complete download of the zone data for rutgers.edu, in the official master file format. (However the SOA record is listed twice, for arcane reasons.)
option only tries the first name server
listed for the
domain that you have requested. If this server is dead, you
may need to specify a server manually. For example, to get a listing
of foo.edu, you could try:
host -t ns foo.edu
To get a list of all the name servers for foo.edu,
and then try:
host -l foo.edu xxx
for all xxx on the list of name servers, until you find one that works.