RNMTCPHTE (Changing host table entry IP without having to remove and add back)

Host table entries on IBM i are something that every system administrator touches. At the very least, you should always have an entry in there that resolves the hostname of your system to the correct IP address. There are many services (like SSH and Navigator for i) that will run much faster if his host table entry is in place and correct.

In this world, the only thing constant is change, and when changes start happening, IP addresses tend to start changing. When IP addresses change, you have to change those host table entries that have remained the same on your system for a long time. If you take the usual command-line route to changing them, you will hop to the Configure TCP/IP menu (CFGTCP) and then take option 10 – Work with TCP/IP host table entries.

The obvious option to take here is option 2 for change, but once you get to changing the host table entry, you quickly realize that it will not allow you to change the IP address of the entry – only the hostnames associated with it. Most admins at this point will take option 4 to remove the entry and then option 1 to add it back. Well, there is actually a simpler one-step way to take care of this: taking option 7 to rename.

The rename allows you to do one thing:  change the IP address of the host table entry. You can even run the option straight from the command line using RNMTCPHTE. When ran from the menu just simply type in the new IP address and hit enter. Done!

This quick little tip may not change your life, but when you’re doing as many system migrations as iTech does, you will often find yourself making these changes. The more entries we can simply change instead of removing and adding – the better!

More articles from this month:

Leave a Comment

Your email address will not be published. Required fields are marked *