TCP/IPv6 Configuration and Management Manual (G06.24+)
NonStop TCP/IPv6 Protocols and Configuration Files
HP NonStop TCP/IPv6 Configuration and Management Manual—524523-008
D-9
HOSTS File
Consider the example that follows:
Notice that the first entry beginning with 127.0.0.1 has several aliases. This means that 
the user can use any of these aliases to communicate with the destination host that 
has the IP address 127.0.0.1.
The alias for a host is optional, and a host can have more than one alias; however, the 
aliases must be separated by spaces and be on the same line. The other entries 
(beginning with 128.1.1.1) each have two host names: one in uppercase and one in 
lowercase. Neither the host name nor the alias is case sensitive.
You can add comments to the HOSTS file by preceding the comment with a pound 
sign (#). You can add comments as separate lines of the file or after the IP address 
and host entry. Include comments like the line name or hardware address that can be 
used for reference.
As indicated earlier, you must configure the DNR to use a HOSTS file; otherwise DNS 
is assumed. Use the ADD DEFINE command of TACL to set the TCPIP^HOST^FILE 
environment variable. 
The TACL ADD DEFINE command that follows is an example:
2> ADD DEFINE =TCPIP^HOST^FILE, FILE $SYSTEM.ZTCPIP.HOSTS
Remember, you must issue such an ADD DEFINE command to indicate that a HOSTS 
file is to be used, as well as the name of the desired HOSTS file. Otherwise, the DNR 
assumes it must use DNS and consults the RESCONF file.
Note that you also must set the TCPIP^HOST^FILE parameter at each terminal that 
uses the TCP/IP network. Then, when you invoke a TCP/IP application with reference 
to a host name, the DNR uses the appropriate HOSTS file. For convenience, include 
such an ADD DEFINE command as an entry in the TACLCSTM file, so that the 
command is executed automatically every time you log onto the NonStop system. 
# HOSTS file
127.0.0.1 me loop geoff mark cyclone
# \CB2 is the gateway between subnets for \ENC1 and \CB1
128.1.1.1 CB21 cb21 # on subnet 1.0, lan01 08008E0002A6
128.1.2.1 CB22 cb22 # on subnet 2.0, lan02 08008E000B2D
#
Note. The IP address 127.0.0.1 is a TCP/IP convention that refers to “this” host or loopback.
Note. For information about the order in which the sockets library searches the HOSTS and 
IPNODES files, see Using the Domain Name Server (DNS) and IPNODES and HOSTS Files
on page 6-6.










