Operating System - HP-UX
1833729 Members
2447 Online
110063 Solutions
New Discussion

MC/SG 11.16, hostname and dns-names problem

 
SOLVED
Go to solution
Co van Berkel
Regular Advisor

MC/SG 11.16, hostname and dns-names problem

Hi,

We are setting up a MC/SG cluster.
(MC/SG v11.16, HP-UX 11.11 (11i v1) and two rp4440-8 servers.)

1. What is the maximun length of a hostname?
2. Can the hostname differ from the dns-name?
3. How to configure this?

Scenario what worked with MC/SG v11.12:
- hostname: nlunx1n3 (8 pos)
- DNS-name: nlhpunx1n3.xxx.xxx.xxx (10 pos)
- NODE_NAME: nlunx1n3 (cmclconf.ascii)
- NODE_NAME: nlunx1n3 (package)
- /etc/hosts: n.n.n.n nlhpunx1n3.xxx.xxx.xxx nlunx1n3

Rgrds CvB.
9 REPLIES 9
Sanjay_6
Honored Contributor

Re: MC/SG 11.16, hostname and dns-names problem

Hi,

1.) Maximum length for hostname is 8 characters
2.) yes (you can set the nsswitch conf to look at files first and then DNS and the hostname in /etc/hosts should be the correct hostname you are putting in cluster config. the same name should exist in /etc/hosts on all the nodes in the cluster and they should use hosts first to resolve the host name).
3.) I hope the 2nd explanation answers that. However it is not a good idea to set it that way, unless you don't want the other people to use the hostname from outside.

Hope this helps.

Regds
Co van Berkel
Regular Advisor

Re: MC/SG 11.16, hostname and dns-names problem

Hi,
Thanks for the quick reaction.

I have still some (dum) quistions.

1. The hostname in /etc/rc.config.d/netconf can be at max 8 positions?
2. The same name must we use for DNS, MC/Sg configuration files and /etc/hosts file?

This was not needed with MC/SG 11.12!
Then we had an hostname in netconf of 8 pos. and in the MC/SG config files this name.
In DNS and /etc/hosts the primary name was 10 pos. and some aliases including the 8 pos. hostname in netconf file!

Rgrds CvB.
steven Burgess_2
Honored Contributor

Re: MC/SG 11.16, hostname and dns-names problem

Hi

The maximum length of a hostname is 64chars.

You seem to be confusing the issue with your hostname configuration. Whilst the ip address of nlunx1n3 is an alias of nlhpunx1n3.xxx.xxx.xxx in your hosts file, a DNS lookup of your alias should return the hostname, ip and fqdn name for the host. Which looking at the above, you wish it to be nlhpunx1n3.xxx.xxx.xxx

What does

nslookup nlunx1n3 ip.address.of.dns

return ?

HTH

Steve



take your time and think things through
Sanjay_6
Honored Contributor

Re: MC/SG 11.16, hostname and dns-names problem

Hi,

I've never tried to configure a SG cluster with hostnames more than 8 characters. What is the result of cmviewcl -v on the 11.12 cluster. Is it returning node names more than 8 characters.

Hope this helps.

Regds
Co van Berkel
Regular Advisor

Re: MC/SG 11.16, hostname and dns-names problem

Hi,

# nslookup nlunx1n3
Using /etc/hosts on: nlhpunx1n3

looking up FILES
Name: nlhpunx1n3.intern.axa.nl
Address: 10.164.100.178
Aliases: nlunx1n3, 1n3, nlhpunx1n3

Rgrds CvB.
Massimo Bianchi
Honored Contributor

Re: MC/SG 11.16, hostname and dns-names problem

Hi,
having an hostname longer than 8 char can lead to problems in some cases.

Why do you use different names ?

Look at this in the "man hostname":

The system does not rely on a single system name in a specific
location, partly because different services use dissimilar name
formats as explained below. The hostname and uname commands assign
system names as follows:

+--------------+--------------+---------------+-----------------------+
|Node Name |Command |name Format |Used By |
+--------------+--------------+---------------+-----------------------+
|Internet name |hostname name |sys[.x.y.z...] |ARPA and NFS Services |
|UUCP name |uname -S name |sys |uucp, related programs |
+--------------+--------------+---------------+-------- --------------+

where sys represents the assigned system name. It is strongly
recommended that sys be identical for all commands and locations and
that the optional .x.y.z... follow the specified notation for the
particular ARPA/NFS environment.


Co van Berkel
Regular Advisor

Re: MC/SG 11.16, hostname and dns-names problem

Hi AnjAy,

Hereby the "cmviewcl" on a 11.12 MC/SG:
CLUSTER STATUS
axa-test-cl up

NODE STATUS STATE
nlunx1n1 up running

PACKAGE STATUS STATE AUTO_RUN NODE
orapkg up running enabled nlunx1n1

NODE STATUS STATE
nlunx1n2 up running

PACKAGE STATUS STATE AUTO_RUN NODE
mqspkg up running enabled nlunx1n2

Files:
node-1:
- "/etc/rc.config.d/netconf":
HOSTNAME=nlunx1n1
node-2:
- "/etc/rc.config.d/netconf":
HOSTNAME=nlunx1n2

- "/etc/hosts":
10.164.100.171 nlhpunx1n1.intern.axa.nl 1n1 nlhpunx1n1 nlunx1n1
10.164.100.173 nlhpunx1n2.intern.axa.nl 1n2 nlhpunx1n2 nlunx1n2

- "DNS-defs" (wintel):
nlhpunx1n1.intern.axa.nl and alias nlunx1n1.intern.axa.nl
nlhpunx1n2.intern.axa.nl and alias nlunx1n2.intern.axa.nl

This works all fine!

Rgrds CvB.
Bill Hassell
Honored Contributor
Solution

Re: MC/SG 11.16, hostname and dns-names problem

There are two names used in HP-UX, the classic/legacy UUCP name which is found with the uname -n. For networking, the hostname can be much longer. The problem is that there are no comments in the /etc/rc.config.d/netconf file about the 'secret' parameter NODENAME. However, if you look at /sbin/init.d/hostname startup script, you'll see that if NODENAME was not defined in the config files, it will default to the value of HOSTNAME.

So, you can have both sizes in the same host. It is strongly recommended to use the same 8 character name for both HOSTNAME and NODENAME, and then use /etc/hosts to alias a longer name HOSTNAME. It's OK to set NODENAME=chr8name and HOSTNAME=mynetworknamethatisreallylong but for sysadmin sanity, have both uname and nslookup provide the 8char name.


Bill Hassell, sysadmin
Co van Berkel
Regular Advisor

Re: MC/SG 11.16, hostname and dns-names problem

Hi Bill,
Thanks for this clear answer.

Working solution:
1. I asked the DNS adminitrators to change the DNS-names. The primary is now 8char. and the alias 10chars.
2. I changed the /etc/hosts to do the same (see 1.)

"for sysadmin sanity, have both uname and nslookup provide the 8char name"

Rgrds CvB.