Operating System - HP-UX
1752778 Members
5747 Online
108789 Solutions
New Discussion юеВ

Re: hostname restrictions

 
SOLVED
Go to solution
David McMullen_1
Occasional Advisor

hostname restrictions

Is there a restriction that hostnames must start with an alpha character? I was told that a hostname could not start with a number (0-9). I am I being told a tall tale?
it's down the hall and to the left...
10 REPLIES 10
Trevor Dyson
Trusted Contributor
Solution

Re: hostname restrictions

This is correct - hostnames must start with a letter not a number and be a maximum of 8 characters. A combination of numbers and letters can be used for the rest. Underscores are accepted but should not be used as some DNS servers may have a problem with that.

Cheers, Trevor
I've got a little black book with me poems in
Dan Hetzel
Honored Contributor

Re: hostname restrictions

Hi David,

You're right ! Names must start with a letter.
The name length shouldn't exceed 8 characters to remain compatible with some old stuff, even is the maximum is defined as 64 in file sys/param.h (MAXHOSTNAMELEN).

As Trevor told you, some DNS don't like the underscore character, so you'd better avoid it.


Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Paula J Frazer-Campbell
Honored Contributor

Re: hostname restrictions

Hi
If you wish to use a number then spell it, i.e.

one-sys
two-sys

Paula
If you can spell SysAdmin then you is one - anon
Dan Hetzel
Honored Contributor

Re: hostname restrictions

Hi Paula,

One of my clients in France named the systems the following way:
GHT1HP
GHT2HP
GHT3HP....
Which, spelled in french sounds like:
"J'ai achete un HP", 'J'ai achete deux HP"...
meaning
"I bought one HP", "I bought two HP"....

Stupid, isn't it?

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Paula J Frazer-Campbell
Honored Contributor

Re: hostname restrictions

Hi Dan
Talking of silly server names our sister company Cosmos has two NT servers called Hotpoint and Zanussi because the boxes look like washing machines.

;-)

Paula
If you can spell SysAdmin then you is one - anon
nnf97
Regular Advisor

Re: hostname restrictions

To each his/her own :)
We have sys15, sys30.
And then we have, Fred, Wilma, Barney and Louise.
I visited a client yesterday and the oldest server, ready for the mortuary is appropriately named Morticia. :)

Have Fun,
Nabeel
Live Free or Die (New Hampshire)
Rita C Workman
Honored Contributor

Re: hostname restrictions

Yes the standard is maximum 8,
must start with a letter and is recommended that you include a number (although not required).

Just so you have something additional:
It is suggested (note suggested..) you not include underscores BUT you should not use metacharacters (like @ / " : etc) as part of the hostname.

/rcw
David McMullen_1
Occasional Advisor

Re: hostname restrictions

Thanks for all the reponses. And the laughs. Now can anyone tell me why this is?

TIA

davidmac
it's down the hall and to the left...
Trevor Dyson
Trusted Contributor

Re: hostname restrictions

Generally for backward compatibility with older network client, server and utility software. The 8 char/no start with number/alphanumeric only rule is the lowest common denominator that will work with all network software that uses the hostname in some way.

You could configures your hostname as "123@^%%%55andahalf" however, maybe not today, maybe not tommorow but some day and soon, something will barf.
I've got a little black book with me poems in