CL Command Reference - ADDTCPHTE
CL Command List > ADDTCPHTE Reference
Description:
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.
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:
. You must have input/output system configuration (*IOSYSCFG) special authority to run this command.
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.