HOST

Synopsis

HOST [/?] [/V[+|-]] [/X[+|-]] [/IP6ADDR[+|-]] arguments …

Description

The HOST command performs a forward or a reverse lookup on each of the given arguments. It prints the argument that was looked up and the results to its standard output, on a single line.

Whether HOST performs forward or reverse lookups is determined by the /X option. It is not determined by the form of each argument.

For forward lookups, HOST performs the standard server lookup procedure that would be performed by a client that doesn't allow service lookups and always falls back to "implicit" lookup, printing the results of the server lookup rather than contacting the servers for actual service. It has no service name or transport name; and its well-known port number is zero.

For reverse lookups:

Lookups are performed by contacting a proxy DNS server. HOST uses the same DNS client library as applications (and the other service client utilities in the Internet Utilities) use, and so the proxy DNS server contacted is by default the same proxy DNS server as all applications use.

HOST can thus be reconfigured to talk to other DNS servers and to bind the client ends of its sockets to specific IP addresses and port numbers using the DNS client library's ordinary configuration environment variables.

If all lookups are successful, HOST exits with a zero code. Otherwise it exits with a non-zero code.

Command-specific options

/V
Display verbose output, including the queries sent and responses received.
/X
Perform a reverse lookup, mapping an IP address to a name, rather than a forward lookup, mapping a name to an IP address.
/IP6
Enable or disable the requesting of IP version 6 address records.

The Internet Utilities are © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.