Node and Host Name Sizes on HP-UX: Using the Expanded Capabilities of HP-UX

3
Introduction
System node and host names on HP-UX have default length limits of 8 and 64 bytes, respectively.
The system administrator can configure the system to expand both these limits to 255 bytes.
Some customers who have thousands of systems use a naming convention to clearly identify the
physical location and purpose of each machine. For instance, the convention might encode: the
geographical location, the computer room name, the purpose (such as application), and an index.
Allocating 2 bytes for each field fills the default HP-UX limit of 8 bytes. But two bytes might be too
restrictive for some customers (such as when there are more than 100 systems for a particular purpose
in one computer room, the index must be 3 bytes).
Programs that use the system functions to obtain (or initialize) the host and node names, and that are
built prior to availability of the expanded interfaces, very likely require that names not exceed the
non-expanded limits for proper operation. Therefore, the HP-UX default configuration ensures that the
default runtime environment is compatible for existing application binaries.
This paper describes how to activate the expanded-name capability, the risks to applications,
limitations regarding HP product support of long names, how to determine whether software code has
dependencies on the default name size limits, and how to enhance programs to accommodate
expanded name sizes.
The section Activating and Setting Expanded Node and Host Namesdescribes, for system
administrators, how to enable and use the expanded name capability. Appendix A Rules in
Constructing Host and Node Namescontains some related information.
The section HP Product Limitationsdescribes the limitations some HP products have with
respect to the size of node and host names.
The section Programmer Notesdescribes briefly how software developers can enhance
their applications to accommodate expanded node and host name sizes. Appendix C
Source Code Issues with Expanded Node and Host Namesand Appendix D FLV Concepts
and Usageprovide more information for programmers.
A glossary follows the appendixes.
Caution: Assignment of node names in excess of 8 bytes or host names in excess of 64 bytes can
result in incorrect operation or failure of some applications. It is important to read and understand all
the information in this document before you try to use expanded name sizes.
Publication History
Revision 1.0 May 2005, HP-UX 11i v2 (B.11.23.01) This version was included in the
NodeHostNameXpnd optional product bundle.
Revision 2.0 January 2007, HP-UX 11i v3 (B.11.31.01). The primary differences for 11i v3 are: 1)
node/host name expansion is part of core OS product, no optional product is required; 2) the non-
expanded uname(2) system function will return EOVERFLOW if the node name cannot fit in the non-
expanded field (is more than 9 bytes including null terminator); 3) added list of minimum versions of
optional products (was in product note for NodeHostNameXpnd bundle); 4) application core file
format is no longer selectable.