Operating System - HP-UX
1751939 Members
4645 Online
108783 Solutions
New Discussion юеВ

using numerals as a hostname - not resolving

 
SOLVED
Go to solution
Annelise Wilken
Regular Advisor

using numerals as a hostname - not resolving

Hello, we have recently migrated a customer from a DG-UX box onto an rx7620 running HP-UX 11:23 only, and the customer is having hostname/IP address resolution issues. Many of the customer's hosts are known as numbers (eg: "0123") , so the hostnames are all numerical, as well as numerical IP addresses. After checking through various HP documentation regarding hostnames it states: тАЬHost names can contain ANY printable character other than a white space, newline, or comment character.тАЭ http://docs.hp.com/en/B2355-60103/hosts.4.html, however, since migrating onto HP-UX name resolution is failing тАУ where as it worked ok on DG-UX тАУ my client has changed the hostnames to start with characters followed by numbers and name resolution works! As does adding 1 or more characters as a suffix (eg: "0123x").

So, my client would like an official HP response stating that either: a) purely numeric hostnames canтАЩt be used or b) that they recognise this as a bug and are creating a patch/fix to solve this issue.

Where can I get an offical HP response to this issue? Also, can anyone explain why this is happening?

Many thanks!!

5 REPLIES 5
melvyn burnard
Honored Contributor

Re: using numerals as a hostname - not resolving

For an official HP response, you need to contact your local HP office, or log a call with your HP Response Centre.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Jeff_Traigle
Honored Contributor

Re: using numerals as a hostname - not resolving

Originally, RFC-952 required host names to begin with a letter. The last character was required to be either a number or a letter. All other characters could be letters, numbers, or hyphens.

RFC-1123 relaxed that requirement so the first character could also be a number.

http://www.rfc-editor.org/rfc/rfc952.txt
http://www.rfc-editor.org/rfc/rfc1123.txt

That's the only references a quick Yahoo! search found for valid host names. Based on that, it seems like HP isn't quite supporting the spec, requiring a letter somewhere in the host name.
--
Jeff Traigle
Geoff Wild
Honored Contributor

Re: using numerals as a hostname - not resolving

I'm taking a stab in the dark here - but I believe what is happening is the resolver on HP-UX is based on the bsd resolver...

Which includes RFC1034, RFC1035, RFC1535.

You already have the solution - add a character to the start of the name:

a1234

I don't know if there is a resoler work around...

Place a call with the HP Support Centre...request an enhacement to the resolver routines to allow all numerical hostnames...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bill Hassell
Honored Contributor
Solution

Re: using numerals as a hostname - not resolving

Converting a hostname into an IP address is a configurable feature. If you do not use a DNS or NIS server, then the pure number name would only be in /etc/hosts and should be resolvable (but only if there is no /etc/resolv.conf file). If you have a DNS file (/etc/resolv.conf) then hostname resolution is not under control of HP-UX, it is provided by some other computer. So the issue is with the DNS server(s) specified in /etc/resolv.conf. Use nslookup to specifically query each of your DNS servers, something like this:

nslookup "0123" 12.34.56.78

NOTE: the number 0123 is special! A leading zero is interpreted by the shell as an octal flag so 0123 may be translated to an octal value before being sent to nslookup. By enclosing numbers in quotes, the actual string will be sent to the specified DNS server. If you find that numbers do not get resolved at the DNS server (perhaps a Windows based server that is not patched), you can override the order of finding a name using /etc/nsswitch.conf. Change the hosts line from dns then files to files then dns. See the man page for switch.


Bill Hassell, sysadmin
Annelise Wilken
Regular Advisor

Re: using numerals as a hostname - not resolving

Customer did not want to pursue this matter further - they have resolved it by not using numerals.