Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hosts(5N) — UTek 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gethostent(3n)

nameserver(8n)

ypinit(8)



HOSTS(5N)               COMMAND REFERENCE               HOSTS(5N)



NAME
     hosts - host name data base

DESCRIPTION
     The hosts file contains information regarding the known
     hosts on the local network.  Only hosts not running the
     nameserver(8n) are listed.  For each host a single line
     should be present with the following information:

          Internet address     official host     namealiases

     Items are separated by any number of blanks and/or tab
     characters.  A # indicates the beginning of a comment;
     characters up to the end of the line are not interpreted by
     routines which search the file.  This file is normally
     created from the official host data base maintained at the
     Network Information Control Center (NIC), though 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 dot
     ( . ) notation using the inet_addr routine from the Internet
     address manipulation library, inet(3n).  Host names may
     contain any printable character other than a field
     delimiter, newline, or comment character.

     If Yellow Pages are running under the Network File System,
     the master YP server's /etc/hosts file must contain entries
     for all hosts in the local YP domain, in the form
     net_address hostname; it should also contain entries for any
     other machines you can reach from the server.

     An example /etc/hosts file on the YP master might look like
     this:

          6.127.1         localhost
          6.192.9.1.87    zippy    # John Q. Random
          6.128.12.65     hammer hammer1 hammeril1

     Duplicate entries for gateway machines should be removed
     from /etc/hosts on the master YP server before running the
     command ypinit -m.  Keep the entry with the address
     corresponding to the local Ethernet loop.  For example, if
     the master server is on net loop 6, and the gateway
     workstation hammer has these entries in /etc/hosts on the
     master server:

          5.128.12.52     hammer hammeril0
          6.128.12.65     hammer hammer1 hammeril1
          17.128.9.255    hammer hammer2 hammeril2





Printed 3/13/89                                                 1





HOSTS(5N)               COMMAND REFERENCE               HOSTS(5N)



     the entries beginning with 5 and 17 should be commented out
     or removed.  Otherwise, when ypinit -m attempts to make the
     host's data base, only the first entry it encounters will be
     used; ypinit complains about the other entries but doesn't
     include them in the data base.  This means that all machines
     in that YP  domain would know only one address for hammer --
     5.128.12.52, which is not on the local net (loop 6).

FILES
     /etc/hosts

CAVEATS
     The nameserver(8n) reads this file on startup, so changes
     will not be reflected until it is restarted.

     Only the first entry is used in the case of duplicates.

SEE ALSO
     gethostent(3n), nameserver(8n), ypinit(8).




































Printed 3/13/89                                                 2





































































%%index%%
na:288,79;
de:367,2537;3264,481;
fi:3745,89;
ca:3834,278;
se:4112,222;
%%index%%000000000104

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