Operating System - HP-UX
1833994 Members
6140 Online
110063 Solutions
New Discussion

Re: Host file configuration

 
hpuxrox
Respected Contributor

Host file configuration

This might seem trivial, but what is the absolute best practice for the host file configuration? I have always used IP, FQDN and HOSTNAME. However, this configuration is sometimes brought into question in that adding FQDN is the job of DNS.
5 REPLIES 5
Jaime Bolanos Rojas.
Honored Contributor

Re: Host file configuration

Yates,

According to the file in newconfig, this should be the correct format for it, without the FQDN:

# @(#)B11.23_LRhosts $Revision: 1.9.214.1 $ $Date: 96/10/08 13:20:01 $
#
# The form for each entry is:
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#

127.0.0.1 localhost loopback
#

Regards,

Jaime.
Work hard when the need comes out.
Peter Godron
Honored Contributor

Re: Host file configuration

HI,
if you see "man hosts", the official version is:


The DNS part may come in handy, depending on the order set up in /etc/nsswitch.conf
Jannik
Honored Contributor

Re: Host file configuration

I would do it with
IP, HOSTNAME, FQDN, OTHER, OTHER

The the name would be HOSTNAME and the others would be aliases. On the servers I have where HP have done the installation that is how they have done it.

looking up FILES
Name: HOSTNAME
Address: 172.16.1.6
Aliases: HOSTNAME.hp.com, HOSTNAME2.hp.com
jaton
Ivan Krastev
Honored Contributor

Re: Host file configuration

I think that this is your decision and depend on network/services . For examples and configuring hosts see http://docs.hp.com/en/B2355-90748/ch03s06.html

regards,
ivan
Steven E. Protter
Exalted Contributor

Re: Host file configuration

Shalom,

For small groups of systems, I use /etc/hosts to support short names to make scripting and other operations easier.

192.168.0.7 starbuck starbuck.investmenttool.com

This provides shortname compatability along with FDQN if needed. Generally however, I use DNS to provide FDQN.

I take care to make sure any FDQN entries in /etc/hosts are consistent with the DNS database.

Providing it in both places keeps IMPORTANT servers working properly when DNS is being restarted or has failed after a zone file change that wasn't checked with named-checkzone

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com