Add TCP/IP Host Table Entry (ADDTCPHTE)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Add TCP/IP Host Table Entry (ADDTCPHTE) command adds an internet address and its associated host names along with an optional text description field to the local host table. For each entry, the host table is defined to allow one internet address, up to 4 host names, and a text description field.

See also the following host table commands:

If an internet address already exists in the host table that matches the internet address specified in the command, an escape message is sent to the user and the duplicate internet address is not added.

If a remote name server is being used by your system for resolving a host name or an internet address, the choice to first search the remote name server or the local host table depends on how the searched-first value was configured on the configuration panel of the remote name server. To change the remote name server or the searched-first value, enter the Configure TCP/IP (CFGTCP) command and select option 12.

The TCP/IP host table is shipped with the loopback entry. This entry has an internet address of 127.0.0.1 and two host names; LOOPBACK and LOCALHOST. The LOOPBACK host name can only be associated with an internet address that has a first-byte value equal to 127.

Restrictions:

Related APPC over TCP/IP Information

APPC over TCP/IP (AnyNet) uses the host name to map location names to internet addresses. The host name must be in the form:

location.netid.SNA.IBM.COM

Where location is the remote location the program is opening to, and netid is the network identifier for this connection. SNA.IBM.COM is the qualifier that designates this as the APPC over TCP/IP domain.

Location names support characters that cannot be present in host names (for example: $ (dollar), @ (at sign), and # (number sign)). Therefore, the APPC application can open only to locations that fulfill the TCP/IP host name syntax. This limits location names used for APPC over TCP/IP to the characters A-Z (uppercase and lowercase) and 0-9.

Top

Parameters

Keyword Description Choices Notes
INTNETADR Internet address Character value Required, Positional 1
HOSTNAME Host names Values (up to 4 repetitions): Element list Required, Positional 2
Element 1: Name Character value
TEXT Text 'description' Character value Optional
Top

Internet address (INTNETADR)

Specifies the internet address that the host names and text descriptions are associated with. The internet address is specified in the form nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 through 255. An internet address is not valid if it has a value of all binary ones or all binary zeros for the network identifier (ID) portion or the host ID portion of the address. If the internet address is entered from a command line, the address must be enclosed in apostrophes.

Top

Host names (HOSTNAME)

Specifies the host names corresponding to the internet address. The host name can be either the short form or the full domain version of the name. A common practice is to define one short name that is unique within your local network and to also define the full domain version of the host name that is unique within the internet. Specify from 1 to 4 different host names to be associated with the internet address.

A domain name or a host name can be a text string having 1 to 255 characters. Domain names consist of one or more labels separated by periods. Each label can contain up to 63 characters. The first character of each label must be an alphabetic character or a digit. The last character of each label must be an alphabetic character, a digit, or a period. The following characters are allowed in domain names:

Note: These characters are part of the Syntactic Character Set (character set number 640). This character set is also commonly referred to as invariant.

Other domain name and host name conventions include the following:

name
Specify a host name to be associated with the specified internet address. When running APPC over TCP/IP, name is in the form:

location.netid.SNA.IBM.COM

The default if a host name is not specified is blanks. At least one host name must specified. An IP address cannot be a host name.

Top

Text 'description' (TEXT)

Specifies a comment associated with this host table entry.

Note: If the host table will be copied to a system using a different code page than the system it was created on, it is suggested that you avoid using certain characters in a comment. Host table entry comments will be more portable if they are limited to characters in the Syntactic Character Set (invariant).

*BLANK
The text-description field for this host table entry is to contain blanks.
character-value
Specify a text-description field to be associated with the specified internet address. Comments can contain a maximum of 64 characters.
Top

Examples

Example 1: Adding a Short Host Name

ADDTCPHTE   INTNETADR('132.28.71.5')  HOSTNAME(AS400ETH)
            TEXT('AS400ETH on Ethernet subnet')

This command associates the host name AS400ETH with the internet address of 132.28.71.5. The text 'AS400ETH on Ethernet subnet' is saved as the descriptive comment for this host table entry.

Example 2: Adding Two Host Names

ADDTCPHTE   INTNETADR('9.5.42.6')
            HOSTNAME((AS400ETH.SALES.ABC.COM)
                     ('as400eth.sales.abc'))
            TEXT('Entry verified on 1 April 1994 by J. Jones')

This command associates the host names AS400ETH.SALES.ABC.COM and AS400ETH.SALES.ABC with the internet address of 9.5.42.6. Because no significance is attached to a case, a match is found on host name AS400ETH.SALES.ABC.COM or as400eth.sales.abc. The text 'Entry verified on 1 April 1994 by J. Jones' is saved as the descriptive comment for this host table entry.

Top

Error messages

*ESCAPE Messages

TCP1901
Internet address &1 not valid.
TCP1902
Internet address &1 not valid.
TCP1903
Specified host name not valid.
TCP1904
Duplicate internet address &1 found in host table.
TCP1908
Internet address &1 not valid.
TCP1910
LOOPBACK internet address &1 not valid.
TCP1929
Host table not available.
TCP8050
*IOSYSCFG authority required to use &1.
TCP9999
Internal system error in program &1.
Top