TCP/IP Configuration and Management Manual
Configuring the NonStop TCP/IP Subsystem
TCP/IP Configuration and Management Manual—427132-004
3-35
Configuration Files for the Internet Environment
HOSTS file
NonStop TCP/IP hosts communicate through their IP addresses. However, IP
addresses are not easy to remember. As a result, it is common practice to assign host
names to IP addresses. Hosts then can be referred to by name. To provide for the
translation, a Domain Name Resolver (DNR) is provided. A DNR, in turn, uses either a
Domain Name Server (DNS) or a HOSTS file; configure the DNR to use one or the
other.
The HOSTS file is a simple edit type file that contains an entry for each remote host
known to your system. Specify each remote host's IP address, host name, and alias.
Each entry in the HOSTS file has the following format:
IP_address host_name [alias...]
The IP_address is a 32-bit numeric value expressed in dotted decimal form. The
IP_address must begin in the first column of an entry in your edit file. The host_name
and aliases are alphanumeric and separated by at least one space.
Consider the example that follows:
# 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
#
Notice that the first entry beginning with 127.0.0.1 has several aliases. This means that
you 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 a
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.tcpipSF.hosts
Note. The IP address 127.0.0.1 is a TCP/IP convention that refers to “this” host or loopback.