IBM Support

FAQ4: Hostnames short or long?

How To


Summary

Frequently Asked Questions from 2013 that still get asked.

Objective

Nigels Banner

Steps

 When I log on to my home machine being AIX, of course, and type hostname I get:

nag@blue:/home/nag$ hostname
blue.aixncc.uk.ibm.com
nag@blue:/home/nag$ hostname -s
blue
nag@blue:/home/nag$ domainname
aixncc.uk.ibm.com
nag@blue:/home/nag$

I get this because when I set the hostname in smitty it looks like this:


* HOSTNAME                                           [blue.aixncc.uk.ibm.com]
* Internet ADDRESS (dotted decimal)                  [9.137.62.2]
  Network MASK (dotted decimal)                      [255.255.255.0]
* Network INTERFACE                                   en0
  NAMESERVER
           Internet ADDRESS (dotted decimal)         [127.0.0.1]
           DOMAIN Name                               [aixncc.uk.ibm.com]
  Default Gateway
       Address (dotted decimal or symbolic name)     [9.137.62.1]

If you hit F1 in the hostname field of smitty it says:

If the host uses a domain name server for name resolution, the host
name must contain the full domain name.
This is NOT optional and is NOT a style option. 
It is mandatory to use the long hostname - sometimes called a FQDN (Fully Qualified Domain Name).

Don't use Underscore

The other common mistake is using the underscore character "_" in the hostnames like "blue_is_cool".  

  • The underscore is NOT allowed

I often use this style, for example, in Windows file names as I hate the use of spaces in filenames but you must not carry that in to hostnames (like me and my team did at one point and ran into all sorts of bizarre problems on the DNS (Domain Name Server).

If you must break up your hostnames in to parts then the hyphen like "blue-is-cool" is allowed.

Additional Information


Other places to find content from Nigel Griffiths IBM (retired)

Document Location

Worldwide

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"","label":""}],"Platform":[{"code":"PF002","label":"AIX"}],"Version":"All Versions"}]

Document Information

Modified date:
14 June 2023

UID

ibm11117611