1833764 Members
2996 Online
110063 Solutions
New Discussion

Hostname length

 
mike mcclernon
Occasional Contributor

Hostname length

We have cold installed a server with 11.00 and have given it a 10 digit host name. We can execute the hostname command and it will return the name. We are having trouble running SAM in certain areas. It will prompt us for a hostname, and then will not allow us to put in the new name.
If I use the uname -S command, it states the host name cannot be longer than 9 characters.

We have changed the param.h file to MAXHOSTNAMELEN = 64.

If this is the place to specify the hostname length, how is the file executed or when in the boot cycle is it read. We were unable to find a kernel parameter to change host length.


6 REPLIES 6
Rita C Workman
Honored Contributor

Re: Hostname length

This has been discussed a few times.
Here's the rule:
8 character limit for hostnames

Yes it says 64...but thats only when your going to set up for aliasing it...So you may want to review this at:

http://my1.itrc.hp.com/cm/QuestionAnswer/1,1150,0xeecad06ed8c8d4118fef0090279cd0f9!1,00.html

You can also do a Search on Hostname length or restrictions.

/rcw
Paul Frederiksen
Frequent Advisor

Re: Hostname length

If you set it for more than 8, it probably just ignores any otther characters after the 8th.
Richard Darling
Trusted Contributor

Re: Hostname length

rename it to 8 or less using:

set_parms hostname

anymore and you are asking for trouble...from one who knows...
Dan Hetzel
Honored Contributor

Re: Hostname length

Hi Mike,

As Rita said, the actual limit is 8 characters, starting with an alphabetic char, even if the file sys/param.h states the limit is 64.

This is to guarantee compatibility with any name server (different O/S) and with old code where the 8 char limit was enforced.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Vincente Fernandes
Valued Contributor

Re: Hostname length

The best thing is to keep hostname within the 8 characters limit even though you can have hostname upto 64 char just to avoid all sorts of problems.
Jagadesh
Frequent Advisor

Re: Hostname 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