Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hosts(4) — HP-UX 8.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gethostent(3N)

inet(3N)

hosts(4)

Requires Optional LAN/X.25 Software

NAME

hosts − host name data base

DESCRIPTION

This file associates Internet addresses with official host names and aliases.  This allows a user to refer to a host by a symbolic name instead of an Internet address. 

Note: It is required that this file contain the addresses for the local interfaces that ifconfig(1m) needs at boot time and, in HP clusters, the address of each node in the cluster.  When using the name server, named(1m), or Network Information Service, ypserv(1m), this file serves only as a backup when the server is not running. In such circumstances, it is a common practice that /etc/hosts contain a few addresses of machines on the local network. 

For each host, a single line should be present with the following information:

<internetaddress> <officialhostname> <aliases>

If you are running the Network Services as well as the ARPA Services, an official host name consists of the first field (the node name field) of the three-field host name used by NS.  Aliases are other names by which a host is known.  They can substitute for the official host name in most commands.  For example:

192.45.36.5     hpdxsg  testhost

In this example, users can use remote login on hpdxsg by using the command:

rlogin testhost

instead of

rlogin hpdxsg

If your system is in a domain naming environment, an official host name consists of the full domain extended host name.  For example:

192.45.36.5     hpdxsg.xsg.hp.com  hpdxsg  testhost

A line cannot start with a space.  Items are separated by any number of blanks and/or tab characters.  A # indicates the beginning of a comment.  Characters from the # to the end of the line are not interpreted by routines that search the file.  Trailing blanks and/or tabs are allowed at the end of a line. 

For the DARPA Internet network, this file is normally created from the official host database maintained at the Network Information Control Center (NIC), although local changes may be required to bring it up to date regarding unofficial aliases and/or unknown hosts. 

Network addresses are specified in the conventional Internet dot notation using the inet_addr() routine from the Internet address manipulation library, inet(3N). Host names can contain any printable character other than a white space, newline, or comment character.

EXAMPLES

See /etc/hosts. 

AUTHOR

hosts was developed by the University of California, Berkeley. 

SEE ALSO

gethostent(3N), inet(3N). 

Hewlett-Packard Company  —  HP-UX Release 8.05: June 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026