HP-UX LAN Administrator's Guide (Feburary 2007)

Table Of Contents
DRAFT COPY Manually Installing and Configuring HP-UX LAN
Creating the /etc/hosts File
Chapter 4 29
host3
/etc/rc.config.d/netconf file:
HOSTNAME=host3
/etc/hosts file:
192.6.1.1 host3 host3.site2.region4
uname -S host3
hostname host3
NOTE When you first install a system, the netconf HOSTNAME entry, the
/etc/hosts entry, the hostname, and uname -S are set for you automatically.
/etc/hosts
Each node has a one line entry in the /etc/hosts file. Each entry in the file takes the
following form:
Syntax
IP_address
host_name
[
alias
]...
Parameters
IP_address
The IP address that uniquely identifies the node.
IP_address
must be in
internet “dot” notation. Refer to Chapter 7, Network Addressing, for more
information on IP addresses.
host_name
Name of the node. Host names can contain any printable character except
spaces, newline, or the comment character (#). Naming Convention: the first
nine characters should be unique for each network host.
alias
Common name or names for the node. An alias is a substitute for
host_name
. Alias names are optional. Naming Convention: the first nine
characters should be unique for each network host.
/etc/hosts Format
When creating the /etc/hosts file, follow these rules:
Lines cannot start with a blank or tab character.
Fields can have any number of blanks or tab characters separating them.