1834771 Members
2911 Online
110070 Solutions
New Discussion

Re: hostname vs nodename

 
SOLVED
Go to solution

hostname vs nodename

Hi,
I currently have my hostname and nodename set to the same (8 chars)..

While reading the HP-UX CSA study guide, when talking about installation it says "The hostname can be a simple name, or an internet FQDN" (up to 64 chars)

I presume setting a FQDN simply puts the first component as hostname, then the full string in nodename?

Is that best practice or should I stick to the short name in nodename and hostname and simply specifiy the FQDN in /etc/hosts?
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: hostname vs nodename

Shalom,

Best practice for HP-UX is to use a hostname and nodename that are 8 characters.

Extending is a bad idea.

Use /etc/hosts or external DNS to support longer names via alias.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: hostname vs nodename

There is a lot of good explanation in this thread, particularly from Clay, Bill and JRF:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1027417

This was found with a simple google search for "hostname nodename bill hassell +site:itrc.hp.com", which turned up that thread and many others.


Pete

Pete

Re: hostname vs nodename

If only specifying the short (8 char) hostname in hostname and nodename, but keeping the full DNS name in /etc/hosts, and ensuring domain_name etc are set in /etc/resolv.conf, will apps doing a gethostbyname() and similar get the full name or the short name?

I ask as I am soon to look at AD integration, and understand that for this, we create keytabs using the fully qualified hostname. I assume that based on this logic, they need to be returned the fully qualified name when making the syscalls on the HP-UX side?
James R. Ferguson
Acclaimed Contributor

Re: hostname vs nodename

Hi Giles:

> If only specifying the short (8 char) hostname in hostname and nodename, but keeping the full DNS name in /etc/hosts, and ensuring domain_name etc are set in /etc/resolv.conf, will apps doing a gethostbyname() and similar get the full name or the short name?

If you mean when you query the local host (yourself) and your '/etc/nsswithch.conf' file specifies 'hosts' before 'DNS', then if your '/etc/hosts' entry has the FQDN as an "alias", then the application will get the short name --- the first entry as below:

10.x.y.z myserver myserver.xyz.com

If you reverse the order, the FQDN will be returned.

The FQDN will be returned when queries are made and answered by DNS.

Regards!

...JRF...

Re: hostname vs nodename

Thanks for the info