Operating System - HP-UX
1820100 Members
3543 Online
109608 Solutions
New Discussion юеВ

Re: Hostname: simple or fqdn?

 
J. de Haan
Occasional Advisor

Hostname: simple or fqdn?

Hi all,

not about to start a flame war, this is a serious question for me: it seems possible to
make the hostname of a system simple (like
'mike') and declare the domain /etc/resolv.conf with 'domain mydomain.com', or to make it a FQDN (like 'mike.mydomain.com') What are the pro's and cons of each?

Background: the systems I'm administrating
do a lot of name resolving outside their own domain, (openview monitoring a lot of systems ;-) ) and we are considering implementing a domain tree based on location ('interface.router.location.line.mydomain.com')
and type (alias 'router.type.brand.mydomain.com') to give the monitoring people more usefull information.

Sincerely,

Jan.
8 REPLIES 8
Peter Kloetgen
Esteemed Contributor

Re: Hostname: simple or fqdn?

Hi Jan,

in my opinion FQDNs are better if you use products like Network Node Manager or Omniback or something like that. They are very picky with name resolution and the recommanded way is to use FQDNs. To make it simple for your users you could use /etc/hosts file to write simple names as aliases behind FQDNs. Take care that name resolution uses DNS first and define FQDNs there only. ( nsswitch.conf file ).

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
Dietmar Konermann
Honored Contributor

Re: Hostname: simple or fqdn?

Hi, Jan!

Reading through your question I assume that you want to set a FQDN as hostname (so that the FQDN is returned by hostname(1) and gethostname(2))?

This would be possible, but I would strongly discourage from that. Several application have massive problems with such a setup... one of them is MC/ServiceGuard.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
J. de Haan
Occasional Advisor

Re: Hostname: simple or fqdn?

Hi Dietmar,

now that's what I call usefull information. You were right in your assumption about how I want to do it. But unfortunately you were also right about your second: we are using MC/Service Guard. :-( Any chance in an improvement in the near future? As I recall one of the competitors has a 'hostname' application that has a '-s' option that strips the domain part of the FQDN and returns just the simple hostname part.

Thanks for your reply.

Sincerely,

Jan.


Dietmar Konermann
Honored Contributor

Re: Hostname: simple or fqdn?

Hi, Jan!

Ich just digged around... there are Change Requests for ServiceGuard addressing this issue, but there is no resolution yet.

The problem is that, if the hostname is full qualified, you always NEED to use it full qualified with all commands, especially with cmquerycl (see also the man page). Otherwise unexpected behaviour may be the result, e.g. a cluster start may fail with a configuration that was successfully created/checked with cmapplyconf.

So, ServiceGuard generally works, but does not check for wrong command usage.

Note, that there may be other apps making trouble.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
ASO CENTRAL
Advisor

Re: Hostname: simple or fqdn?

Although hostname *may* be an FQDN, that does not make it a good choce. As mentioned, many applications will have to be changed or may break completely. The hostname is used locally and does not relate to how external system see this machine. If you are not using DNS, you can list the FQDN first in /etc/hosts, followed by the shortname as an alias. Otherwise, DNS rules handle all the domain name appending.
Ray Carlson
Frequent Advisor

Re: Hostname: simple or fqdn?

Also, be aware of problems using SAM to set up additional NIC cards. It doesn't like using a fqdn, and keeps changing it to a simple name in /etc/hosts. Also, if you are using a simple name for your machine, it won't let you add a fqdn as an alias!
We have used fqdn for years with just a few problems, (No ServiceGuard & and changed files manually without SAM), but lately more problems have started showing up. The last one was that I couldn't get my Gigabit Ethernet interface to work until I went back to using a simple name.
rick jones
Honored Contributor

Re: Hostname: simple or fqdn?

another issue centers around the continuing limits to hp's uname - it is still limited to 8 characters. so, if you go the fqdn route for the hostname, it may have a problem being used in uname and uname may return "unknown" - if none of your stuff uses the uname stuff no problem. otherwise, you may have to set NODENAME to the non-fqdn for uname.
there is no rest for the wicked yet the virtuous have no pillows
Jeff Schussele
Honored Contributor

Re: Hostname: simple or fqdn?

Keep it simple.

You're likely to break some SW using FQDN, but the opposite does not apply - you'll break nothing using simple.

My 2 cents,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!