Operating System - HP-UX
1751695 Members
5177 Online
108781 Solutions
New Discussion юеВ

Re: Hostname Maximum Character length

 
SOLVED
Go to solution
Jagadesh
Frequent Advisor

Hostname Maximum Character length

What is the default hostname character lenght in HP-UX 11 & 11i? How can i increase the same. What is the maximum value will it support?

Thanks
S.Jagadesh
9 REPLIES 9
Robert-Jan Goossens
Honored Contributor

Re: Hostname Maximum Character length

Hi Jagadesh,

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000068695446

"uname -n" returns "unknown" DocId: UCMDSKBRC00012527 Updated: 5/28/03 11:22:00 AM

Regards,
Robert-Jan
aparna challagulla
Valued Contributor

Re: Hostname Maximum Character length

hi
The default is 8.
The maximum value is 64.
It is generally not advised to increase it from the default value due to some compatibility issues.
HTH
aparna
If you don't have time to do it right you must have time to do it over
G. Vrijhoeven
Honored Contributor

Re: Hostname Maximum Character length

HI,

The name_of_host argument is restricted to
MAXHOSTNAMELEN characters as defined in .

Gideon
Pete Randall
Outstanding Contributor

Re: Hostname Maximum Character length

Personally, I can't imagine a reason good enough to convince me to exceed 8 characters. See the following threads:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x2db614a24fd1d4118fef0090279cd0f9,00.html
and
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xc2b7d5fab40ed6118ff40090279cd0f9,00.html


Pete



Pete
Jagadesh
Frequent Advisor

Re: Hostname Maximum Character length

Thanks for the information.

What is the maximum lenght of Hostname. As the reply i come to know that is 64, but kindly clarify me whether is it 64 or 63.

Thanks
Jagadesh
Pete Randall
Outstanding Contributor

Re: Hostname Maximum Character length

Jagadesh,

Every reference I've seen says it's 64 characters but - I will repeat - I would NOT exceed 8 characters. You're asking for far more trouble than it's worth.


Pete



Pete
Jagadesh
Frequent Advisor

Re: Hostname Maximum Character length

Hi Preet,

This hostname length qurey is for testing purpose only. We are not going to do this in the production environment. We need to exactly know what is the maximum character support for Hostname.

Thanks
Jagadesh
Stuart Abramson_2
Honored Contributor
Solution

Re: Hostname Maximum Character length

I just went through this, and the question has been answered 100 times in the archives.

But, here's the answer:

You can go to a max of 64 characters, but DON'T EXCEED 8 CHARACTERS!

Here's why:

o...There is some important distinction between "hostname" and "nodename", which I have never understood.

o...Many HP-UX utilities, such as swinstall, for example, don't understand hostnames longer than 8 characters. So, if you:

.. swinstall -s longhostname:depot_name

he just plain won't be able to find it. And the error message won't much help you.

o...There are many other examples of this, which I can't remember. JUST DON'T EXCEED 8 CHARACTERS.
rick jones
Honored Contributor

Re: Hostname Maximum Character length

the "hostname" command returns the name of the system in the internet namespace

the "nodename" command returned the name of the system in the "ns transport/probe" namespace (stuff from the MPE systems)

the "uname" command returns the name of the system in the "uucp" namespace.

uname has an 8 character limit.
hostname has a 64 character limit
i forget about nodename, and it may have been usurped for the uname stuff - it may be "nodename" in the config files to set the uname name...

anyhow, i have set the "hostname" of my personal workstation (hp-ux 11) to "tardy.cup.hp.com" and the uname name to "tardy"

the wrinkles arise when you want the host part of the FQDN to be > 8 characters - some utilities/programs/scripts that really mean to be operating in the "internet" namespace are buggy and are using the uname command instead of the hostname command. if you do not have an "alias" in the uname space that maps to what you have in the internet space, this can be a problem.

it is not possible to increase the limit. it is hardcoded within the kernel/an include file.
there is no rest for the wicked yet the virtuous have no pillows