The SA'r

October 16, 2009

A System by any other name would process as much data…

Filed under: system administration — Tags: , — hex45 @ 8:00 am

mad dog 2020

Hostname -

In the early days of computing most organizations only had a few computers.  At my first job, we only had a couple of large VAX systems with several terminals hanging off of them.  The system names were selected by an alcoholic manager with a love of wines.  I always found it very difficult to login to chianti and sangiovese; due to spelling of course – I am a computer guy after all and an avid beer drinker, spelling is not my thing.

My manager was also not amused when I named the new PC system “maddog”.  As an added bonus I gave it a last octet of 20, but I digress.

On another job I worked with systems named after Winnie the Pooh characters. Cute, huh?   The system names were pooh, eeyore (and yes it is spelled with 2 e’s), and Tigger.  There were a couple of significant issues with these names.  First, it always took me two tries to login to eeyore (2 e’s?!?!)  Second,  the required maintenance reports did not sound professional; “File shares provided by pooh are being hard mounted by Tigger, resulting in Tigger locking up during maintenance activities on pooh.”  See what I mean?  And the last issue, Tigger, with a capital T.  Problem, name resolution.  Some name resolution services (DNS, NIS, LDAP, etc.) are case-sensitize and some are not.  Applications that attempt to resolve names for security checks may not work.  In the case of Tigger, he lived in a NIS+ domain where “t” is not equal to “T”.  This led to a lot of application name resolution problems.

What is in a hostname -

So, how should we name our systems?

System name, or hostname, requirements are well defined and have been for quite some time.  In October of 1985, when the Internet was reaching it’s mid teens, RFC952 was published.  An RFC is a “Request For Comment” and is the way standards are defined for the Internet.   Anyway, RFC952 gives us a few rules for hostnames that we should (must) use.

Here are the “ASSUMPTIONS” or guidelines from RFC952 for hostnames:

  • A string up to 24 character
  • Using “a” through “z”, “0″ through “9″, and the “-” (minus) character
  • The “.” (period) is used as a deliminator between names (this is for DNS and other naming services)
  • No blank or space characters are permitted
  • There is no distinction made between upper and lower case
  • The first character must be a alpha character
  • The last character cannot be a “-” (minus)

So, there are the guidelines in all their glory.  Now what?  Well, I would like to point out a couple of items that we should consider before we start naming our systems:

  • There are other RFC’s that modify RFC952, but RFC952 is always right. Well, almost always right.  Modifying RFC’s typically add to it, like RFC1123 allows hostnames to start with a digit.  But I say stick with the original  guidelines and you will not have to worry about compatibility issues.  All protocols, operating systems, and software should support the “original” guidelines.  For an example of what you avoid by following RFC952, read Naming conventions in Active Directory for computers, domains, sites, and OUs.  Gotta love Microsoft.
  • Even though RFC allows for upper and lower case, do not use upper case.  The problem with upper case stuff is that some software and protocols will ignore case (“a” is the same as “A”), some will ignore it but preserve it (“a” is not the same as “A”, but who cares), and some will just break (“a” and “A” are not the same and do not match).  So, stay low(er) and avoid these problems.

Get your host named -

Hostnames are assigned to systems.  Computers, routers, switches, load balancers, and all your other network connected stuff has a hostname.  So, use it to your advantage!  Use your hostnames to convey information about your systems.  A well designed hostnaming convention can be used to provide you a lot of information about the system.

Here are some possible bits of data that you can put in a hostname:

  • Location – State, City, building, floor, room, rack, or other location data
  • Type of hardware – Router, computer, switch, load balancer, or other network attached hardware
  • Operating Systems – XP, Windows 2000, Red Hat, Ubuntu, OSX, or even BSD (yes, I know there are more; don’t want the BeOS folks to complain…)
  • Department or owner – Finance, Accounting, HR, Engineering and so on.
  • Role – Application server, database, services that are running on the system like DNS or LDAP, or just a workstation

Some other basic rules to consider:

  • Make it adaptable – the one constant in the computer field is change, so make it part of the design.
  • Make it simple – complexity will offset some of the advantages.  If you need a decipher table to figure it out, it is too complex.
  • make it consistent – clearly define the rules and make sure they are followed.
  • Deliminators or fixed length, choose – Separation of the different parts of the name need to be separated by a “-” minus, or they all need to be a fixed length.  I recommend the minus, or a combination approach.

Putting it all together -

So, we have some rules and we have some data, lets make some names.  There is, of course, no right or wrong in all of this.  Your goal should be to make something that you and your fellow SA’s can work with.  I will walk you through an example, but please feel free not to use it and come up with your own.  No, really, get your own.

The data I want to capture:

  • Role – And seeing as how I am doing computers only, I am going to use wks (workstation) and svr (server)
  • Location – There are two, ffx (Fairfax) and rst (Reston)
  • Department – I will use this for workstations only; fin (Finance) and leg (Legal)
  • Application Role – I will use this for servers only; ad (Active Directory) and fs (file share)

So, a workstation in the Fairfax location belonging to the Finance group would be:
Using the “-” minus format:    wks-ffx-fin01
Using a fixed length format:  wksffxfin01

A workstation in Reston belonging to legal:
Using the “-” minus format:    wks-rst-leg02
Using a fixed length format:  wksrstleg02

A server in the Reston computer room that is the Active Directory server:
Using the “-” minus format:    srv-rst-ad01
Using a fixed length format:  srvrstad01

And so on and so forth…

Lastly (or morely) -

There you have it, hostname 101.  Add, subtract, and make it your own.  I hope that this has provided you with a basic idea of how to do your own scheme.  Good luck and happy host naming.

- Carl

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.