hosts

The hosts map is the the abbreviated name for the hosts.byname map. The derived maps are hosts.byname and hosts.byaddr. In most cases, the NIS map is created from the /etc/hosts file. A typical line looks like this:

host_ip_address host_name [alias,...] # comment

For example:

127.0.0.1 localhost.localdomain localhost
192.168.22.1 arcade.cendura.net arcade arc1 # clustername

For the hosts.byname map, entries are defined like this:

  • Key is the host name: localhost
  • Value is the IP address and any aliases defined for the host: 127.0.0.1 localhost.localdomain localhost

For the hosts.byaddr map, entries are defined like this:

  • Key is an address: 127.0.0.1
  • Value is the IP address and any aliases defined for the host: 127.0.0.1 localhost.localdomain localhost

If you create a hosts map in Active Directory, you must include the key as part of the value. For example:

  • Key: 127.0.0.1
  • Value: IP address and any aliases defined for the host:
    127.0.0.1 localhost.localdomain localhost
  • Comment: The value includes both the host name and IP