Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

node name lenght limitation issue on HP-UX 11.11

ashokjcb
Regular Visitor

node name lenght limitation issue on HP-UX 11.11

Hi

 

 

 

Mod Message: This post was moved from an inactive Topic. Please refer the link below for the old post:

hostname lenght limitation

1 REPLY
pooderbill
Valued Contributor

Re: node name lenght limitation issue on HP-UX 11.11

There is a patch for 11.23 but you need to read the WARNINGS detailed in the patch description. Exceeding the hostname (8 chars) and nodename (64 chars) maximum length can break a number of applications and subsystems:

https://h20392.www2.hpe.com/portal/swdepot/displayProductInfo.do?productNumber=NodeHostNameXpnd

There is no need to change the hostname and or nodename if you need only need to refer to this system using a long network name. The technique is simple: use your DNS nameserver to create an alias name and add the alias to your /etc/hosts file:

12.34.56.78 myhost myreallylongnetworkname

Note that the name used in DNS by other computers can be different than your local hostname. So you can have two names for your computer, one for networking and the other for uname (see man hostname). To set both of them, edit the file /etc/rc.config.d/netconf and add the undocumented variable NODENAME. NODENAME must be no more than 8 characters, but HOSTNAME can be up to 64 chars. So for your case:

HOSTNAME=myreallylonghostname
NODENAME=mynode

NOTE: If you do not explicitly set NODENAME, it becomes the same as HOSTNAME. But if NODENAME is longer than 8 chars, there will be problems.

You can set hostname and uname without rebooting:

hostname myreallylonghostname
uname -S mynode

but make sure you edit the netconf file so the change is permanent after a reboot. Read the man page for hostname. The uname command must always be 8 chars or less. But uname dates back to the ancient UUCP communication subsystem. Applications and scripts that refer to uname -n as the server's network name need to be rewritten.