CHGTCPHTE (Change TCP/IP Host Table Entry)

CHGTCPHTE Command syntax diagram

 

Purpose

The Change TCP/IP Host Table Entry (CHGTCPHTE) command is used to change the host names and text description fields for an existing host table entry in the local host table. A host table entry consists of one internet address, up to four host names, and one text description.

The CHGTCPHTE command can change a minimum of zero and a maximum of four host names associated with a specific internet address. This command can also be used to add or remove a host-name value associated with a specific internet address. To remove a host-name value, specify *BLANK as the host name. Setting all the host names for a host table entry to *BLANK is not allowed.

If the CHGTCPHTE command is prompted with an internet address specified, the current host names and text description for the host table entry associated with that internet address are displayed in the appropriate prompt fields.

If a remote name server is being used by your iSeries 400, the search order used (whether the remote name server or local host table is searched first) for a resolution between a host name and an internet address depends on how the searched-first value was configured on the configuration panel of the remote name server. To change the search order, use option 13 on the Configure TCP/IP (CFGTCP) command.

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 be associated only with an internet address that has a first-byte value equal to 127.

Related APPC over TCP/IP Information:

APPC over TCP/IP (part of the AnyNet/400* function) 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.

Restriction: You must have *IOSYSCFG special authority to use this command.

 

Required Parameters

INTNETADR
Specifies the internet address associated with the host name (or names) or the text-description field that is to be changed in the local host table. 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.

 

Optional Parameters

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. Host names may be up to 255 characters in length.

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:

  • Alphabetical characters A through Z
  • Digits 0 through 9
  • Underscore (_)
  • Minus sign (-)
  • Period (.). Periods are allowed only when they separate labels of the domain style name or as the last character in the domain name. (Refer to RFC 1034.) A domain name cannot have two consecutive periods.


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:

  • Uppercase and lowercase characters are allowed, but no significance is attached to the case. The host name (HOSTNAME) may be converted to uppercase depending on the combination of characters and digits. If the HOSTNAME is surrounded with apostrophes ('), the case is maintained as entered.
  • The host name returned when searching the host table for an internet address is the first host name associated with the internet address. For example, if the address 9.130.38.187 is defined in the host table with names ROCHESTER, JOHN, and RCHAS100, the name ROCHESTER would be returned. The other two host names would not be used in this type of search. However, these host names would be used when searching the host table to find the internet address associated with the names JOHN and RCHAS100.
  • Try to limit your domain name labels to 12 characters. Shorter labels are easier to remember.
  • It is a common practice to use hierarchical names that allow predictable extensions for change and growth. Domain names normally reflect the delegation of authority or hierarchy used to assign them.

    For example, the name SYS1.MFG.ABC.COM can be broken down into the following:

    COM
    All commercial networks.
    ABC.COM
    All systems in the ABC company's commercial network.
    MFG.ABC.COM
    All manufacturing systems in the ABC company's commercial network.
    SYS1.MFG.ABC.COM
    A host named SYS1 in the manufacturing area of the company's commercial network.

    The COM designation is one of several domain names used by convention when connecting to the Internet. Some of the other domain names that follow this convention are:

    COM
    Commercial organizations
    EDU
    Educational institutions
    GOV
    Government institutions
    MIL
    Military groups
    NET
    Major network support centers
    ORG
    Organizations other than those listed previously
    ARPA
    Temporary ARPANET domain
    Country or region code
    Countries other than USA

*SAME: This host-name value is not to be modified.

Note: If *SAME is specified and no other host-name values are specified, all of the host-name values remain the same. If a host table entry has more than one host name identified and if the first host name is specified but no other element values are specified, the remaining host names are not changed.

*BLANK: This host-name value is changed to blanks if it previously existed.

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

location.netid.SNA.IBM.COM
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).

*SAME: The text-description field for this host table entry is not to be modified.

*BLANK: The text-description field for this host table entry is to be changed to blanks.

'description': Specify a text-description field to be associated with the specified internet address. Comments can contain a maximum of 64 characters.

Examples for CHGTCPHTE

Example 1: Changing a Host Name

CHGTCPHTE   INTNETADR('132.28.71.5')
  HOSTNAME((*SAME) (*SAME) (NEWAS400HOST))
  TEXT(*BLANK)

This command changes the third host name associated with internet address 132.28.71.5 to NEWAS400HOST but does not modify the first, second, or fourth host names. The text of the descriptive comment for this host table entry is set to blanks.

Example 2: Changing All Host Names

CHGTCPHTE INTNETADR('9.130.25.21')
  HOSTNAME((MYHOST) (MYHOST.MYNET)
          (MYHOST.MYNET.MYCORP)
          (MYHOST.MYNET.MYCORP.MYFIELD))
  TEXT(*SAME)

This command changes all host names associated with internet address 121.14.32.5. The first host name is specified in the short form, MYHOST. The fourth host name is specified in the fully qualified form, MYHOST.MYNET.MYCORP.MYFIELD. The descriptive comment for this host table entry is not changed.

Example 3: Changing Host Names and Text Description

CHGTCPHTE   INTNETADR('132.28.71.5')
  HOSTNAME((AS400ETH.SALES.ABC.COM) (AS400ETH.SALES.ABC)
           (*BLANK) (*BLANK))
  TEXT('THIS ENTRY UPDATED ON 19 FEB 1994 BY T.J.')

This command changes the first and second host names associated with internet address 132.28.71.5 to AS400ETH.SALES.ABC.COM and AS400ETH.SALES.ABC. The third and fourth host names, if they existed, are changed to blanks. The descriptive comment for this host table entry is changed to 'THIS ENTRY UPDATED ON 19 FEB 1994 BY T.J.'.

Error messages for CHGTCPHTE

*ESCAPE Messages

TCP1901
Internet address &1 not valid.
TCP1902
Internet address &1 not valid.
TCP1903
Specified host name not valid.
TCP1907
Internet address entry &1 does not exist.
TCP1908
Internet address &1 not valid.
TCP1910
LOOPBACK internet address &1 not valid.
TCP1929
Host table not available.
TCP1936
All host names for internet address &1 are blank.