Zen and the Art of Naming Conventions-hostnames

by Ed Fisher on 2010-01-25

in Architecture

 architecture

 

I spent all weekend with a 6 second long sound bite stuck in my head. It’s from a song I used to love, that I’d played thousands of times, and probably haven’t thought of this century. I knew that the name of the group had something to do with Bangkok, or Tokyo, or some vaguely Asian location, and while I could hear the tune inside my head (at least when the voices gave it a rest) I could NOT come up with the name, or even enough of a lyric to let Google work it’s magic. I needed the name. And that got me thinking. I’ve worked on hundreds of networks, and I’ve seen just about every server naming scheme you could imagine; the good, the bad, and the ugly. Most fall into the cracks between good and bad; let’s call them the indifferent. You can almost classify the techno-geek maturity level of an IT organisation by their naming convention. (You like that? It just happened!) New orgs stick with the classics, like X-Men characters, mythological deities, chemicals, planets, etc. Orgs that are trying to ‘grow up’ err on the other extreme, trying to develop a naming convention that invokes the corporate name, or give as much detail as you would expect to find on the server list on SharePoint.

What’s in a name? That which we call a rose by any other name would smell as sweet.
-Romeo and Juliet, Act II Scene II. William Shakespeare…see, a guy works a Shakespeare quote into a post, he must know something good.

But that which we call in a UNC path has to be easy to use and remember, and must be resolvable in our DNS. There are some common mistakes that I have encountered over time, and it was one such recent charlie-foxtrot that prompted me to pen this narrative.

 

Out in the real world, there are two main schools of incorrect thought on the subject of naming systems. I like to call them ‘the Hyphenators’ and ‘the Cryptics.’ In ages past, the forebears of the Hyphenators found out that they could put a hyphen (dash, minus sign, call it whatever you want, it looks like this - ) in computer names, so they did. What followed was years of needlessly breaking names up with countless dashes, and endless "Please check the name and try again" messages from telling users server names, while not saying the "dash" since "everyone should know it’s there" incidents. Actually, I think they eventually devolved into getting kickbacks from the keyboard manufacturing industry, because they put so damn many hyphens in their computer names that you’ll wear out the button on your keyboard!

All of the Cryptics descended from the single forsaken lovechild of a government bureaucrat from the Department of Acronyms,and Rainman. Reproducing asexually, they like to assign a specific, uniform designator to every facet of a machine, and concatenate that together with a location and a number and a department and a distinction between test and production and another between physical and virtual and another for the operating system and another for the version and….you get the point. They used to be called ‘the Run-Ons’ but the Hyphenators got pissed that the name had a hyphen in it. You can imagine what happened next. Well, maybe you can’t. In a fit of Capulet v Montague amour, two of them combined, and the world came to be burdened by hyphenated-cryptics! Many Shuvs and Zuuls knew what it was to be roasted in the depths of the Slor that day, I can tell you!

Before we discuss what makes a good naming convention, let’s discuss the things that govern what we can and cannot do. We’ve got four categories, which are summarised below.

  • NetBIOS Names
    NetBIOS names (as implemented by Microsoft) are still (even Windows 7 and Server 2008 R2) heavily used by Microsoft. We’ll likely never get away from them entirely. They are exactly 15 bytes in length, which provides for no more than 15 ASCII characters, null padded if necessary, plus a 16th hexadecimal service identifier, or primitive, that indicates the type of name (workstation, server, messenger, domain controller, etc.) While they can contain any letter or number, they cannot contain spaces, cannot consist only of numbers, and the only permitted punctuation characters are underscores and hyphens.
  • Host (DNS) Names
    Host names can exist alone, or are mapped into a DNS zone as fully qualified domain names. While an FQDN can contain up to 255 characters (plus a . to reference root), a single label can contain no more than 64 characters. Host names can contain any ASCII letter or number, or hyphens only, with periods separating levels of the hierarchical name and terminating the namespace.
  • RFC1178
    Called "Choosing a name for your computer," this RFC lays out some good guidelines to use when naming hosts. Highlights include favouring shorter names, avoiding words with alternate spellings, and not using digits at the beginning of names.
  • (un)Common sense Names
    Names should be easy to remember. They should convey useful information. They should not require different treatment based on use (encoding characters in HTTP,  escaping characters in LDAP or scripting languages, etc.) They should make sense to the end users and the admins, and err on the side of the end user. Everyone knows where they work…you do not have to include the company’s identity in the server name!

So if we take all that into consideration, we want to shoot for names that are around eight characters long, are easy to remember, and tell users and admins both something useful about the system. We’ll avoid the use of hyphens and underscores completely. So taking all that into account, what do we do?

First, we’ll start the server name with an identifier for the location. Three letters works well here, so you just need to come up with a scheme that identifies all of your locations. The three letters should be easy for end users and IT to remember. Most muggles won’t know airport codes that don’t line up with real city names unless they fly there regularly, so don’t use them. The larger a company is, the more likely you will have cities with similar names, so try to come up with a list of all your locations early on, and vet it with the global team to make sure everyone can live with it. If you are an international team, check to be sure that the city abbreviation doesn’t say something naughty, especially when combined with a server function. I had a naming convention once that would have placed an EX (Exchange) server in BISmarck, ND…therefore Bismarck became BMK.

Next, we will use some standard abbreviations to identify the type of server. Here, understanding is more important than consistency, so some codes may be two letters, while others are three or more. Notice that some apps get full names, while others get abbreviations. The distinction is arbitrary, and you are welcome to modify it to fit your needs. What I have below works for me, and should be a good start for you. You could always leave a comment with more suggestions </wink.>

server typecode
domain controllerDC
file serverFS
print serverPS
VMware ESX hostESX
MS Hyper-V hostHV
web serverWEB
MS SQL serverSQL
Oracle serverORC
generic application serverAPP
accounting serverACCT
human resources serverHR
media serverMEDIA
VPN concentratorVPN
Internet Security and Acceleration serverISA
Threat Management Gateway serverTMG
DNS serverDNS
DHCP serverDHCP
SharePoint serverSP
SolarWinds serverSW
Splunk serverSPLUNK
SNA serverSNA
VoIP serverVOIP
Call Manager serverCM
Unity serverUNITY
Cisco Emergency Responder serverCER
Exchange serverEX
Exchange mailbox serverMB
Exchange Client Access serverCAS
generic mail serverMX
Lotus Notes serverCRAP
etc. 

Finally, add a number. Start with 1, and increment up from there. The number is more to allow for redundancy than to indicate ancestry or lineage. Let go of the need to have certain servers always be referenced by the same name. That is what aliases are for, and in an upcoming post, we’ll discuss the common DNS aliases every company should use.

That’s all there is to it. Following the above, you will have server names between seven and eleven characters that are easy to remember, and to spell out to users. From the name you will be able to determine where the server is, and what it’s for. In a name, that is all you really require. If you want to know the operating system, the patch level, how much RAM, Disk, etc. it has, and whether it is physical or virtual, use bginfo to display this on the console, or consult your server list on SharePoint. Your domain controller in Orlando will be ORLDC1, your file server in Jacksonsville will be JAXFS1, the ESX host in your Miami datacenter will be MIAESX1, and your VoIP server in Chicago will be <cough> freezing </cough>  I mean, CHIVOIP1.

Hopefully this will help someone out, and maybe give them the ammunition to convince some hyphenator to STFU and GBTW, and let the real geeks make the important decisions. Hopefully if you have to show this to your boss to convince them that easy is better…they’ll have a similar sense of humour to me! Hopefully, you care enough for my sanity that you wonder if I ever found the song. I did. It just came to me as I was finishing this post. Some bizarre association, or maybe my muse just wouldn’t give it up until I got another post done. Either way, maybe now I can get some sleep!

updated 20100421-WMG apparently ordered a take down from YouTube, because, you know, they don’t like their artists to get exposure or something. Fortunately I found the video on Daily motion, so I am updating the embedded video here.

Have any better ideas? Abbreviations that you use and care to share? Leave a comment (anonymous is allowed!) and share the love.

You might also enjoy:

  1. Zen and the Art of Naming Conventions-aliases
  2. Zen and the Art of Naming Conventions-service accounts

{ 11 comments… read them below or add one }

Andy 2010-03-26 at 12:58

I would make 1 change to your naming convention… when adding the number to the end, always use two or more digits… IE, instead of using BMKEX1, use BMKEX01 or BMKEX001 (depending on the numbers expected). Failure to do so will result in listing issues related to the naming convention.

Reply

Ed Fisher 2010-03-26 at 13:09

Hi Andy,
You’re spot on, and I agree with you 100%. All I can say is I must have had that particular thought during my failed attempt to quit caffeine. Thanks for the comment
Ed

Reply

Bish 2010-06-01 at 00:33

My company is the embodiment of your plan. USWAFTP104, UKLODC62, etc. It is the hell anyone would instantly recognize after 12 seconds of consideration.

Which machine was that? Do you mean USMIESX4H2 or was that USMIESX2H4 that you just shut down? Oh no! The amount of times that someone remotes (ssh, rdp, etc) into a box and – even if they double-check the number 6 times – shuts down, patches or reboots the wrong host is astounding. In addition, is host 199 – which we instantly fell to shorthanding it when we don’t just use the IP – a Term Server or is it a Web Server? Can’t tell the right IP until you know, of course, and we don’t need CNAMEs since it’s already the perfect name. Yay!

As EVERY single reference will tell you, humans don’t visualize arbitrary numbers well and keep them in their head reliably. We can’t discern 304 from 403 without some effort. Bunny from Skunk, though? No problem. GreenTruck from ApplePie? Too easy. Happy from Dopey? I could do this all day.

host4.esxcl2.mi.company.net is a CNAME to RedRabbit.mi.company.com , one of its names, and yes, it’s Red Rabbit you need to decom, Phil. That machine was named RedRabbit when it hit the floor and will be so until it dies. Hit the button.

All kidding aside, that naming scheme sounds great; great, like Jimmy Needs a Raise kind of great. But Jimmy forgets that the same species who count petabytes now counted on their hands only 6,000 years ago with the same sized brain, and dodged bears and wolves instead of meetings, and WILL make far more mistakes without a memorable system. Promise me you’ll ditch this when you realize it for the mistake it unfortunately is — no matter how excellent it sounds on the whiteboard!

Reply

Ed Fisher 2010-06-13 at 17:27

Bish, first, thanks for a GREAT comment. I appreciate that you took the time to read my post, AND that you have some good feedback for it. Second,

the same species who count petabytes now counted on their hands only 6,000 years ago with the same sized brain, and dodged bears and wolves instead of meetings

..funniest thing I have read in ages! And quite brilliant too. I concede your point that names (like colours, animals, etc.) would be easier for most folks to remember, but have to stand by my experience that some kind of formality in the naming is required to get management to buy off. MANY years ago, I worked for a company that used the X-Men for server names. That worked great until senior management decided it ‘lacked professionalism,’ and killed it by proclamation. Having used my scheme in a 10K+ host environment, with dozens of IT admins who got used to it very quickly, I maintain that it works. However, I can also admit that the next time I have the opportunity, I will have to suggest a combination animal/colour scheme just to see how it goes over. It is memorable, and easy to learn. Windows boxes as mammals, *nix boxes as birds, user workstations as some kind of invertebrate or maybe a vegetable, with colours TBD later.
Cheers,
Ed

Reply

Ed Fisher 2010-09-23 at 10:14

Folks, here’s another tip. Say the name out loud. If you find the spelling can go either way (like bak vs back) or if you are tempted to ‘shorten’ the name by leaving off the location code or some other piece…go back to the drawing board. If you tell the new guy on the team to go to ‘management01′ then he is probably going to go look for a server named ‘management01.’ If you meant ‘atlmgmt01′ then you either need to SAY THAT, or put in an alias, or give him a piece of paper that spells it out. I’m starting to like Bish’s suggestion up above more and more…redbull is about as clear as it gets.

Reply

George 2011-06-18 at 11:23

How about distinguishing between platforms and environment (Prod, Dev, Test). Example: Production Windows Web Server in Ontario = ONWWEBP001
ON=Ontario
W=Windows
WEB=Web
P=Production

Any opinions on this ?

Reply

Ed Fisher 2011-06-18 at 11:45

Hi George,
Seems just fine to me. 10 characters, meaningful, and the pattern makes sense.
Ed

Reply

Anonymous 2011-06-21 at 14:00

I wouldn’t put the SDLC Level right after the Server Type. Could be confusing with Server Types that end in P or
T

Reply

Michael C 2011-11-07 at 14:18

Only reason I have included Company code in the name is when you work for a firm that started out as two and merges. I know you should all go to one firm but there are times to keep it seperate.

Reply

Name Changed To Protect The Innocent 2011-12-01 at 21:22

Color me squarely in the “creative names” category. Too many times I have seen an “app server” turn double-duty as a “file server”, an HQ host shipped off to the CoLo, or a CAS pressed into emergency-but-who’s-kidding-who-we’re-not-going-to-come-back-and-correct-it service as DNS. What becomes of your functional naming effectiveness then? And Bish is absolutely correct that a sea of incremental numeric names is even worse – was that WS405 or WS450? Argh!! (Detractors would argue that the programmatic names are easier to script against, but this might be exactly what CNAMEs could be used for.)

Unfortunately, as easy as it is for some to see the clarity of Skunk and Bunny, Ed is absolutely right: there is that senior management attitude of “it isn’t business-like” that is difficult to overcome. If “cutesy is unprofessional”, then obviously people feel better that NYEXVM01 just crashed, rather than ATHENA. Right? Please. But I guess that’s what they want. Again, maybe CNAMEs are a way to have my cake and eat it too. I’m still looking for a good hybrid solution.

But I do have a serious observation about the themed names… Namely, don’t get so enamored with the creative process that you lose sight of the ease-of-memory that brought you there. When pagan gods are your theme, don’t think yourself clever for picking QUETZALCOATL or ARESHKEGAL, when ISIS or APOLLO will do. Also, when a name you pick is primarily known under another theme, and afilliation to your theme is secondary or tertiary, then it probably isn’t a good choice. ICARUS is the name? Brilliant use of Greek mythology. Oh what’s that? It’s a Tiberian freighter from episode #27 of Star Trek? Sure, I’ll be able to remember that, especially after themes collide in a company merger.

Reply

Ed Fisher 2011-12-02 at 14:45

One of the best…comments…EVAR!
Thanks NCTPTI, I appreciate both your alignment with Bish, and that you acknowledge that sometime management just isn’t cool with it all. And yes, servers pressed into double duty or strategically reallocated would screw the pooch on this system, which since I wrote this, I have seen happen. SQL servers do NOT like to be renamed!
CNAMEs can work well for admin purposes. Kerberos can present issues, but if you setspn appropriately you should be good to go.
And the Icarus…wasn’t that the IPX ship that landed on Z’ha’dum with Morden and Sheridan’s wife Anna on Babylon 5?
Cheers,
Ed

Reply

Leave a Comment

Previous post:

Next post: